public class Distribution extends Iced
Modifier and Type | Class and Description |
---|---|
static class |
Distribution.Family |
Modifier and Type | Field and Description |
---|---|
Distribution.Family |
distribution |
static double |
MAX |
static double |
MIN_LOG |
double |
tweediePower |
Constructor and Description |
---|
Distribution(Distribution.Family distribution)
Short constructor for non-Tweedie distributions
|
Distribution(Distribution.Family distribution,
double tweediePower)
Constructor to be used for Tweedie (and if uncertain)
|
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 |
gradient(double y,
double f)
Gradient of given distribution function at predicted value f
|
double |
initFDenom(double w,
double o)
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) |
clone, frozenType, read_impl, read, readExternal, readJSON_impl, readJSON, toJsonString, write_impl, write, writeExternal, writeJSON_impl, writeJSON
public static double MIN_LOG
public static double MAX
public final Distribution.Family distribution
public final double tweediePower
public Distribution(Distribution.Family distribution)
distribution
- public Distribution(Distribution.Family distribution, double tweediePower)
distribution
- tweediePower
- Tweedie Powerpublic 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 spacepublic double gradient(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)
w
- weighto
- offsetpublic 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)