[scikit-learn] Problem with nested cross-validation example?

Daniel Homola dani.homola at gmail.com
Mon Nov 28 18:30:42 EST 2016


Dear all,


I was wondering if the following example code is valid:

http://scikit-learn.org/stable/auto_examples/model_
selection/plot_nested_cross_validation_iris.html

My understanding is, that the point of nested cross-validation is to
prevent any data leakage from the inner grid-search/param optimization CV
loop into the outer model evaluation CV loop. This could be achieved if the
outer CV loop's test data is completely separated from the inner loop's CV,
as shown here:

https://mlr-org.github.io/mlr-tutorial/release/html/img/
nested_resampling.png


The code in the above example however doesn't seem to achieve this in any
way.


Am I missing something here?


Thanks a lot,

dh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20161128/b896d41e/attachment.html>


More information about the scikit-learn mailing list