I am using:
to build an SVM model and I want to plot the resulting hyper plane in 2D. I am having trouble understanding the structure of the results I am getting. For x with 30 features over 455 samples (~80% breast cancer dataset) I was expecting a 30 by
w vector plus a 1 by 1
b vector. I can only find the
SVMModel.W variable which is 455 by 1.
I am trying to plot the output on a 2D space using pca in the wollowing way:
[coeff, score, ~, ~, ~, mu]=pca(X);
%project and plot hyper plane
In the commented line I want to project and plot the hyper plane.I have seen this answer for the 2D case, as well as, this answer for the 3D case. My problem has 30D and needs to be projected into 2D.
- How do I make scence of the output?
- How do I project the results on a 2D plain using 2 first PCA components?