SVM Training: prediction do not give expected result for 1 column feature
1 次查看(过去 30 天)
显示 更早的评论
I only have observation with one feature (column) only
- The positive observation have values with 83% below 1 (so 17% above 1). Number of positive observation is 8K only
- Negative observation have values with 74% above 1 (so 16% below 1).Number of negative observation is 105KI feed those observation into matlab function fitcsvm:
svmStruct = fitcsvm(features,Y,'Standardize',true, 'Prior','uniform','KernelFunction','linear','KernelScale','auto','Verbose',1,'IterationLimit',1000000);
I expecting when I run predict to give me 1 for positives feature because it trained for most positive features are less than 1 and most negative features are greater than one. However when run predict
[label,score,cost]= predict(svmStruct, postive_features) ;
all label are zero, which is not an expected answer. I dont know why? does SVM works when there is only 1 features?
Notice, also I got message " SVM optimization did not converge to the required tolerance." after running fitcsvm
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!