@PublicationReference(title="Confidence-Weighted Linear Classification", author={"Mark Dredze","Koby Crammer","Fernando Pereira"}, year=2008, type=Conference, publication="International Conference on Machine Learning", url="http://portal.acm.org/citation.cfm?id=1390190") public class ConfidenceWeightedDiagonalVariance extends AbstractSupervisedBatchAndIncrementalLearner<Vectorizable,java.lang.Boolean,DiagonalConfidenceWeightedBinaryCategorizer>
| Modifier and Type | Field and Description |
|---|---|
protected double |
confidence
The confidence to use for updating.
|
static double |
DEFAULT_CONFIDENCE
The default confidence is 0.85.
|
static double |
DEFAULT_DEFAULT_VARIANCE
The default variance is 1.0.
|
protected double |
defaultVariance
The default variance, which the diagonal of the covariance matrix is
initialized to.
|
protected double |
phi
Phi is the standard score computed from the confidence.
|
| Constructor and Description |
|---|
ConfidenceWeightedDiagonalVariance()
Creates a new
ConfidenceWeightedDiagonalVariance with default
parameters. |
ConfidenceWeightedDiagonalVariance(double confidence,
double defaultVariance)
Creates a new
ConfidenceWeightedDiagonalVariance with the given
parameters. |
| Modifier and Type | Method and Description |
|---|---|
DiagonalConfidenceWeightedBinaryCategorizer |
createInitialLearnedObject()
Creates a new initial learned object, before any data is given.
|
double |
getConfidence()
Gets the confidence to use for updating.
|
double |
getDefaultVariance()
Gets the default variance, which the diagonal of the covariance matrix is
initialized to.
|
void |
setConfidence(double confidence)
Gets the confidence to use for updating.
|
void |
setDefaultVariance(double defaultVariance)
Sets the default variance, which the diagonal of the covariance matrix is
initialized to.
|
void |
update(DiagonalConfidenceWeightedBinaryCategorizer target,
Vector input,
boolean label)
Updates the target using the given input and associated label.
|
void |
update(DiagonalConfidenceWeightedBinaryCategorizer target,
Vectorizable input,
java.lang.Boolean output)
The
update method updates an object of ResultType using
the given a new supervised input-output pair, using some form of
"learning" algorithm. |
updateclone, learn, learn, updateequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlearnlearnupdateclonepublic static final double DEFAULT_CONFIDENCE
public static final double DEFAULT_DEFAULT_VARIANCE
protected double confidence
protected double defaultVariance
protected double phi
public ConfidenceWeightedDiagonalVariance()
ConfidenceWeightedDiagonalVariance with default
parameters.public ConfidenceWeightedDiagonalVariance(double confidence,
double defaultVariance)
ConfidenceWeightedDiagonalVariance with the given
parameters.confidence - The confidence to use. Must be in [0, 1].defaultVariance - The default value to initialize the covariance matrix to.public DiagonalConfidenceWeightedBinaryCategorizer createInitialLearnedObject()
IncrementalLearnerpublic void update(DiagonalConfidenceWeightedBinaryCategorizer target, Vectorizable input, java.lang.Boolean output)
SupervisedIncrementalLearnerupdate method updates an object of ResultType using
the given a new supervised input-output pair, using some form of
"learning" algorithm.target - The object to update.input - The supervised input to learn from.output - The supervised output to learn from.public void update(DiagonalConfidenceWeightedBinaryCategorizer target, Vector input, boolean label)
target - The target to update.input - The supervised input value.label - The output label associated with the input.public double getConfidence()
public void setConfidence(double confidence)
confidence - The confidence. Must be between 0 and 1, inclusive.public double getDefaultVariance()
public void setDefaultVariance(double defaultVariance)
defaultVariance - The default variance. Must be positive.