Using `cross_val_predict` with `RepeatedKFold`
See original GitHub issueIt would be nice to use RepeatedKFold
with with cross_val_predict
. It’s possible use cross_val_score
with repeated K folds, but a ValueError
is thrown with predict
model = LogisticRegression()
rkf = RepeatedKFold(n_splits=10, n_repeats=10)
prediction = cross_val_predict(model, X, y, cv=rkf)
score = cross_val_score(model, X, y, cv=rkf)
Throws ValueError: cross_val_predict only works for partitions
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
python - RepeatedKFold & cross_val_predict - Stack Overflow
cross_val_predict will provide for each of your samples one prediction value, however with RepeatedKFold for each sample multiple ...
Read more >3.1. Cross-validation: evaluating estimator performance
Here is a flowchart of typical cross validation workflow in model training. ... The result of cross_val_predict may be different from those obtained...
Read more >Repeated k-Fold Cross-Validation for Model Evaluation in ...
This involves simply repeating the cross-validation procedure multiple times and reporting the mean result across all folds from all runs.
Read more >Addressing Overconfidence: Repeated K-Fold CV - Kaggle
Explore and run machine learning code with Kaggle Notebooks | Using data from ... StratifiedKFold, cross_val_score, cross_val_predict from sklearn import ...
Read more >sklearn.model_selection.cross_val_predict() - W3cubDocs
Possible inputs for cv are: None, to use the default 3-fold cross validation,; integer, to specify the number of folds in a (Stratified)KFold ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What do you think it should return???
Just came across this, and would appreciate this feature. My use case is determining if certain observations we have are consistently mislabeled across different classifiers and different splits, to help determine what data we should be collecting and focusing on.