FUNCTION REFERENCE
fitcsvm
Fit a binary support-vector classification model using SMO.
Fit a binary support-vector classification model using SMO.
Syntax
mdl = fitcsvm(X,Y)Syntax
mdl = fitcsvm(tbl,'ResponseVarName')Syntax
mdl = fitcsvm(tbl,Y)Syntax
mdl = fitcsvm(X,Y,'KernelFunction','rbf','KernelScale',s,'BoxConstraint',C,'Standardize',true)The default kernel is linear; rbf and gaussian use exp(-squaredDistance/KernelScale^2). BoxConstraint defaults to 1. Scores are [-f f], where f is the signed decision value. Alpha contains nonnegative support-vector coefficients; Bias and SupportVectors are available, and Beta gives the linear coefficient vector. With Standardize enabled, SupportVectors and Beta use standardized predictor coordinates.
Example
mdl=fitcsvm([-2;-1;1;2],[1;1;2;2]); [label,score]=predict(mdl,[-1;1])Differences from MATLAB: only binary C-SVC with linear and RBF kernels is supported; use fitcecoc for multiclass classification. KernelScale affects both linear and RBF kernels. The serial solver is bounded to 2048 observations, 100000000 kernel element products and 200000 pair updates; nonconvergence errors explicitly.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.