FUNCTION REFERENCE
kfoldPredict
Predict the held-out observations of a partitioned classifier.
Predict the held-out observations of a partitioned classifier.
Syntax
label = kfoldPredict(cvmdl)Syntax
[label,score] = kfoldPredict(cvmdl)Outputs follow original observation order and the original ClassNames columns. For Holdout, untested numeric labels and scores are NaN, strings are missing, cellstr labels are empty, categorical labels are undefined, integer labels are zero, and logical labels are false. Only held-out rows contribute to kfoldLoss.
Example
m=fitcknn([0;1;4;5],[1;1;2;2]); cv=crossval(m,'Leaveout','on'); [label,score]=kfoldPredict(cv)Differences from MATLAB: only one prediction per held-out row is supported; repeated partitions and optional prediction settings are unsupported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.