Support vector machine for multi-class
2 次查看(过去 30 天)
显示 更早的评论
Good day.
I want to use SVM to classify my images into multi classes but i already extracted features using regionprops and GLCM.
How do i feed these extracted features into SVM so that SVM can classify the images according to the extracted features?
0 个评论
采纳的回答
Walter Roberson
2021-7-25
So use one row for each sample, and the columns are the concatenated features, one row for each sample.
4 个评论
Walter Roberson
2021-7-27
No, that is not required, it is just a good idea.
You could instead do cascade of 1-versus-the-rest tests. Construct an SVM that classifies everything in one of the classes as one class, and everything else in a second class. Then remove the first class from the data and classify a second class as one class, versus everything else. Then remove the second class, do third versus everything and so on.
The classification process would be to first apply the first SVM against the input data. If it says that the data is the first class, then you accept that and stop. Otherwise, you run the data gainst the second SVM set; if it says that the data is in the noted class, you accept that and stop (class #2); otherwise you run against the third SVM, and so on. You could end up using up to (number of classes minus one) SVM predictions to do the final decision (between last class versus second-last class).
You can do this. It was the historic approach, and it only requires using binary SVM at any point, never any multiclass SVM.
However... this is not very robust. The order you do the classes can turn out to be important. The SVM ECOC approach https://www.mathworks.com/help/stats/fitcecoc.html#bufm0tv takes care to account for this, and uses error coding theory to try to provide the best classification.
You are not required to use the Multi Class SVM functions; it is just a good idea to do so, as the theory behind the routines has already been designed to produce good results for cases where classes are close together, and for cases where there might be noise in the observation inputs.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!