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

Nested cross-validation #90

Open
Peter9192 opened this issue Aug 24, 2022 · 0 comments
Open

Nested cross-validation #90

Peter9192 opened this issue Aug 24, 2022 · 0 comments

Comments

@Peter9192
Copy link
Contributor

We've been talking about nested cross-validation. Scikit-learn actually has a nice example of this. In essence, it looks like this:

inner_cv = KFold(n_splits=4, shuffle=True, random_state=i)
outer_cv = KFold(n_splits=4, shuffle=True, random_state=i)

clf = GridSearchCV(estimator=svm, param_grid=p_grid, cv=inner_cv)

# Note that the gridsearch instance is passed into the outer cv
score = cross_val_score(clf, X=X_iris, y=y_iris, cv=outer_cv).mean()

It would be nice if we could eventually do the same, but for that we need to make sure our model/pipeline can work with xarray data structures.

related to #71 AI4S2S/lilio#46

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