Closed YHSot976 closed 5 years ago
I think I find the problem. Just like what is said in the comment:
If '-v' is specified in 'options' (i.e., cross validation) either accuracy (ACC) or mean-squared error (MSE) is returned.
So if -v
is in svm_train()
, then you won't get a model but ACC or MSE. That's why it's float and there is nothing about svm_type
. So don't pass m
to svm_predict()
if you have -v
in the options.
I'll just leave it here if anyone has this problem.
I'm having problems running k-fold cross validation in python. It gave me an error like in the title. I have no issue running without cross validation. I'm not sure why
-v
could influence-s
parameter. And even if I'm not assigning-s
and using the default value, I'm still gettingget_svm_type()
error. So I don't know what's wrong with my code. My model is likeI didn't find any questions related to this issue. Maybe I totally missed something. Any help would be appreciated.