Skip to content

Change behavior of fh argument in the predict_model function in time_series #1560

@moezali1

Description

@moezali1

Change behavior of the fh argument in the predict_model function in time_series

Currently, if we want to predict 12 periods in the future we have to pass np.arange(1,13). Instead, it should be 12. This behavior is consistent with how it is currently handled in the setup function.

from pycaret.datasets import get_data
data = get_data('airline')

from pycaret.time_series import *
s = setup(data, fold = 5, fh = 12, session_id = 123)

arima = create_model('arima')

predict_model(arima, fh = 12)

Currently, this produces this:
image

The changed behavior should be predictions for all 12 points instead of just 12th point.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtime_seriesTopics related to the time series

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions