You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
For Hierarchical Time Series forecasting, I used the hts-regressor but when i fit the model for the dataframe it works very well without any bugs but when i try to make the prediction after the fitting the model it throughs the value error, I didn`t make any changes to the dataset. the error is shown below and same error for the prophet model as too
Describe the bug
For Hierarchical Time Series forecasting, I used the hts-regressor but when i fit the model for the dataframe it works very well without any bugs but when i try to make the prediction after the fitting the model it throughs the value error, I didn`t make any changes to the dataset. the error is shown below and same error for the prophet model as too
ValueError Traceback (most recent call last)
C:\Users\RAVITE~1.KUR\AppData\Local\Temp/ipykernel_14244/3328185665.py in
1 model_bu_arima = hts.HTSRegressor(model='auto_arima', revision_method='BU', n_jobs=0)
2 model_bu_arima = model_bu_arima.fit(dataset_MMAachen, hierarchy)
----> 3 pred_bu_arima = model_bu_arima.predict(steps_ahead=4)
~\Anaconda3\envs\Microsoft\lib\site-packages\hts\core\regressor.py in predict(self, exogenous_df, steps_ahead, distributor, disable_progressbar, show_warnings, **predict_kwargs)
350 self.hts_result.errors = (key, error)
351 self.hts_result.residuals = (key, residual)
--> 352 return self._revise(steps_ahead=steps_ahead)
353
354 def _revise(self, steps_ahead: int = 1) -> pandas.DataFrame:
~\Anaconda3\envs\Microsoft\lib\site-packages\hts\core\regressor.py in _revise(self, steps_ahead)
362 revised_columns = list(make_iterable(self.nodes))
363 revised_index = self._get_predict_index(steps_ahead=steps_ahead)
--> 364 return pandas.DataFrame(revised, index=revised_index, columns=revised_columns)
365
366 def _get_predict_index(self, steps_ahead=1) -> Any:
~\Anaconda3\envs\Microsoft\lib\site-packages\pandas\core\frame.py in init(self, data, index, columns, dtype, copy)
670 )
671 else:
--> 672 mgr = ndarray_to_mgr(
673 data,
674 index,
~\Anaconda3\envs\Microsoft\lib\site-packages\pandas\core\internals\construction.py in ndarray_to_mgr(values, index, columns, dtype, copy, typ)
322 )
323
--> 324 _check_values_indices_shape_match(values, index, columns)
325
326 if typ == "array":
~\Anaconda3\envs\Microsoft\lib\site-packages\pandas\core\internals\construction.py in _check_values_indices_shape_match(values, index, columns)
391 passed = values.shape
392 implied = (len(index), len(columns))
--> 393 raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}")
394
395
ValueError: Shape of passed values is (249, 150), indices imply (249, 152)
Desktop (please complete the following information):
]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: