Aaronne
Posts:
110
Registered:
6/2/11


How to plot a hyper plane in 3D for the SVM results?
Posted:
Apr 22, 2013 7:41 AM


I just wondering how to plot a hyper plane of the SVM results.
For example, here we are using two features, we can plot the decision boundary in 2D. But if how can we plot a hyper plane in 3D if we use 3 features?
load fisheriris; features = meas(1:100,:); featureSelcted = features(1:100,1:2); % For example, featureSelcted = features(1:100,1:3) can not be plotted groundTruthGroup = species(1:100); svmStruct = svmtrain(featureSelcted, groundTruthGroup, ... 'Kernel_Function', 'rbf', 'boxconstraint', Inf, 'showplot', true, 'Method', 'QP'); svmClassified = svmclassify(svmStruct,featureSelcted,'showplot',true);
A similar solution in R can be found at
http://stackoverflow.com/questions/8017427/plottingdatafromansvmfithyperplane
but a Matlab implementation would be handy. Thanks very much.
A.

