public abstract class Distribution extends Iced<Distribution>
Modifier and Type | Field and Description |
---|---|
hex.genmodel.utils.DistributionFamily |
_family |
double |
_huberDelta |
LinkFunction |
_linkFunction |
double |
_quantileAlpha |
double |
_tweediePower |
Constructor and Description |
---|
Distribution(hex.genmodel.utils.DistributionFamily family) |
Distribution(hex.genmodel.utils.DistributionFamily family,
LinkFunction lf) |
Distribution(Model.Parameters params) |
Distribution(Model.Parameters params,
LinkFunction lf) |
Modifier and Type | Method and Description |
---|---|
double |
deviance(double w,
double y,
double f)
Deviance of given distribution function at predicted value f
|
double |
gammaDenom(double w,
double y,
double z,
double f)
Contribution to denominator for GBM's leaf node prediction
|
double |
gammaNum(double w,
double y,
double z,
double f)
Contribution to numerator for GBM's leaf node prediction
|
double |
initFDenom(double w,
double o,
double y)
Contribution to denominator for initial value computation
|
double |
initFNum(double w,
double o,
double y)
Contribution to numerator for initial value computation
|
double |
link(double f)
Canonical link
|
double |
linkInv(double f)
Canonical link inverse
|
java.lang.String |
linkInvString(java.lang.String f)
String version of link inverse (for POJO scoring code generation)
|
double |
negHalfGradient(double y,
double f)
(Negative half) Gradient of deviance function at predicted value f, for actual response y
This assumes that the deviance(w,y,f) is w*deviance(y,f), so the gradient is w * d/df deviance(y,f)
|
double |
negHalfGradient(double y,
double f,
int l)
(Negative half) Gradient of deviance function at predicted value f, for actual response y
This assumes that the deviance(w,y,f) is w*deviance(y,f), so the gradient is w * d/df deviance(y,f)
|
void |
reset()
Method useful for custom distribution only.
|
void |
setHuberDelta(double huberDelta)
Setter of huber delta.
|
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonBytes, toJsonString, write, writeExternal, writeJSON
public final double _tweediePower
public final double _quantileAlpha
public double _huberDelta
public LinkFunction _linkFunction
public final hex.genmodel.utils.DistributionFamily _family
public Distribution(hex.genmodel.utils.DistributionFamily family, LinkFunction lf)
public Distribution(hex.genmodel.utils.DistributionFamily family)
public Distribution(Model.Parameters params, LinkFunction lf)
public Distribution(Model.Parameters params)
public void setHuberDelta(double huberDelta)
huberDelta
- public double link(double f)
f
- value in original space, to be transformed to link spacepublic double linkInv(double f)
f
- value in link space, to be transformed back to original spacepublic java.lang.String linkInvString(java.lang.String f)
f
- value to be transformed by link inversepublic double deviance(double w, double y, double f)
w
- observation weighty
- (actual) responsef
- (predicted) response in original response space (including offset)public double negHalfGradient(double y, double f)
y
- (actual) responsef
- (predicted) response in link space (including offset)public double negHalfGradient(double y, double f, int l)
y
- (actual) responsef
- (predicted) response in link space (including offset)l
- (class label) label of a class (converted lexicographically from original labels to 0-number of class - 1)public double initFNum(double w, double o, double y)
w
- weighto
- offsety
- responsepublic double initFDenom(double w, double o, double y)
w
- weighto
- offsety
- responsepublic double gammaNum(double w, double y, double z, double f)
w
- weighty
- responsez
- residualf
- predicted value (including offset)public double gammaDenom(double w, double y, double z, double f)
w
- weighty
- responsez
- residualf
- predicted value (including offset)public void reset()