[Neuroimaging] LeaveOneOut cross validation

SJ JV suprajasankari at gmail.com
Mon Mar 5 05:56:37 EST 2018


Hi

In order to do LOOCV for PLSRegression on a set of n correlation matrices
like:

pls = PLSRegression(n_components = 3)
cv=LeavePLabelOut([1,1,1,1,1], p=2)

cv_scores = cross_val_score(pls, correlationmatrices, y=[1,1,1,1,1], cv=cv)

Output labels are either 0 or 1 as shown in y.

The above does not work.

What's the correct way to implement LOOCV for PLSRegression in the above
case ?

Thank you
S.V

-- 
U
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20180305/91fce6dc/attachment.html>


More information about the Neuroimaging mailing list