knn ans SVM where svm returns error
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
nkumar
am 2 Mai 2013
Kommentiert: Greg Heath
am 10 Feb. 2015
I am using knn and svm for classification
i get correct answer using knn,but if i use svm it returns wrong result
for examples
my train dataset is
datsig1 =
2551 1973
2816 2887
7070 6897
2873 2979
2588 2675
1712 2274
909 4859
792 4914
1823 7162
878 5039
885 5534
S=
2873 2979
groups=[1;1;1;1;1;1;0;0;0;0;0]
i get 0 if i classify uing svm
kindly help
cl = svmtrain(datsig1,group);
result = svmclassify(cl,S)
result =
0
0 Kommentare
Akzeptierte Antwort
Shashank Prasanna
am 2 Mai 2013
groups=[1;1;1;1;1;1;0;0;0;0;0]
cl = svmtrain(datsig1,groups);
result = svmclassify(cl,S)
result =
1
This gave me the right results. What version of MATLAB are you using? Clear your workspace and try it from start.
Also as with all classification algorithm results are completely dependent on your training data and also options in the classification method try different kernels etc.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!