cjlin1 / libsvm

LIBSVM -- A Library for Support Vector Machines
https://www.csie.ntu.edu.tw/~cjlin/libsvm/
BSD 3-Clause "New" or "Revised" License
4.55k stars 1.64k forks source link

Removed the '-1' key in the support vector representation. #36

Closed sagi closed 5 years ago

sagi commented 9 years ago

The function get_SV() in svm.py returns the support vectors. It accidently adds a '-1' key in the dictionary that represents a support vector.

The '-1' is used by the C implementation to denote the last svm_node of a vector in the training set x.

cjlin1 commented 5 years ago

Many thanks for pointing out this problem. The patch has been applied for the next release.