Skip to content

Commit aa262e9

Browse files
Moved forecasting horizon out
1 parent ebdd2f6 commit aa262e9

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

evalml/pipelines/components/estimators/regressors/arima_regressor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import pandas as pd
66
from pandas.api.types import is_integer_dtype
77
from skopt.space import Integer
8+
from sktime.forecasting.base import ForecastingHorizon
89

910
from evalml.model_family import ModelFamily
1011
from evalml.pipelines.components.estimators import Estimator
@@ -141,8 +142,6 @@ def _remove_datetime(
141142
return data_no_dt
142143

143144
def _set_forecast(self, X: pd.DataFrame):
144-
from sktime.forecasting.base import ForecastingHorizon
145-
146145
# we can only calculate the difference if the indices are of the same type
147146
units_diff = 1
148147
if isinstance(X.index[0], type(self.last_X_index)) and isinstance(

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55
import pandas as pd
66
from skopt.space import Categorical, Integer
7+
from sktime.forecasting.base import ForecastingHorizon
78

89
from evalml.model_family import ModelFamily
910
from evalml.pipelines.components.estimators import Estimator
@@ -92,8 +93,6 @@ def __init__(
9293
)
9394

9495
def _set_forecast_horizon(self, X: pd.DataFrame):
95-
from sktime.forecasting.base import ForecastingHorizon
96-
9796
# we can only calculate the difference if the indices are of the same type
9897
units_diff = 1
9998
if isinstance(X.index[0], type(self.last_X_index)):

0 commit comments

Comments
 (0)