Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running CV Split by Validation startegy -supervised.exceptions ERROR You need to specify cv as list or iterable #737

Open
palbha opened this issue Jul 23, 2024 · 0 comments

Comments

@palbha
Copy link

palbha commented Jul 23, 2024

While I was trying to rune the below code - creating a timseries split in order to maintain the temporal nature of my data & following the github issues #380 .. I encountered this issue -Please suggest if there is anything I should modify

-Code
tscv = TimeSeriesSplit(n_splits=5)

#Create train and test indices for each split
folds = []
splits = []

for train_index, test_index in tscv.split(x_train):
folds.append(train_index.tolist())
splits.append(test_index.tolist())

#Combine train/test indices into a list of tuples
custom_cv = {'validation_type': 'custom', 'folds': folds, 'splits': splits}

#Define AutoML with custom cross-validation
automl = AutoML(mode='Compete', total_time_limit=600, validation_strategy=custom_cv)

#Fit the model
automl.fit(x_train, y_train)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant