필터 지우기
필터 지우기

Why is the predicted_label +1 even though it should be +1? Using LIBSVM

조회 수: 1 (최근 30일)
sidra
sidra 2014년 1월 27일
댓글: Walter Roberson 2014년 1월 27일
I extracted the principal components of training and testing data. 'trainingdata.train' has feature values from both +1(face 1) and -1(all other faces) labels. 'testdata.train' has feature values from face 2 and no label since i want the SVM to predict its label. The "predicted_label" given by LIBSVM is +1 even though it should be -1.
[training_label_matrix, training_instance_matrix] = libsvmread('trainingdata.train');
[testing_label_matrix, testing_instance_matrix] = libsvmread('testdata.train');
model = svmtrain(training_label_matrix, training_instance_matrix);
[predicted_label] = svmpredict(testing_label_matrix, testing_instance_matrix, model);
Please point me out to what i am doing wrong.
  댓글 수: 1
Walter Roberson
Walter Roberson 2014년 1월 27일
svm is not going to do a good job on data that is not well separated or when not enough examples have been supplied to determine where the separation should be.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by