heidelbergcement / hcrystalball

A library that unifies the API for most commonly used libraries and modeling techniques for time-series forecasting in the Python ecosystem.
https://hcrystalball.readthedocs.io/
MIT License
152 stars 19 forks source link

[FEATURE] Do not allow for empty X_train, y_train in SklearnWrapper after lag creation #49

Closed MichalChromcak closed 3 years ago

MichalChromcak commented 3 years ago

Is your feature request related to a problem? Please describe. If a user calls fit and later predict on the SklearnWrapper while having training data of length 51, horizon 50, and lags 3, based on our implementation, he/she would end up with empty X_train, y_train due to the lag creation which introduces non-evitable data cuts.

Describe the solution you'd like SklearnWrapper should raise ValueError in case there is nothing left in the data for fitting.

Describe alternatives you've considered We might consider implementing other approaches (without lags) but should start with fixing this one.

Additional context The issue occurred when implementing HCrystalBallForecaster in sktime

image

MichalChromcak commented 3 years ago

@pavelkrizek What are your thoughts on this?