hu.birot.OTKit.learning
Class OnlineLearningExamples

java.lang.Object
  extended by hu.birot.OTKit.learning.OnlineLearningExamples

public class OnlineLearningExamples
extends java.lang.Object

Provides concrete online learning algorithms.

See Also:
OnlineLearning

Constructor Summary
OnlineLearningExamples()
           
 
Method Summary
static OnlineLearning allDemotion(double plasticity)
          Error-driven online learning, demoting all loser preferring constraints by plasticity.
static OnlineLearning demotionOnly(double plasticity)
          Error-driven onine learning, demoting the highest ranked loser prefering constraint by w*plasticity, where w is the number of winner preferring constraints.
static OnlineLearning EDCD()
          Error-driven online learning, using Tesar and Smolensky's update rule.
static OnlineLearning ErrorDriven(ConstraintMotion cm)
          General error-driven update of the grammar, based on a piece of learning data.
static OnlineLearning GLA(double plasticity)
          Error-driven online learning, using Boersma's update rule.
static OnlineLearning localBoersma(double plasticity)
           
static OnlineLearning localMagri(double plasticity)
           
static OnlineLearning localOptima(ConstraintMotion cm_w, ConstraintMotion cm_l)
          An approach to online learning based on the heuristic that the winner must be locally optimal, and the loser must not.
static OnlineLearning localOptimaReversed(ConstraintMotion cm_w, ConstraintMotion cm_l)
          An approach to online learning based on the heuristic that both the winner and the loser must be locally optimal.
static OnlineLearning Magri(double plasticity)
          Error-driven online learning, using Magri's update rule.
static OnlineLearning singleDemotionOnly(double plasticity)
          Error-driven online learning, demoting only the highest ranked loser preferring constraint by plasticity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlineLearningExamples

public OnlineLearningExamples()
Method Detail

ErrorDriven

public static OnlineLearning ErrorDriven(ConstraintMotion cm)

General error-driven update of the grammar, based on a piece of learning data.

The learn(Grammar G, Production P, Candidate cand) method of this OnlineLearning works as follows:

The learner is given the piece of data cand (the "winner"). She extracts the underlying form cand.uf, and employs her Grammar G and method of production P to produce her output for cand.uf (the "loser"). Finally, she updates her grammar G based on the discrepancy between the winner and the loser, by employing the update rule defined by parameter cm.

Parameters:
cm - Method of updating the grammar, given a winner-loser pair.
Returns:
An error-driven OnlineLearning approach.

GLA

public static OnlineLearning GLA(double plasticity)

Error-driven online learning, using Boersma's update rule.

Parameters:
plasticity - The plasticity in Boersma's update rule.
Returns:
Boersma's GLA, with the plasticity defined as the argument.
See Also:
ConstraintMotionExamples.Boersma(double)

Magri

public static OnlineLearning Magri(double plasticity)

Error-driven online learning, using Magri's update rule.

Parameters:
plasticity - The plasticity in Magri's update rule.
Returns:
Giorgio Magri's learning algorithm, based on the handout of his presentation in at the LMA workshop in Osnabrueck (March 2009).
See Also:
ConstraintMotionExamples.Magri(double)

demotionOnly

public static OnlineLearning demotionOnly(double plasticity)

Error-driven onine learning, demoting the highest ranked loser prefering constraint by w*plasticity, where w is the number of winner preferring constraints.

Parameters:
plasticity -
Returns:
An error-driven gradual learning with demotion only.
See Also:
ConstraintMotionExamples.demotionOnly(double)

singleDemotionOnly

public static OnlineLearning singleDemotionOnly(double plasticity)

Error-driven online learning, demoting only the highest ranked loser preferring constraint by plasticity.

Parameters:
plasticity -
Returns:
An error-driven gradual learning with demotion only.
See Also:
ConstraintMotionExamples.singleDemotionOnly(double)

allDemotion

public static OnlineLearning allDemotion(double plasticity)

Error-driven online learning, demoting all loser preferring constraints by plasticity.

Parameters:
plasticity -
Returns:
An error-driven gradual learning with demotion only.
See Also:
ConstraintMotionExamples.allDemotion(double)

EDCD

public static OnlineLearning EDCD()

Error-driven online learning, using Tesar and Smolensky's update rule. See ConstraintMotionExamples.TesarSmolensky(plasticity).

Returns:
classic EDCD online learning.

localOptima

public static OnlineLearning localOptima(ConstraintMotion cm_w,
                                         ConstraintMotion cm_l)

An approach to online learning based on the heuristic that the winner must be locally optimal, and the loser must not.

This method returns an instance of OnlineLearning whose learn(Grammar G, Production P, Candidate cand) method works as follows: Candidate cand is the winner (piece of learning data given to the learner), whereas a loser is produced by P based on G. Let bnw be the best neighbor of the winner (cand) and let bnl be the best neighbor of the loser, both with respect to grammar G (the topology and hierarchy in G). Subsequently, G is updated by cm_w with cand taking the winner's position and bnw taking the loser's position (the idea being that cand must be better than its best neighbor). Finally, G is further updated by cm_l with bnl taking the winner's position and the loser taking the loser's position (the idea being that the loser must be worse than its best neighbor).

Parameters:
cm_w - Update method used to implement the idea that winner must be better than its best neighbor.
cm_l - Update method used to implement the idea that loser must be worse than its best neighbor.
Returns:
An instance of OnlineLearning, as described above.

localBoersma

public static OnlineLearning localBoersma(double plasticity)

localMagri

public static OnlineLearning localMagri(double plasticity)

localOptimaReversed

public static OnlineLearning localOptimaReversed(ConstraintMotion cm_w,
                                                 ConstraintMotion cm_l)

An approach to online learning based on the heuristic that both the winner and the loser must be locally optimal.

This method returns an instance of OnlineLearning whose learn(Grammar G, Production P, Candidate cand) method works as follows: Candidate cand is the winner (piece of learning data given to the learner), whereas a loser is produced by P based on G. Let bnw be the best neighbor of the winner (cand) and let bnl be the best neighbor of the loser, both with respect to grammar G (the topology and hierarchy in G). Subsequently, G is updated by cm_w with cand taking the winner's position and bnw taking the loser's position (the idea being that cand must be better than its best neighbor). Finally, G is further updated by cm_l with the loser taking the winner's position and bnl taking the loser's position (the idea being that the loser must be better than its best neighbor).

In fact, the heuristic is that the loser should not be locally optimal. Therefore cm_l is usually a constraint demotion with a negative plasticity value.

Parameters:
cm_w - Update method used to implement the idea that winner must be better than its best neighbor.
cm_l - Update method used to implement the idea that loser must be worse than its best neighbor.
Returns:
An instance of OnlineLearning, as described above.