You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the LIBLINEAR website, liblinear and libsvm use the same input format. On my computer, train signals an error when it reads an input file that is successfully parsed by libsvm. I traced the different behavior to line 395 in train.c:
inst_max_index = 0; // strtol gives 0 if wrong format
In libsvm, the same variable is initialized to -1 and changing inst_max_index allows train to read the file successfully, too.
The text was updated successfully, but these errors were encountered:
It looks very likely from both issues you posted that your data set feature enumeration starts with 0, while libsvm and liblinear both require it starts from 1. The counter 0 in libsvm is allowed for precomputed kernel only.
According to the LIBLINEAR website, liblinear and libsvm use the same input format. On my computer,
train
signals an error when it reads an input file that is successfully parsed by libsvm. I traced the different behavior to line 395 intrain.c
:In libsvm, the same variable is initialized to
-1
and changinginst_max_index
allowstrain
to read the file successfully, too.The text was updated successfully, but these errors were encountered: