Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.56k stars 217 forks source link

SVC linear kernel missing coef_ in save and load #215

Closed AtlantixJJ closed 4 years ago

AtlantixJJ commented 4 years ago

Hi, I found that when I save a trained SVC to file and reload it, the coef_ attribute is missing.

According to the code line 486 - 490 in thundersvm.py, model loading for linear kernel are commented, preventing the model from loading linear coef. See https://github.com/Xtra-Computing/thundersvm/blob/d3f3906efe33e979fc9a169ab57c5886ffa103bd/python/thundersvm/thundersvm.py#L486 .

Would you please take a look at this? This makes it impossible to reload a SVC linear.

QinbinLi commented 4 years ago

Hi @AtlantixJJ ,

We have fixed this issue. Now you should be able to load the coef_ successfully. You can update the library and try again. Thanks.