Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Warning: The display option can only plot 2D training data

Asked by FIR on 21 Jan 2013

I am working on classification of images using SVM classifier,

I want to do classifivation ,the dataset consists of males and females ,first i want to classify its gender,

if it is female i dont want to classify,if male i want to calssify it as adult or aged person

for this i have 100 images of males and females

i have extracted features like colour and texture and have saved in variable features

features =100x6,(100 images ,each column consists of feature vector),

features1 i have to test for 40 images(40x6)

so on whic basics i have to classify using svm classifier

please assist

tr=rand(100,6);features

group=[ones(60,1);2*ones(40,1)];

te=tr(61:end,:);

svmStruct = svmtrain(xdata,group,'showplot',true); res= svmclassify(svmStruct ,te);

I get error in plotting,plz assist.

0 Comments

FIR

Tags

Products

No products are associated with this question.

1 Answer

Answer by Shashank Prasanna on 21 Jan 2013

You have high dimensional data (in |R^6) and obviously you can't visualize 6 dimensions, so don't force the 'showplot' to true and you shouldn't see this 'Warning'

If you are concerned about visualization take the dimensionality reduction route and perform for example PCA and reduce it to 3 dimensions to visualize it.

16 Comments

FIR on 24 Jan 2013

ok walter if i have extrated feature values say area this is just for an example,using svm how i can classify it is normal or abnormal.

Walter Roberson on 24 Jan 2013

You cannot do that without information about what should be in that area. In some places in the brain, near blackness is what you would normally expect, and anything substantially different would be "abnormal", but in other places in the brain, darkness is what would be "abnormal"

Suppose I show you a picture of a rock in my back yard. The rock is wet.

  • Question: Is that abnormal?
  • Answer: if the picture was taken in the middle of summer, dry would be typical
  • But July is the month we get the most rain (statistically), so a wet rock in Summer is not what you would usually see, but is not unusual
  • But if the picture was taken in the middle of our winter, then a wet rock outside would be abnormal, as our winters are quite cold and the water would have frozen within a couple of minutes rather than stayed liquid.

You need context to interpret results, context of what is usual in that area. Without that context, your program might as well be full of rocks.

FIR on 24 Jan 2013

thanks a lot for your suggestions walter,is there any demo for any images how classification is made,I want to know the concept of how classification is made

Shashank Prasanna

Contact us