Borrar filtros
Borrar filtros

Differences between kernels for fitecoc function?

1 visualización (últimos 30 días)
Matej Perovnik
Matej Perovnik el 5 de Jul. de 2022
Respondida: Shivani el 13 de Sept. de 2023
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%)?

Respuestas (1)

Shivani
Shivani el 13 de Sept. de 2023
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:
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by