Closed vrduddu closed 4 years ago
@vrduddu
Thanks for using pyaf. I would be glad to help if you respect the guidelines for submitting an issue, to be able to reproduce this issue:
Closing issue after no response for 30 days. Not blocking. Please repoen if needed.
I am Developing an Hierarchical Forecast Model where some of the columns in the last branch of Hierarchy are zero. When using 'AR" method to forecast I get the following error "Train Failed". Could you please help on how to get around with zeros and still run models other than NoAR. Also, how can we give exogenous variables as input when dealing with Hierarchical Model. Many thanks in advance.
IndexError Traceback (most recent call last) ~\pyaf\ForecastEngine.py in train(self, iInputDS, iTime, iSignal, iHorizon, iExogenousData) 24 self.mSignalDecomposition.mOptions = self.mOptions; ---> 25 self.mSignalDecomposition.train(iInputDS, iTime, iSignal, iHorizon, iExogenousData); 26 except tsutil.PyAF_Error as error:
~\pyaf\TS\SignalDecomposition.py in train(self, iInputDS, iTime, iSignal, iHorizon, iExogenousData) 703 lTrainer.train(iInputDS, iTime, iSignal, iHorizon) --> 704 lTrainer.perform_model_selection() 705 self.mBestModel = lTrainer.mBestModel
~\pyaf\TS\SignalDecomposition.py in perform_model_selection(self) 346 else: --> 347 self.collectPerformanceIndices_ModelSelection(); 348
~\pyaf\TS\SignalDecomposition.py in collectPerformanceIndices_ModelSelection(self) 500 # print(self.mPerfsByModel); --> 501 lBestName = lInterestingModels['Model'].iloc[0]; 502 self.mBestModel = self.mPerfsByModel[lBestName][0];
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\indexing.py in getitem(self, key) 1423 maybe_callable = com.apply_if_callable(key, self.obj) -> 1424 return self._getitem_axis(maybe_callable, axis=axis) 1425
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\indexing.py in _getitem_axis(self, key, axis) 2156 # validate the location -> 2157 self._validate_integer(key, axis) 2158
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\indexing.py in _validate_integer(self, key, axis) 2087 if key >= len_axis or key < -len_axis: -> 2088 raise IndexError("single positional indexer is out-of-bounds") 2089
IndexError: single positional indexer is out-of-bounds
During handling of the above exception, another exception occurred:
PyAF_Error Traceback (most recent call last)