SVM train shows the Warning: The display option can only plot 2D training data..what is wrong with may data?

i have trained SVM using svmtrain function..my data is a 96x20 excel sheet in which 48x20 represent (let say) class A and other 48x20 represent class B. I create another excel sheet to labels these 96x20 features and the labels for this data is 96x1 excel sheet (48 lables of A and 48 of B).when i run my code it returns me 1x1 svm struct and 96x20 features variable which is double while the labels are returned into cells i.e. 96x1 cells..its not plotting the result of train and returns warning : The display option can only plot 2D training data.How can i show the plot??
This is my code ..i also attached the features and labels files..
data = xlsread('I_alif_bay_train'); % features file 96x20
[num,txt]=xlsread('I_alif_bay_train_labels'); % features labels 96x1 as alif and bay..or let say A and B
testing=xlsread('I_alif_bay_testing'); this is the testing features 40x20 excel file
[num ,labels]= (xlsread('I_alif_bay_testing_labels')); testing labels which i am not sure how to use
SVMStruct = svmtrain(data,txt,'ShowPlot',true);
classify= svmclassify(SVMStruct,testing,'ShowPlot',true);
This is the Warning: The display option can only plot 2D training data. > In svmtrain (line 403) In svm_practice (line 9)
any help?? all the features and labels sheets are attached..

 Accepted Answer

You cannot. You have 20 dimensional input data; there is no way you can reasonably plot a 20 dimensional hypersurface. You should assume that anything more than 7 dimensions has no meaningful plot (not that making good plots from 4 to 7 dimensions is easy, but you can kind of hack something together in those dimension ranges.)

3 Comments

thank you so much sir.so can i reduce these all dimensions to see my plot for the given data?? or this is not possible too? also is this method of labeling is correct the way i have done?
svmtrain() has no provision for reducing data to do plotting. You would have to examine the svm results to figure out how you wanted to do the data reduction.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!