mulan.classifier.neural
Class MMPUniformUpdateRule

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

public class MMPUniformUpdateRule
extends MMPUpdateRuleBase

Implementation of uniform update rule for MMPLearner. The rule will penalize each wrongly order pair of labels by same amount.

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
MMPUniformUpdateRule(List<Neuron> perceptrons, RankingLossFunction lossMeasure)
          Creates a new instance of MMPUniformUpdateRule.
 
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

MMPUniformUpdateRule

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

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