protected class SuccessiveOverrelaxation.Entry extends DefaultWeightedValue<InputType> implements java.lang.Comparable<SuccessiveOverrelaxation.Entry>
Entry
class represents the data that the algorithm keeps
about each training example.DefaultWeightedValue.WeightComparator
Modifier and Type | Field and Description |
---|---|
protected InputOutputPair<? extends InputType,? extends java.lang.Boolean> |
example
The example the data pertains to.
|
protected boolean |
output
The output represented as a raw boolean, to enforce that the label
exists.
|
protected double |
outputDouble
The output converted to a double form (+1.0 or -1.0).
|
protected double |
previousStepWeight
The weight of the entry on the previous step.
|
protected double |
selfKernel
This is the value of the kernel applied to the example and itself.
|
protected boolean |
supportInserted
Indicates if the support vector has been inserted into the map of
support vectors or not.
|
value
DEFAULT_WEIGHT, weight
Modifier | Constructor and Description |
---|---|
protected |
Entry(InputOutputPair<? extends InputType,? extends java.lang.Boolean> example)
Creates a new
Entry for the given example. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SuccessiveOverrelaxation.Entry other)
Compares this entry to another one by comparing the weights.
|
InputType |
getInput()
Gets the input that the data belongs to.
|
boolean |
getOutput()
Gets the output value of the entry as a boolean.
|
double |
getUnlabeledWeight()
Gets the unlabeled weight.
|
void |
setUnlabeledWeight(double unlabeledWeight)
Sets the unlabeled weight.
|
clone, create, getValue, setValue
getWeight, setWeight
protected InputOutputPair<? extends InputType,? extends java.lang.Boolean> example
protected boolean output
protected double outputDouble
protected boolean supportInserted
protected double selfKernel
protected double previousStepWeight
protected Entry(InputOutputPair<? extends InputType,? extends java.lang.Boolean> example)
Entry
for the given example.example
- The example to create the entry for.public InputType getInput()
public boolean getOutput()
public void setUnlabeledWeight(double unlabeledWeight)
unlabeledWeight
- The unlabeled weight.public double getUnlabeledWeight()
public int compareTo(SuccessiveOverrelaxation.Entry other)
compareTo
in interface java.lang.Comparable<SuccessiveOverrelaxation.Entry>
other
- The entry to compare to.