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);
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!