Skip to content

Nested cross-validation #90

@Peter9192

Description

@Peter9192

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions