|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectliblinear.Parameter
public final class Parameter
| Constructor Summary | |
|---|---|
Parameter(SolverType solverType,
double C,
double eps)
|
|
| Method Summary | |
|---|---|
double |
getC()
|
double |
getEps()
|
int |
getNumWeights()
the number of weights |
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 |
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). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Parameter(SolverType solverType,
double C,
double eps)
| Method Detail |
|---|
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 setSolverType(SolverType solverType)
public SolverType getSolverType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||