Skip to content

Commit

Permalink
allow graphsklearn to take in either ints or cv splitters for cv
Browse files Browse the repository at this point in the history
  • Loading branch information
perib committed Oct 2, 2024
1 parent 5f91594 commit 6c356da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tpot2/graphsklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def estimator_fit_transform_override_cross_val_predict(estimator, X, y, cv=5, me

method = _method_name(name=estimator.__class__.__name__, estimator=estimator, method=method)

if cv > 1:
if (isinstance(cv, int) and cv>1) or (not isinstance(cv, int) and cv is not None):
preds = sklearn.model_selection.cross_val_predict(estimator=estimator, X=X, y=y, cv=cv, method=method, **fit_params)
estimator.fit(X,y, **fit_params)

Expand Down

0 comments on commit 6c356da

Please sign in to comment.