how to use histogram values in svm classifier

3 vues (au cours des 30 derniers jours)
diviya Subramanian
diviya Subramanian le 25 Fév 2016
Réponse apportée : Ayush le 21 Oct 2024
generated histogram values but need matlab code to use this in svm classifier

Réponses (1)

Ayush
Ayush le 21 Oct 2024
Hi,
Once you have computed the histogram features, you can make use of the “fitcsvm” function to pass the histogram features in the function in order to train the SVM classifier. Refer to an example use of the “fitcsvm” function:
labels = [1, -1, 1, -1]; % Example labels
SVMModel = fitcsvm(histFeatures, labels, 'KernelFunction', 'linear');
After the model is trained you can use the “predict” function to predict new data.
For more information on the “fitcsvm” function and “predict" function, refer to the below documentation:

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by