public class Distribution extends Iced
Modifier and Type | Class and Description |
---|---|
static class |
Distribution.Family |
Modifier and Type | Field and Description |
---|---|
Distribution.Family |
distribution |
double |
huberDelta |
static double |
MAX |
static double |
MIN_LOG |
double |
quantileAlpha |
double |
tweediePower |
Constructor and Description |
---|
Distribution(Distribution.Family family) |
Distribution(Model.Parameters params) |
Modifier and Type | Method and Description |
---|---|
double |
deviance(double w,
double y,
double f)
Deviance of given distribution function at predicted value f
|
static double |
exp(double x) |
static java.lang.String |
expString(java.lang.String x) |
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)
|
static double |
log(double x) |
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)
|
void |
setHuberDelta(double huberDelta) |
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal, writeJSON
public static double MIN_LOG
public static double MAX
public final Distribution.Family distribution
public final double tweediePower
public final double quantileAlpha
public double huberDelta
public Distribution(Distribution.Family family)
public Distribution(Model.Parameters params)
params
- public void setHuberDelta(double huberDelta)
public static double exp(double x)
public static double log(double x)
public static java.lang.String expString(java.lang.String x)
public 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 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 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)