What standardize method is used in the classification learner app when using a SVM classifier?

16 visualizaciones (últimos 30 días)
I am using the classification learner app in Matlab to train and test a model using a SVM classifier (quadratic). In this app you have the option to standardize the data. What kind of standardizing method is used? And is this done separately for the training set and test set?

Respuesta aceptada

Shubham
Shubham el 12 de Oct. de 2024
Hey Maryam,
You can use the hyparameter options in the Classification learner app to standardize the data while using SVM.
If you have exactly two classes, Classification Learner uses the fitcsvm function to train the classifier. If you have more than two classes, the app uses the fitcecoc function to reduce the multiclass classification problem to a set of binary classification subproblems, with one SVM learner for each subproblem as mentioned here.
To answer your queries:
  • Standardization method: fitcsvm standardizes the predictors using their corresponding weighted means and weighted standard deviations. You can learn about the exact implementation used by refering to Algorithms section of the following documentation.
  • Note that for multiclass classification, since the problem is essentially reduced to binary classification, the standardization method used should be the same.
  • The mean and standard deviation are calculated from the training data, and these statistics are used to standardize the training data.
  • The same mean and standard deviation calculated from the training set are applied to standardize both the training and the test data. This ensures that the test data is transformed in the same way as the training data, ensuring the model’s performance is evaluated correctly.
I hope this answers your query.

Más respuestas (0)

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by