Documentation of 'org.encog.ml.ea.sort.AbstractGenomeComparator' Java class
AbstractGenomeComparator
org.encog.ml.ea.sort

Class AbstractGenomeComparator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double applyBonus(double value, double bonus)
      Apply a bonus, this is a simple percent that is applied in the direction specified by the "should minimize" property of the score function.
      double applyPenalty(double value, double bonus)
      Apply a penalty, this is a simple percent that is applied in the direction specified by the "should minimize" property of the score function.
      boolean isBetterThan(double d1, double d2)
      Determine if one score is better than the other.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • AbstractGenomeComparator

        public AbstractGenomeComparator()
    • Method Detail

      • applyBonus

        public double applyBonus(double value,
                                 double bonus)
        Apply a bonus, this is a simple percent that is applied in the direction specified by the "should minimize" property of the score function.
        Specified by:
        applyBonus in interface GenomeComparator
        Parameters:
        value - The current value.
        bonus - The bonus.
        Returns:
        The resulting value.
      • applyPenalty

        public double applyPenalty(double value,
                                   double bonus)
        Apply a penalty, this is a simple percent that is applied in the direction specified by the "should minimize" property of the score function.
        Specified by:
        applyPenalty in interface GenomeComparator
        Parameters:
        value - The current value.
        bonus - The penalty.
        Returns:
        The resulting value.
      • isBetterThan

        public boolean isBetterThan(double d1,
                                    double d2)
        Determine if one score is better than the other.
        Specified by:
        isBetterThan in interface GenomeComparator
        Parameters:
        d1 - The first score to compare.
        d2 - The second score to compare.
        Returns:
        True if d1 is better than d2.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.