CSVM and SVM on 2 class dataset
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
and I wanna do svm and csvm on the third and sixth features but I can not draw the line and just plot support vectors
this is my code right now
clc
clear all
close all
datas = csvread('pima-indians-diabetes.csv');
f3=datas(1:1:768,3);
f6=datas(1:1:768,6);
X=[f3 f6];
Y=datas(1:1:768,9);
SVMModel = fitcsvm(X,Y)
sv = SVMModel.SupportVectors;
figure
gscatter(X(:,1),X(:,2),Y)
hold on
plot(sv(:,1),sv(:,2),'ko','MarkerSize',10)
legend('1','0','Support Vector')
hold off
and is fitcsvm is svm or csvm?if its csvm how to define c and if its not what sholud I use instead?
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!