Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to plot a hyper plane in 3D for the SVM results?
Replies: 4   Last Post: Apr 22, 2013 11:02 AM

 Messages: [ Previous | Next ]
 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?

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/plotting-data-from-an-svm-fit-hyperplane

but a Matlab implementation would be handy. Thanks very much.

A.

Date Subject Author
4/22/13 Aaronne
4/22/13 Bruno Luong
4/22/13 Aaronne
4/22/13 Bruno Luong
4/22/13 Aaronne