sktime / sktime

A unified framework for machine learning with time series
https://www.sktime.net
BSD 3-Clause "New" or "Revised" License
7.75k stars 1.32k forks source link

[BUG] TBATS docstring example does not run #6291

Closed josebaezmedina closed 2 months ago

josebaezmedina commented 5 months ago

The example for TBATS from the documentation does not work.

from sktime.datasets import load_airline
from sktime.forecasting.tbats import TBATS
y = load_airline()
forecaster = TBATS(  
    use_box_cox=False,
    use_trend=False,
    use_damped_trend=False,
    sp=12,
    use_arma_errors=False,
    n_jobs=1)
forecaster.fit(y)  
y_pred = forecaster.predict(fh=[1,2,3])  

Expected behavior predictions from the time series

I am getting: TypeError: _TbatsAdapter.init() got an unexpected keyword argument 'seasonal_periods'

fkiraly commented 5 months ago

Thanks for reporting. Could you kindly list your package versions, as described in the "new issue" template?

I've also added a test with sp parameter to see if something comes up there: https://github.com/sktime/sktime/pull/6292

fkiraly commented 5 months ago

@josebaezmedina, the tests in https://github.com/sktime/sktime/pull/6292 seem to run with the example above.

Possibly it is an issue with incompatible package versions in your environment?

Would appreciate package versions.

fr1ll commented 2 months ago

@josebaezmedina- I also tested this function and it runs.

Relevant package versions:

fkiraly commented 2 months ago

Also tested and runs - might be a specific version combination, in any case error cannot be reproduced. Closing due to to lack of updates.