Skip to content

Commit

Permalink
Moved number of simulations as constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherbunn committed Aug 14, 2023
1 parent 80557f1 commit 962d3e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class ExponentialSmoothingRegressor(Estimator):
random_seed (int): Seed for the random number generator. Defaults to 0.
"""

_N_REPETITIONS = 400

name = "Exponential Smoothing Regressor"
hyperparameter_ranges = {
"trend": [None, "additive"],
Expand Down Expand Up @@ -167,7 +169,7 @@ def get_prediction_intervals(
# anchor represents where the simulations should start from (forecasting is done from the "end")
y_pred = self._component_obj._fitted_forecaster.simulate(
nsimulations=X.shape[0],
repetitions=400,
repetitions=self._N_REPETITIONS,
anchor="end",
random_state=self.parameters["random_state"],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class VARMAXRegressor(Estimator):
solely be based off of the datetimes and target values. Defaults to True.
"""

_N_REPETITIONS = 400

name = "VARMAX Regressor"
hyperparameter_ranges = {
"p": Integer(0, 10),
Expand Down Expand Up @@ -235,7 +237,7 @@ def get_prediction_intervals(
# anchor represents where the simulations should start from (forecasting is done from the "end")
y_pred = self._component_obj._fitted_forecaster.simulate(

Check warning on line 238 in evalml/pipelines/components/estimators/regressors/varmax_regressor.py

View check run for this annotation

Codecov / codecov/patch

evalml/pipelines/components/estimators/regressors/varmax_regressor.py#L238

Added line #L238 was not covered by tests
nsimulations=X.shape[0],
repetitions=400,
repetitions=self._N_REPETITIONS,
anchor="end",
random_state=self.random_seed,
exog=X if use_exog else None,
Expand Down

0 comments on commit 962d3e7

Please sign in to comment.