Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Support Vector Machine. Help please.

1 Ansicht (letzte 30 Tage)
Pramod Bhat
Pramod Bhat am 28 Mär. 2012
Geschlossen: MATLAB Answer Bot am 20 Aug. 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)

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by