简体   繁体   中英

scikit-learn: Issues on RFECV example

I'm having a difficulty in understanding the given RFECV example in current documentation. In the plot it's been written as "nb of misclassifications", so i expect it to be "lower the better". But in the example plot the best has been chosen as the highest cross-validation score. So i naturally expect it to be something related to accuracy (scoring says accuracy in the code anyways). But then how it becomes higher than 1?

I am a bit confused on how to interpret these results. I would appreciate any help on this.

Thanks!

RFECV has a useful verbose option. Running with verbose=2 , you can see, that for a 2-fold cross-value check, as in example, grid_scores_ holds sum of both folds scores.

In general, for a n-fold check, grid_scores_ is sum of folds scores divided by n-1 , see in code . It seems to be a bug; see somewhat relevant issue on the tracker .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM