public final class Parameter
extends java.lang.Object
| Constructor and Description |
|---|
Parameter(SolverType solver,
double C,
double eps) |
Parameter(SolverType solverType,
double C,
double eps,
double p) |
Parameter(SolverType solverType,
double C,
double eps,
int max_iters,
double p) |
Parameter(SolverType solver,
double C,
int max_iters,
double eps) |
| Modifier and Type | Method and Description |
|---|---|
double |
getC() |
double |
getEps() |
int |
getMaxIters() |
int |
getNumWeights()
the number of weights
|
double |
getP() |
SolverType |
getSolverType() |
int[] |
getWeightLabels() |
double[] |
getWeights() |
void |
setC(double C)
C is the cost of constraints violation.
|
void |
setEps(double eps)
eps is the stopping criterion.
|
void |
setMaxIters(int iters) |
void |
setP(double p)
set the epsilon in loss function of epsilon-SVR (default 0.1)
|
void |
setSolverType(SolverType solverType) |
void |
setWeights(double[] weights,
int[] weightLabels)
nr_weight, weight_label, and weight are used to change the penalty
for some classes (If the weight for a class is not changed, it is
set to 1).
|
public Parameter(SolverType solver, double C, double eps)
public Parameter(SolverType solver, double C, int max_iters, double eps)
public Parameter(SolverType solverType, double C, double eps, double p)
public Parameter(SolverType solverType, double C, double eps, int max_iters, double p)
public void setWeights(double[] weights,
int[] weightLabels)
nr_weight, weight_label, and weight are used to change the penalty for some classes (If the weight for a class is not changed, it is set to 1). This is useful for training classifier using unbalanced input data or with asymmetric misclassification cost.
Each weight[i] corresponds to weight_label[i], meaning that the penalty of class weight_label[i] is scaled by a factor of weight[i].
If you do not want to change penalty for any of the classes, just set nr_weight to 0.
public double[] getWeights()
setWeights(double[], int[])public int[] getWeightLabels()
setWeights(double[], int[])public int getNumWeights()
setWeights(double[], int[])public void setC(double C)
public double getC()
public void setEps(double eps)
public double getEps()
public void setMaxIters(int iters)
public int getMaxIters()
public void setSolverType(SolverType solverType)
public SolverType getSolverType()
public void setP(double p)
public double getP()