public interface Loss
Modifier and Type | Interface and Description |
---|---|
static class |
Loss.Type
The type of loss.
|
Modifier and Type | Method and Description |
---|---|
static Loss |
huber(double p)
Huber loss function for M-regression, which attempts resistance to
long-tailed error distributions and outliers while maintaining high
efficiency for normally distributed errors.
|
double |
intercept(double[] y)
Returns the intercept of model.
|
static Loss |
lad()
Least absolute deviation regression.
|
static Loss |
logistic(int[] labels)
Logistic regression loss for binary classification.
|
static Loss |
logistic(int c,
int k,
int[] labels,
double[][] p)
Logistic regression loss for multi-class classification.
|
static Loss |
ls()
Least squares regression.
|
static Loss |
ls(double[] y)
Least squares regression.
|
double |
output(int[] nodeSamples,
int[] sampleCount)
Calculate the node output.
|
static Loss |
quantile(double p)
Quantile regression.
|
double[] |
residual()
Returns the residual vector.
|
double[] |
response()
Returns the response variable for next iteration.
|
static Loss |
valueOf(java.lang.String s)
Parses the loss.
|
double output(int[] nodeSamples, int[] sampleCount)
nodeSamples
- the index of node samples to their original locations in training dataset.sampleCount
- samples[i] is the number of sampling of dataset[i]. 0 means that the
datum is not included and values of greater than 1 are
possible because of sampling with replacement.double intercept(double[] y)
y
- the response variable.double[] response()
double[] residual()
static Loss ls()
static Loss ls(double[] y)
static Loss quantile(double p)
p
- the percentile.static Loss lad()
static Loss huber(double p)
p
- of residualsstatic Loss logistic(int[] labels)
labels
- the class labels.static Loss logistic(int c, int k, int[] labels, double[][] p)
c
- the class id that this loss function fits on.k
- the number of classes.labels
- the class labels.p
- the posteriori probabilities.static Loss valueOf(java.lang.String s)