File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed
ads/opctl/operator/lowcode/forecast/model Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -130,14 +130,17 @@ def _build_model(self) -> pd.DataFrame:
130
130
additional_regressors = list (
131
131
set (full_data_indexed .columns ) - {self .original_target_column }
132
132
)
133
- future_regressor = full_data_indexed .reset_index ().pivot (
134
- index = self .spec .datetime_column .name ,
135
- columns = ForecastOutputColumns .SERIES ,
136
- values = additional_regressors ,
137
- )
138
-
139
- future_reg = future_regressor [: - self .spec .horizon ]
140
- regr_fcst = future_regressor [- self .spec .horizon :]
133
+ if len (additional_regressors ) > 1 :
134
+ future_regressor = full_data_indexed .reset_index ().pivot (
135
+ index = self .spec .datetime_column .name ,
136
+ columns = ForecastOutputColumns .SERIES ,
137
+ values = additional_regressors ,
138
+ )
139
+ future_reg = future_regressor [: - self .spec .horizon ]
140
+ regr_fcst = future_regressor [- self .spec .horizon :]
141
+ else :
142
+ future_reg = None
143
+ regr_fcst = None
141
144
142
145
if self .loaded_models is None :
143
146
model = model .fit (
Original file line number Diff line number Diff line change 43
43
# "UberTLCDataset",
44
44
# "WeatherDataset",
45
45
# "WineDataset",
46
- # "WoolyDataset",
46
+ "WoolyDataset" ,
47
47
]
48
48
49
49
MODELS = [
50
- # "arima",
51
- # "automlx",
52
- # "prophet",
53
- # "neuralprophet",
50
+ "arima" ,
51
+ "automlx" ,
52
+ "prophet" ,
53
+ "neuralprophet" ,
54
54
"autots" ,
55
55
# "auto",
56
56
]
You can’t perform that action at this time.
0 commit comments