Info

此问题已关闭。 请重新打开它进行编辑或回答。

Support Vector Machine. Help please.

1 次查看(过去 30 天)
Pramod Bhat
Pramod Bhat 2012-3-28
关闭: MATLAB Answer Bot 2021-8-20
*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)

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by