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

1 次查看(过去 30 天)
result = multisvm(Train_Feat);

回答(1 个)

Mrutyunjaya Hiremath
'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 CenterFile Exchange 中查找有关 Agriculture 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by