The Binary MIRA learning algorithm implementation. This algorithm operates very similarly to
SparsePerceptron with a thick separator, except the learning rate is a function of each
training example's margin. When the weight vector has made a mistake, the full
LinearThresholdUnit#learningRate will be used. When the weight vector did not make a
mistake,
LinearThresholdUnit#learningRate is multiplied by the following value before the
update takes place.
(beta/2 - y(w*x)) / ||x||2
In the expression above, w is the weight vector, y represents the label of the
example vector x, * stands for inner product, and beta is a user supplied
parameter. If this expression turns out to be non-positive (i.e., if y(w*x) >= beta/2),
no update is made for that example.
It is assumed that
Learner#labeler is a single discrete classifier that produces the same
feature for every example object and that the values that feature may take are available through
the
Classifier#allowableValues() method. The second value returned from
Classifier#allowableValues() is treated as "positive", and it is assumed there are
exactly 2 allowable values. Assertions will produce error messages if these assumptions do not
hold.
This algorithm's user-configurable parameters are stored in member fields of this class. They may
be set via either a constructor that names each parameter explicitly or a constructor that takes
an instance of
edu.illinois.cs.cogcomp.lbjava.learn.BinaryMIRA.Parameters as
input. The documentation in each member field in this class indicates the default value of the
associated parameter when using the former type of constructor. The documentation of the
associated member field in the
edu.illinois.cs.cogcomp.lbjava.learn.BinaryMIRA.Parameters class indicates the default value of the parameter when using the latter type of
constructor.