Differences between kernels for fitecoc function?
이전 댓글 표시
I am building a multi-class classifier using fitecoc and have started playing with different learners and I started with multiclass logistic regression as the most basic one (templateLinear('Learners', 'logistic')). Then, I wanted to try linear SVM, but I am struggling to understand what is the difference between (templateLinear('Learners', 'svm')) and (templateSVM('KernelFunction', 'linear')) as they give different performance accuracy (84 vs. 86%)?
답변 (1개)
Shivani
2023년 9월 13일
0 개 추천
Hi Matej,
Both the "templateLinear(‘Learners’,’svm’)” and “templateSVM(‘Kernelfunction’,’linear’)” are useful in building Support Vector Machine templates for training classifiers with a linear kernel function.
Their prominent difference is that:
- “templateLinear()” will typically build an ensemble of linear SVMs and by default will be useful for multiclass models.
- However, “templateSVM()” will create a binary classifier by default which must then be combined with the error correcting output codes (ECOC) approach to handle multiple classes.
The potential reason behind the dissimilarity is that the default hyperparameters for both the functions are not the same. Fine tuning these hyperparameters to be the same, can help in providing a more robust comparison between the two.
For more information, please view the official documentation:
- templateLinear(): https://www.mathworks.com/help/stats/templatelinear.html
- templateSVM(): https://www.mathworks.com/help/stats/templatesvm.html
Hope this helps!
카테고리
도움말 센터 및 File Exchange에서 Classification Ensembles에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!