Closed antoinecarme closed 2 years ago
Croston Method uses a simple exponential smoothing internally. This is implemented using a loop on the data in python (not a valid pyaf philosophy, even if we are only looping on non-zero rows ;).
https://github.com/antoinecarme/pyaf/blob/f3853d1bef5a95a3c61cbbd06f5ab0bb8979e383/pyaf/TS/Intermittent_Models.py#L96
Try vectorizing this loop, or better, use statsmodels implementation and avoid reinventing the wheel.
https://github.com/statsmodels/statsmodels/
A profiling is needed to assess the speed improvement.
Target Release : 2022-07-14
reminder : add statsmodels as pyaf dependency.
Speed improvement OK.
Croston Method uses a simple exponential smoothing internally. This is implemented using a loop on the data in python (not a valid pyaf philosophy, even if we are only looping on non-zero rows ;).
https://github.com/antoinecarme/pyaf/blob/f3853d1bef5a95a3c61cbbd06f5ab0bb8979e383/pyaf/TS/Intermittent_Models.py#L96
Try vectorizing this loop, or better, use statsmodels implementation and avoid reinventing the wheel.
https://github.com/statsmodels/statsmodels/
A profiling is needed to assess the speed improvement.
Target Release : 2022-07-14