SVM TRAIN - WARNING ABOUT SINGULAR MATRIX

조회 수: 8 (최근 30일)
allline
allline 2013년 3월 1일
Hello, I am using SVMTRAIN and sometimes it gives me this warning:
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 5.646367e-131.
What can I do to fix this ? is it really bad if I keep my algo this way ?
thank you
  댓글 수: 2
Ilya
Ilya 2013년 3월 1일
What method are you using, QP or LS?
allline
allline 2013년 3월 3일
편집: allline 2013년 3월 3일
Hi, I am using LS. and I noticed that I have always the warning this problem when the box_constraint is SUPER small (C = 10^-10).
I get the warning not really often for much higher box_constraint.
PS: in order to select the best box constraint, I train and test different SVM with
box_constraint = 10^.[-10 : 1: 10] = [10^-10, 10^-9, ... ,10^10]

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

채택된 답변

Ilya
Ilya 2013년 3월 4일
This warning is thrown by the backslash operator \ when it solves the linear system based on the kernel matrix. You don't need to fix this. You just need to keep in mind that the solution (alphas) in this case is not unique because the matrix is singular. If you'd like to learn more, search Answers or the newsgroup for posts comparing the backslash operator and pinv. If the obtained SVM model is accurate, as measured by cross-validation or using independent test data, use it.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 3월 1일
An rcond that low is pretty much saying that the matrix is singular for numeric purposes. Your results are likely to be quite wrong.
  댓글 수: 2
allline
allline 2013년 3월 1일
편집: allline 2013년 3월 1일
Ok, thanks for your answer. Could you tell me how to fix it? Is it about my input data ?
Walter Roberson
Walter Roberson 2013년 3월 1일
Sorry I am not familiar with the requirements for input to svmtrain()

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

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by