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

17 次查看(过去 30 天)
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?

采纳的回答

Shubham
Shubham 2024-10-12
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by