Wanted to use the function multisvm under Image Processing, since it has been removed, please suggest an alternative for the same.

5 ビュー (過去 30 日間)
result = multisvm(Train_Feat);

回答 (1 件)

Mrutyunjaya Hiremath
Mrutyunjaya Hiremath 2023 年 8 月 17 日
'multisvm' was never a built-in MATLAB function but seems to be a user-provided one that has been circulated in various forums and online platforms for multi-class SVM classification. MATLAB has the Statistics and Machine Learning Toolbox, which provides a way to perform multi-class classification with SVM.
Here's a rough outline of how you might use the built-in functions for a multi-class SVM:
Train the SVM:
When using the fitcecoc function, it internally trains binary SVM classifiers for each pair of classes and uses them for multi-class classification.
t = templateSVM('KernelFunction', 'polynomial', 'PolynomialOrder', 2);
Mdl = fitcecoc(Train_Feat, Train_Label, 'Learners', t);
Where 'Train_Feat' are your training features and 'Train_Label' are your training labels.
Predict using the trained SVM:
result = predict(Mdl, Test_Feat);
Where 'Test_Feat' are your test features.
It's quite straightforward using the built-in functions, and they're optimized and well-integrated into MATLAB's ecosystem.
Note: Ensure you have the Statistics and Machine Learning Toolbox installed and licensed in MATLAB.

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by