Skip to content

[BUG]: Number of folds not reported correctly when passing ExpandingWindowSplitter #3011

Open
@ngupta23

Description

@ngupta23

pycaret version checks

Issue Description

The number of folds is not shown correctly when passing an sktime ExpandingWindowSplitter to the fold parameter.

Reproducible Example

# !pip install pycaret==3.0.0rc3

import numpy as np
from pycaret.time_series import TSForecastingExperiment
from pycaret.datasets import get_data
from sktime.forecasting.model_selection import ExpandingWindowSplitter

y = get_data(114, folder="time_series/seasonal", verbose=False)
cv = ExpandingWindowSplitter(fh=np.arange(1, 13), initial_window=24, step_length=4)
exp = TSForecastingExperiment()
exp.setup(y, fh=12, fold=cv)

Expected Behavior

Expected: "Fold Number" should list the number of folds in the CV step, but it just lists the ExpandingWindowSplitter object

Actual results:
image

Actual Results

Shown above.

Installed Versions

System: python: 3.7.14 (default, Sep 8 2022, 00:06:44) [GCC 7.5.0] executable: /usr/bin/python3 machine: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic

PyCaret required dependencies:
pip: 21.1.3
setuptools: 57.4.0
pycaret: 3.0.0.rc3
IPython: 7.9.0
ipywidgets: 7.7.1
tqdm: 4.64.1
numpy: 1.21.6
pandas: 1.3.5
jinja2: 2.11.3
scipy: 1.7.3
joblib: 1.1.0
sklearn: 1.0.2
pyod: Installed but version unavailable
imblearn: 0.8.1
category_encoders: 2.5.0
lightgbm: 3.3.2
numba: 0.55.2
requests: 2.28.1
matplotlib: 3.5.3
scikitplot: 0.3.7
yellowbrick: 1.5
plotly: 5.5.0
kaleido: 0.2.1
statsmodels: 0.13.2
sktime: 0.11.4
tbats: Installed but version unavailable
pmdarima: 2.0.1
psutil: 5.9.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomerstime_seriesTopics related to the time series

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions