mdl = fitcsvm(X, Y)
mdl = fitcsvm(X, Y, Name, Value)
label = predict(mdl, Xnew)
[label, score] = predict(mdl, Xnew)
fitcsvm cree un objet ClassificationSVM a partir de predicteurs numeriques X et d'etiquettes a deux classes Y.
Les arguments nom-valeur incluent ClassNames, KernelFunction, KernelScale, PolynomialOrder, BoxConstraint, Cost, Standardize, IterationLimit, Tolerance et PredictorNames. Les noyaux pris en charge sont linear, gaussian, rbf et polynomial.
X = [0 0; 0 1; 1 0; 1 1; 5 5; 5 6; 6 5; 6 6];
Y = [1; 1; 1; 1; 2; 2; 2; 2];
mdl = fitcsvm(X, Y, 'KernelFunction', 'linear');
[label, score] = predict(mdl, [0.2 0.2; 5.2 5.2])
| Version | Description |
|---|---|
| 2.0.0 | version initiale |