How I can write code for training and then do classification using naive Bayes either image is noisy or not ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am a new user of MATLAB and want to do training and classification using naive Bayes. I have done it with confusion matrix but want to take result in the form of image. I am dealing with noisy images and want to classify either a given image is noisy or not?
I have matrix of features and matrix of (defined) Labels, How I can train and then do classification (using some sample image) either is it noisy or not ?
Please help, I shall be very thankful to you. Waiting for your kind response.
0 Kommentare
Antworten (1)
Image Analyst
am 18 Mai 2017
I haven't used it yet, but have you tried putting your feature vectors into fitcnb()?
5 Kommentare
Don Mathis
am 5 Jun. 2017
Bearbeitet: Don Mathis
am 5 Jun. 2017
I'm sorry but I still don't understand. Your example code does not return the result in the form of an image. The line
result = svmclassify(SVMStruct, lionTest);
returns a class label, which is probably a string like 'lion'. On the svmclassify Doc page (<http://www.mathworks.com/help/stats/svmclassify.html?searchHighlight=svmclassify&s_tid=doc_srchtitle#outputarg_Group)>, there is an example that shows that the result returned is a class label, in this case strings. Maybe you are saying that you want to return an example image from the same class as the classifier result? In that case you could take the string 'lion' and return the first lion image from your training set. Or, in your case I suppose your labels would be 'noisy' or 'not noisy', and so you would show a random noisy image?
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!