-
Notifications
You must be signed in to change notification settings - Fork 9
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
support for bias different from 1 #8
Comments
Agreed, this seems like a very reasonable addition. |
Hi, I have seen the deprecation notice, so I guess the pull request is not relevant here anymore. Let us keep in touch in case you are interested in it again, one day. Again, many thanks for this very nice project. |
Will do, I'll contact you about a redesign if that is ever in the cards. |
Hey daslu, (2) would be the same thing as simply leaving the bias feature out since w*0=0. |
Thanks, |
The liblinear bias parameter is defined as follows (README.md at commit 7b6c6a56c1 of liblinear java):
https://github.com/bwaldvogel/liblinear-java/blob/master/README.md
"if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1)".
clj-liblinear does support the use of bias (thanks to #4 by @akhudek).
Currently in clj-liblinear, the only supported bias values are 0 and 1:
https://github.com/lynaghk/clj-liblinear/blob/master/src/clj_liblinear/core.clj#L54
Also, the bias=0 case results in not adding the extra featue:
https://github.com/lynaghk/clj-liblinear/blob/master/src/clj_liblinear/core.clj#L64
I suggest to the following changes:
(1) Support all bias values.
(2) Let the bias=0 case behave like documented in liblinear-java: adding an extra feature of value 0.
Reasons for the change:
If desired, I can suggest a pull request with these changes.
What do you think?
The text was updated successfully, but these errors were encountered: