de.unibi.techfak.jpredictor.motifs
Class MotifEvolutionRewardedSelection

java.lang.Object
  extended by de.unibi.techfak.jpredictor.motifs.MotifEvolution
      extended by de.unibi.techfak.jpredictor.motifs.MotifEvolutionES
          extended by de.unibi.techfak.jpredictor.motifs.MotifEvolutionRewardedSelection

public class MotifEvolutionRewardedSelection
extends MotifEvolutionES

Motif evolution with a reward system for selecting motifs. The reward value is measured in terms of entropy (p log p) and multiplied to the weight.


Field Summary
(package private)  java.util.Vector[] posOcc
          For every motif one vector, which contains the number of occurrences in the positive training set.
 
Fields inherited from class de.unibi.techfak.jpredictor.motifs.MotifEvolution
comm, generatingCharacters, generatingDistribution, gML, motifCounter, op, temperature
 
Constructor Summary
MotifEvolutionRewardedSelection(ICommunicator comm)
           
 
Method Summary
(package private)  void fillNewWeights(MotifList ml, double[] w)
          This method fills the array w with the new weights for the motifs.
(package private)  boolean weightMotifLists()
          Only weights the child motif list.
 
Methods inherited from class de.unibi.techfak.jpredictor.motifs.MotifEvolutionES
evolveMotifLists, initMotifLists, selectMotifLists
 
Methods inherited from class de.unibi.techfak.jpredictor.motifs.MotifEvolution
evolveMultiMotif, outputResults, recombineParentSet, restrainMotifList, start, weightMotifs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

posOcc

java.util.Vector[] posOcc
For every motif one vector, which contains the number of occurrences in the positive training set. The array is filled by a call to weightMotifLists() in this class and used by the fillNewWeights(MotifList, double[])-method for changing the motifs weights before the list is restrained.

See Also:
weightMotifLists(), MotifEvolution.weightMotifs(Vector[], Vector[]), fillNewWeights(MotifList, double[])
Constructor Detail

MotifEvolutionRewardedSelection

public MotifEvolutionRewardedSelection(ICommunicator comm)
                                throws java.lang.NullPointerException,
                                       java.lang.IllegalArgumentException
Throws:
java.lang.NullPointerException
java.lang.IllegalArgumentException
Method Detail

weightMotifLists

boolean weightMotifLists()
Only weights the child motif list.

Overrides:
weightMotifLists in class MotifEvolution
Returns:
true, if weighting was successful, false otherwise.
See Also:
MotifEvolution.start(int), MotifEvolution.weightMotifs(Vector[], Vector[])

fillNewWeights

void fillNewWeights(MotifList ml,
                    double[] w)
This method fills the array w with the new weights for the motifs. Overwrites the super method to implement the reward system. The new weights are taken the product of the old ones times the entropy, which is the sum of (p log p), where p is the relative occurrence of the motif in the positive training set.

Overrides:
fillNewWeights in class MotifEvolution
Parameters:
ml - The list of weighted motifs.
w - An array at least the size of the motif list to be filled with the new weights for the motifs.