how can i solve this errore in svmtrain?

1 次查看(过去 30 天)
i have some problem with svmtrain. i extract some pixel form different frame and base on their value in 3 channels train with svm i have about 20000 pixel and when i use svmtrain sometimes i get this error but when my pixel is low for example 100 pixel i dont get this error
??? Error using ==> svmtrain at 197
TRAINING data must not contain missing values
i use matlabR2009 7.8
do you have any suggestion ?please help me?
options = optimset('maxiter',1000);
svmstruct_linear=svmtrain(train_y,target_y);
svmstruct_quadratic=svmtrain(train_y,target_y,'Kernel_Function','quadratic','Method','QP',...
'quadprog_opts',options);
  1 个评论
Walter Roberson
Walter Roberson 2012-10-25
Stray thought: could it be that when you use a small number of pixels, you do not happen to have any pixels with value 0, but that you get a 0 when you use the full set of pixels?
I do not know if 0 is special to svmtrain, but I could imagine it being special in the class information (i.e., target_y in your case)

请先登录,再进行评论。

回答(1 个)

Alan Weiss
Alan Weiss 2012-10-25
Did you check whether there are any NaN values in train_y or target_y? For example, examine
sum(isnan(train_y) + isinf(train_y))
Alan Weiss
MATLAB mathematical toolbox documentation

类别

Help CenterFile Exchange 中查找有关 Two y-axis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by