stanfordmlgroup / ngboost

Natural Gradient Boosting for Probabilistic Prediction
Apache License 2.0
1.65k stars 215 forks source link

implement categorical distribution for multiclass classification #56

Closed alejandroschuler closed 4 years ago

alejandroschuler commented 4 years ago

https://github.com/stanfordmlgroup/ngboost/commit/87386b69f9eeba9e0f65c4afc4e8e7b187df0c2c

Notes:

still to do:

alejandroschuler commented 4 years ago

note: may also want to change the distributions accepting the transpose of the params... makes the code annoying

chemadix commented 4 years ago

if my k classes were defined from a number different from "0" (e.g. from 1 to 10); how can the paremeter Dist can be modified? Is it necesary to use k_categorical?

alejandroschuler commented 4 years ago

@chemadix it is a requirement that the classes be 0,1,2... K-1 for Dist=k_categorical(K). You have to transform your Y so they are numbered that way before running ngboost. In the case you describe, just take Y=Y-1.