Muticlass SVM and memory

4 次查看(过去 30 天)
I tried fitcsvm but it's only for binary classification. I want to train the three models from the ClassificationLearner. But I want to compare the memory consumption for each. I used fitctree and fitcknn for decision trees and kNN.
Questions: 1. How can I train a multi class SVM similar to that in ClassificationLearner but in the command window? I tried fitcecoc() but it took too long to train. I'm guessing it's different to the one used in the ClassificationLearner app since training time is too long.
2. How can I compute for the memory consumption? Or computational complexity? Any metric to compare the efficiency of these classifier. Thanks!

回答(1 个)

mizuki
mizuki 2017-2-19
1. ClassificationLearner uses FITCECOC when the number of classes is >2. As you noticed, FITCECOC handles more than two classes. If you want to classify more than two, use FITCECOC or combine several fitcsvm functions. Usually, SVM takes time to get the solution more than other machine learning classification methods.
2. Use profiler Run your code with "Run and Time" button on Editor tab or run the code on the profiler launched with
>> profile viewer
You can see the memory usage of each line of code with the profiler. For more details, please see "Profiling Matlab memory usage"
  1 个评论
Chaine San Buenaventura
I tried using fitcecoc. However, it took too long to train compared to the SVM classifier available in the ClassificationLearner App.
What about computational complexity or energy consumption?
Thanks for your comment.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Classification Ensembles 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by