@PublicationReference(author={"Koby Crammer","Yoram Singer"}, title="Ultraconservative Online Algorithms for Multiclass Problems", year=2003, type=Journal, publication="Journal of Machine Learning Research", pages={951,991}, url="http://portal.acm.org/citation.cfm?id=944936") public class OnlineBinaryMarginInfusedRelaxedAlgorithm extends AbstractLinearCombinationOnlineLearner
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_MIN_MARGIN
The default minimum margin is 0.0.
|
static boolean |
DEFAULT_UPDATE_BIAS
MIRA does not use a bias by default.
|
protected double |
minMargin
The minimum margin to enforce.
|
updateBiasvectorFactory| Constructor and Description |
|---|
OnlineBinaryMarginInfusedRelaxedAlgorithm()
Creates a new
OnlineBinaryMarginInfusedRelaxedAlgorithm with
default parameters. |
OnlineBinaryMarginInfusedRelaxedAlgorithm(double minMargin)
Creates a new
OnlineBinaryMarginInfusedRelaxedAlgorithm with
the given minimum margin. |
OnlineBinaryMarginInfusedRelaxedAlgorithm(double minMargin,
VectorFactory<?> vectorFactory)
Creates a new
OnlineBinaryMarginInfusedRelaxedAlgorithm with
the new minimum margin. |
| Modifier and Type | Method and Description |
|---|---|
protected <InputType> |
computeUpdate(DefaultKernelBinaryCategorizer<InputType> target,
InputType input,
boolean actualCategory,
double predicted)
Compute the update weight in the linear case.
|
protected double |
computeUpdate(LinearBinaryCategorizer target,
Vector input,
boolean actualCategory,
double predicted)
Compute the update weight in the linear case.
|
double |
getMinMargin()
Gets the minimum margin to enforce.
|
protected <InputType> |
initialize(DefaultKernelBinaryCategorizer<InputType> target,
InputType input,
boolean actualCategory)
Initializes the kernel binary categorizer.
|
protected void |
initialize(LinearBinaryCategorizer target,
Vector input,
boolean actualCategory)
Initializes the linear binary categorizer.
|
void |
setMinMargin(double minMargin)
Gets the minimum margin to enforce.
|
computeDecay, computeDecay, computeRescaling, computeRescaling, createInitialLearnedObject, isUpdateBias, setUpdateBias, update, updatecreateKernelLearner, learn, update, update, updatecreateInitialLearnedObject, getVectorFactory, setVectorFactory, updateupdateclone, learn, learn, updateequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdatelearnlearncreateInitialLearnedObject, update, updateclonepublic static final boolean DEFAULT_UPDATE_BIAS
public static final double DEFAULT_MIN_MARGIN
protected double minMargin
public OnlineBinaryMarginInfusedRelaxedAlgorithm()
OnlineBinaryMarginInfusedRelaxedAlgorithm with
default parameters.public OnlineBinaryMarginInfusedRelaxedAlgorithm(double minMargin)
OnlineBinaryMarginInfusedRelaxedAlgorithm with
the given minimum margin.minMargin - The minimum margin to enforce. Must be non-negative.public OnlineBinaryMarginInfusedRelaxedAlgorithm(double minMargin,
VectorFactory<?> vectorFactory)
OnlineBinaryMarginInfusedRelaxedAlgorithm with
the new minimum margin.minMargin - The minimum margin to enforce. Must be non-negative.vectorFactory - The factory to use to create vectors.public double getMinMargin()
public void setMinMargin(double minMargin)
minMargin - The minimum margin. Cannot be negative.protected void initialize(LinearBinaryCategorizer target, Vector input, boolean actualCategory)
AbstractLinearCombinationOnlineLearnerinitialize in class AbstractLinearCombinationOnlineLearnertarget - The categorizer to initialize.input - The first input seen.actualCategory - The actual category of the first input.protected double computeUpdate(LinearBinaryCategorizer target, Vector input, boolean actualCategory, double predicted)
AbstractLinearCombinationOnlineLearnercomputeUpdate in class AbstractLinearCombinationOnlineLearnertarget - Target to compute the update for.input - Input to use in computing the update.actualCategory - The actual category of the input.predicted - The predicted category of the input.protected <InputType> void initialize(DefaultKernelBinaryCategorizer<InputType> target, InputType input, boolean actualCategory)
AbstractLinearCombinationOnlineLearnerinitialize in class AbstractLinearCombinationOnlineLearnerInputType - The input value for learning.target - The categorizer to initialize.input - The first input seen.actualCategory - The actual category of the first input.protected <InputType> double computeUpdate(DefaultKernelBinaryCategorizer<InputType> target, InputType input, boolean actualCategory, double predicted)
AbstractLinearCombinationOnlineLearnercomputeUpdate in class AbstractLinearCombinationOnlineLearnerInputType - The input value for learning.target - Target to compute the update for.input - Input to use in computing the update.actualCategory - The actual category of the input.predicted - The predicted category of the input.