Comments (3)
The error in KFold
is actually expected. We expect to have at least a sample from each class in each fold. This cannot be achieved with the LeaveOneOut
cross-validation. So we should not accept this strategy.
So we could raise early an error for this strategy. However, I can also see some other strategy leading to having a single class present when fitting the calibrator. I assume that it should be safer to raise an error in this case as well otherwise we get a ill-fitted calibrator anyway.
ping @lucyleeow @ogrisel that might have more insight on this part of the calibrator and to know their opinions.
from scikit-learn.
I think i agree on both accounts but did not check the details in the code yet.
from scikit-learn.
The error in
KFold
is actually expected. We expect to have at least a sample from each class in each fold.
Isn't it the case that KFold
also doesn't guarantee one sample from each class in each fold (since it doesn't create stratified folds)?
However, I can also see some other strategy leading to having a single class present when fitting the calibrator.
Yeah, exactly. There are lots of ways to end up with poorly-fit calibrators, and I'm not sure the code's current check (even when it does apply) really covers that.
from scikit-learn.
Related Issues (20)
- Don't refit in FixedThresholdClassifier when original model is already trained. HOT 2
- GridSearchCV.score: support multiple scoring metrics HOT 3
- Broken link at the 1.5.0 release page HOT 1
- Sphinx search summary disappeared from 1.5 website HOT 11
- `GridSearchCV` with custom estimator and nested Parameter Grids raises `ValueError` in scikit-learn 1.5.0 HOT 5
- Fix version warning banner on the stable documentation page HOT 6
- Samples with nan distance are included in the computation of mean in `KNNImputer` for uniform weights HOT 1
- `sklearn.neighbors.NearestNeighbors` allow processing nan values
- DEP loss_function_ attribute in PassiveAggressiveClassifier HOT 2
- RFC Future of HalvingGridSearchCV HOT 3
- Deprecate copy in Birch HOT 1
- Add More Robustness Tests to the California Housing Dataset HOT 2
- Deprecate copy_X in TheilSenRegressor HOT 1
- RFC module location in API table for the API reference page HOT 5
- When a Pipeline step is changed via set_params, the set_output state is cleared HOT 3
- Allow users to override `_fit_and_score` of the BaseSearchCV HOT 1
- problem with convert_sklearn and onnx opset HOT 1
- Incorrect invalid device error introduced in #25956 HOT 6
- ColumnTransformer ignores certain column t HOT 1
- Request to update "Choosing the Right Estimator" Graphic (scikit-learn algorithm cheat sheet) HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikit-learn.