Add multi class model and Platt scaling#112
Conversation
Sauro98
left a comment
There was a problem hiding this comment.
Good work, nice to have a unified multi-class model 🚀
I would just add a note about the difference in the SVM params with bool or Pr also in the parameters' documentation so that the user doesn't have to go look in the example.
|
I saw that you linked the paper at https://www.csie.ntu.edu.tw/~cjlin/papers/plattprob.pdf in your explanation. It's totally possible that I missed it, but I couldn't find the first half of the // avoid numerical problems for large f_apb
if f_apb >= 0.0 {
Pr((-f_apb).exp() / (1.0 + (-f_apb).exp()))
} else {
Pr(1.0 / (1.0 + f_apb.exp()))
}loop that you use for numerical stability with |
good point 👍 I'm not 100% sure why the compiler can't figure out when to use
yes you just have to multiply both sides with thank you both, I will complete the PR now and then merge |
Codecov Report
@@ Coverage Diff @@
## master #112 +/- ##
==========================================
- Coverage 58.32% 58.15% -0.18%
==========================================
Files 75 77 +2
Lines 6695 6813 +118
==========================================
+ Hits 3905 3962 +57
- Misses 2790 2851 +61
Continue to review full report at Codecov.
|
629914a to
b696a25
Compare
b696a25 to
53a173f
Compare
Composing model for binary to multi-class transformation, WIP
MultiClassModelExample