how can use it for more than two features plot for multiclass svm?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
pos = find(y == 1); neg = find(y == -1); plot(x(pos,1), x(pos,2), 'ko', 'MarkerFaceColor', 'b'); hold on; plot(x(neg,1), x(neg,2), 'ko', 'MarkerFaceColor', 'g')
% Plot the decision boundary plot_x = linspace(min(x(:,1)), max(x(:,1)), 30); plot_y = (-1/w(2))*(w(1)*plot_x + b); plot(plot_x, plot_y, 'k-', 'LineWidth', 2)
title(sprintf('SVM Linear Classifier with C = %g', C), 'FontSize', 14)
I also get this error Error using + Matrix dimensions must agree. which is for this statement plot_y = (-1/w(2))*(w(1)*plot_x + b);
where w is 2*2 and b is 3*1
kindly help!
0 commentaires
Réponses (1)
Salaheddin Hosseinzadeh
le 15 Août 2014
Hey shah,
There's no surprise you got error adding plot_x and b, because apparently plot_x is 1x30 and as you said b is 3*1
You can't do it either! I don't really know how can someone help u!
0 commentaires
Voir également
Catégories
En savoir plus sur Image Data Workflows dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!