New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SVM types to match libsvm-js parameters #144
Conversation
Hi @adamjking3 ! Thank you so much for your contribution and picking up these bugs! I think there are some minor issues in the build, which can be resolved very easily
https://ci.appveyor.com/project/JasonShin/kalimdorjs/builds/20565138/job/e42l1r9baxm1n8bi
and Other than that, everything looks perfect! =) |
Hi @JasonShin, I started to fix the unit tests and the tests in the I have opened an issue, explaining the bug here mljs/libsvm#15. However, after opening the issue, I have realized that I can only reproduce the bug within this library. Creating an entirely new repo and copying their documentation produces the correct results, however copying their documentation within this repo produces invalid results. I am still looking into this to see why this is happening. |
Hey @adamjking3,
Are you seeing this issue in the SVM unit test file? Please note that there is a Jest mock in the test file that looks like
Above code block simply bypasses libsvm.js's implementation details, which allows us to focus on testing our own code. |
Ah, of course, not sure how I missed that! I will remove my silly issue from the other repo and get the unit tests fixed tonight, then update this PR. Thanks for your help, @JasonShin |
Don't forget to add yourself as a contributor using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!!
I will create a patch after merging this so you can start using Kalimdor =) !! |
Thanks again! |
I've run @devjiro76 please make a new PR, cheers |
@adamjking3 Congratulations on your first contribution to Kalimdor.js and welcome to the community! |
Please feel free to join our Telegram chat https://t.me/joinchat/Hj2nWgsslUN0BWGi0CEOHg =) |
Reference: https://github.com/mljs/libsvm
Bug fix
The SVM fit, predict, and predictOne functions have incorrect TS typings, causing them to not work correctly with libsvm-js.
Fix the typings to match the required parameters for libsvm-js.