FUNCTION REFERENCE
fitcecoc
Fit a multiclass error-correcting output code classifier.
Fit a multiclass error-correcting output code classifier.
Syntax
mdl = fitcecoc(X,Y,'Coding','onevsone','Learners','svm')Coding supports onevsone (default) and onevsall. Learners supports svm (linear kernel default), linear, tree, knn, discriminant, naivebayes or templateSVM/templateTree/templateLinear/templateDiscriminant. CodingMatrix contains class codes. predict returns labels and negated average binary losses, ignoring zero-coded learners for each class. Hinge loss is used for SVM scores and quadratic loss for posterior scores.
Example
m=fitcecoc([0;1;4;5;8;9],[1;1;2;2;3;3]); [y,negLoss]=predict(m,[0;4;9])Differences from MATLAB: Only homogeneous OVO/OVA coding is supported, with at most 512 binary learners and 128 MiB retained model storage. Posterior calibration, custom decoding and custom codes are unsupported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.