mljs / libsvm

LIBSVM for the browser and nodejs :fire:
https://mljs.github.io/libsvm/
BSD 3-Clause "New" or "Revised" License
82 stars 14 forks source link

Invalid documentation or API #15

Closed notadamking closed 5 years ago

notadamking commented 5 years ago

The documentation states that the SVM.predict function has the signature:

predict(samples: Array<Array<number>>): Array<number>

however, the function actually returns Array<Array>. This is an invalid response and is difficult to interpret.

The SVM.predictOne function is also incorrect. This is the signature:

predictOne(sample: Array<number>): number

however, the function returns Array, again an invalid response.