Closed alejandroschuler closed 4 years ago
note: may also want to change the distributions accepting the transpose of the params... makes the code annoying
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?
@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
.
https://github.com/stanfordmlgroup/ngboost/commit/87386b69f9eeba9e0f65c4afc4e8e7b187df0c2c
Notes:
ngb = NGBClassifier(Dist=k_categorical(3))
Y
should be an integer array with values from 0 to K indicating the number of the class thatY[i]
takes, as is standard in sklearn.still to do:
fix the(https://github.com/stanfordmlgroup/ngboost/commit/eb3cd4efb447affbb4fa1f0b6ea1ac0cb6931722)predict
method for NGBClassifier to work for multiclass problems