public static enum CSKLR.UpdateMode extends Enum<CSKLR.UpdateMode>
CSKLR.setEta(double)
and CSKLR.setGamma(double)
may change.
Enum Constant and Description |
---|
AUXILIARY_1
Performs model updates based on a "auxiliary" function
a(z) = log(γ + e-z).
|
AUXILIARY_2
Performs model updates based on a "auxiliary" function
a(z) = log(1 + γ e-z).
|
AUXILIARY_3
Performs model updates based on a "auxiliary" function
a(z) = max(loss(z), loss(γ).
|
MARGIN
Performs model updates probabilistically based on their distance from
the margin of the classifier.
|
NC
NC stands for Non-Conservative, this mode will perform a model update
on every new input, creating a very dense model.
|
Modifier and Type | Method and Description |
---|---|
protected abstract double |
grad(double y,
double score,
double preScore,
double gamma)
Get the gradient value that should be applied based on the input
variable from the current model
|
protected abstract double |
pt(double y,
double score,
double preScore,
double eta,
double gamma)
Returns the Bernoulli trial probability variable
|
static CSKLR.UpdateMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CSKLR.UpdateMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CSKLR.UpdateMode NC
learning rate
may take on any positive value,
and CSKLR.setGamma(double)
is not used.public static final CSKLR.UpdateMode MARGIN
CSKLR.setEta(double)
should be less than 2, or the model will become dense.
CSKLR.setGamma(double)
is not used.public static final CSKLR.UpdateMode AUXILIARY_1
gamma
should be in the range (1, Infinity)
where larger values increase the sparsity of the model
public static final CSKLR.UpdateMode AUXILIARY_2
gamma
should be in the range (1, Infinity)
where larger values increase the sparsity of the modelpublic static final CSKLR.UpdateMode AUXILIARY_3
gamma
should be in the range (0, Infinity)
where smaller values increase the sparsity of the modelpublic static CSKLR.UpdateMode[] values()
for (CSKLR.UpdateMode c : CSKLR.UpdateMode.values()) System.out.println(c);
public static CSKLR.UpdateMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullprotected abstract double pt(double y, double score, double preScore, double eta, double gamma)
y
- the sign of the input pointscore
- the logistic regression score for the inputpreScore
- the raw margin before the finaleta
- the learning rategamma
- the gamma variableprotected abstract double grad(double y, double score, double preScore, double gamma)
y
- the sign of the input pointscore
- the logistic regression score for the inputpreScore
- the raw margin before the finalgamma
- the gamma variableCopyright © 2017. All rights reserved.