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

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.

Respuestas (1)

Shashank Prasanna
Shashank Prasanna el 21 de En. de 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 comentarios

FIR
FIR el 22 de En. de 2013
CAn you tell how to perform it
FIR
FIR el 22 de En. de 2013
after performing svmclassify and performing tabulate(),i get 40% 1's,60% 2's,why i get only 6o% accuracy
It is not possible to classify gender from photographs.
FIR
FIR el 22 de En. de 2013
walter i have extracted features ,even then it is not possible to perform?
Classifying gender by photographs is about like trying to classify religion by photographs.
FIR
FIR el 22 de En. de 2013
OK Waltet can i relace it by medical image dataset,classifying normal or abnormal,if abnormal then classifying again
You could try.
What kind of images would they be, and what would "abnormal" signify?
If you are trying to classify cells as normal or cancerous by shape, then typical result accuracy rates seldom exceed 78%, usually lower (64% to 72%). You need more complex classification algorithms to reach 78% by visuals, and are quite unlikely to exceed that for visual-light images. To get higher you need to switch out of visible-light measurements, such as switching to infrared, or Magnetic Resonance.
FIR
FIR el 23 de En. de 2013
Walter i have taken mri imag of brain,how can i classify it as normal or cancer,can i extract glcm features
FIR
FIR el 23 de En. de 2013
and regionprops for shape,like area,centroid etc
We gave up on classifying mri brain images as cancerous or not, well over a decade ago. It is a multi-year project. You pretty much need to have access to the Brain Atlas and do non-linear image registration in order to figure out which part of the brain you are looking at and then to match the locations of the brain to known functional areas. Once you have that, then you can start comparing the actual images of the area to the typical images so that you can figure out whether particular areas are supposed to be high or low intensity, with a view to finding something that should not be there. And figuring out whether it is cancer or just something "odd" (e.g., you want to ignore metal nails embedded in the brain because metal nails are unusual but not cancer.) All this with an mri image that might only be 64 x 64.
A guided search is much easier: that is, to compare the images to the Brain Atlas still, and find the areas that are statistically different and highlight those areas for interpretation by the technician or doctor. Instead of making a decision about them, just say "This part needs a closer look" because I don't know what is going on here."
We moved away from MRI imaging for cancer classification, to go to MRS, Magnetic Resonance Spectroscopy, which is a chemical analysis. You can do a lot more with chemical analysis!
? I thought FIR was working on this, not nkumar ?
FIR
FIR el 23 de En. de 2013
walter i have wxtracted glcm features for MRS image and have stores in variable D,on which basics can i classify it as normal abnormal,i have to use svmclassifier
MRS does not produce images; it produces floating point spectra, which glcm would not be suitable for.
MRI is used for images, and as I indicated before there are a number of difficult steps in figuring out where in the brain you are and what should be in that area, which is needed before you can use features to decide whether you have anything abnormal.
FIR
FIR el 24 de En. de 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
Walter Roberson el 24 de En. de 2013
Editada: Walter Roberson el 24 de En. de 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
FIR el 24 de En. de 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

Iniciar sesión para comentar.

Categorías

Etiquetas

Preguntada:

FIR
el 21 de En. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by