mulan.classifier.neural
Class MMPRandomizedUpdateRule

java.lang.Object
  extended by mulan.classifier.neural.MMPUpdateRuleBase
      extended by mulan.classifier.neural.MMPRandomizedUpdateRule
All Implemented Interfaces:
ModelUpdateRule

public class MMPRandomizedUpdateRule
extends MMPUpdateRuleBase

Implementation of randomized update rule for MMPLearner. It is a randomized variation of MMPUniformUpdateRule. A opposed to uniformed update, the randomized version will penalize each wrongly order pair of labels by random value from interval <0,1>. Afterwards, the penalty weights are normalized, so their sum is equal to 1.

The model is represented as a list of perceptrons (one for each label), each represented by Neuron. Perceptrons are expected to be in the same order as labels in training data set.

Version:
2012.02.27
Author:
Jozef Vilcek
See Also:
MMPUpdateRuleBase

Constructor Summary
MMPRandomizedUpdateRule(List<Neuron> perceptrons, RankingLossFunction lossMeasure)
          Creates a new instance of MMPRandomizedUpdateRule.
 
Method Summary
protected  double[] computeUpdateParameters(DataPair example, double[] confidences, double loss)
          Computes update parameters for each perceptron which will be subsequently used for updating the weights.
 
Methods inherited from class mulan.classifier.neural.MMPUpdateRuleBase
process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MMPRandomizedUpdateRule

public MMPRandomizedUpdateRule(List<Neuron> perceptrons,
                               RankingLossFunction lossMeasure)
Creates a new instance of MMPRandomizedUpdateRule.

Parameters:
perceptrons - the list of perceptrons, representing the model, which will receive updates.
lossMeasure - the loss measure used to decide when the model should be updated by the rule
Method Detail

computeUpdateParameters

protected double[] computeUpdateParameters(DataPair example,
                                           double[] confidences,
                                           double loss)
Description copied from class: MMPUpdateRuleBase
Computes update parameters for each perceptron which will be subsequently used for updating the weights. The function is called internally from MMPUpdateRuleBase.process(DataPair, Map) function, when update of model for given input example is needed.

Specified by:
computeUpdateParameters in class MMPUpdateRuleBase
Parameters:
example - the input example
confidences - the confidences outputed by the model the input example
loss - the lossFunction measure of the model for given input example
Returns:
the parameters for updating preceptrons