Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Support Vector Machine. Help please.

1 vue (au cours des 30 derniers jours)
Pramod Bhat
Pramod Bhat le 28 Mar 2012
Clôturé : MATLAB Answer Bot le 20 Août 2021
*Hai...I wanted to use SVM classifier code given in MATLAB. The problem is that the classifier is not giving correct classification even if i use some of the same training data as test data. What is the problem here ? Please help. thanks in advance. * load data %the features are saved in tha data file 'data'. close all
clc
load data %the features are saved in tha data file 'data'. 'matrix' is a matrix containing 7 columns(7 features). There are 38 observations( that means 38 rows).
data = [matrix(:,1), matrix(:,2)];%selects 1st and 2nd column as training data.
svmStruct = svmtrain(data,species,'Showplot',true);
%test=[matrix(:,3),matrix(:,)];
test=[ 0.0113 0.2382 ] % one of the elements of the training data used as test data.
classes = svmclassify(svmStruct,test)

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by