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
In the case when user want to fit a flat level (and build customized trend as regressors) by specifying level_segments=0, the KTR model is able to fit a single knot for the level component. However, the predict function produces IndexError because the underlying code assumes KTRModel.knots_tp_levels to have at least 2 components.
The code above gives IndexError: index -2 is out of bounds for axis 0 with size 1.
Expected behavior
Separate code paths for single and multiple level knots.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
OS: Linux
Python Version: 3.10.8
Versions of Major Dependencies (pandas, scikit-learn, cython): pandas==1.5.3, scikit-learn==1.2.1
Additional context
Could we separate level and trend? I.e. Level is the dynamic intercept part, and trend is the dynamic slope part, which can extend into the future smoothly.
The text was updated successfully, but these errors were encountered:
Describe the bug
In the case when user want to fit a flat level (and build customized trend as regressors) by specifying
level_segments=0
, the KTR model is able to fit a single knot for the level component. However, the predict function produces IndexError because the underlying code assumesKTRModel.knots_tp_levels
to have at least 2 components.To Reproduce
The code above gives
IndexError: index -2 is out of bounds for axis 0 with size 1
.Expected behavior
Separate code paths for single and multiple level knots.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
pandas
,scikit-learn
,cython
):pandas==1.5.3
,scikit-learn==1.2.1
Additional context
Could we separate level and trend? I.e. Level is the dynamic intercept part, and trend is the dynamic slope part, which can extend into the future smoothly.
The text was updated successfully, but these errors were encountered: