FUNCTION REFERENCE
kfoldLoss
Compute held-out classifier misclassification loss.
Compute held-out classifier misclassification loss.
Syntax
loss = kfoldLoss(cvmdl)Evaluates each validation observation using its fold's fitted model; Holdout excludes all untested observations.
Example
m=fitcknn([0;1;4;5],[1;1;2;2]); cv=crossval(m,'Leaveout','on'); kfoldLoss(cv)Differences from MATLAB: LossFun supports classiferror (default), mincost, binodeviance, exponential and hinge; per-fold modes and custom weights are unsupported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.