From 8189116ea4b5db4675e31dfd04a5687d55e29262 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Tue, 6 May 2014 14:29:37 +0100 Subject: Added javadocs, made minor changes to the comments --- doc/jcgp/backend/statistics/RunEntry.html | 354 +++++++++++++ doc/jcgp/backend/statistics/StatisticsLogger.html | 562 +++++++++++++++++++++ .../backend/statistics/class-use/RunEntry.html | 124 +++++ .../statistics/class-use/StatisticsLogger.html | 124 +++++ doc/jcgp/backend/statistics/package-frame.html | 21 + doc/jcgp/backend/statistics/package-summary.html | 150 ++++++ doc/jcgp/backend/statistics/package-tree.html | 138 +++++ doc/jcgp/backend/statistics/package-use.html | 124 +++++ 8 files changed, 1597 insertions(+) create mode 100644 doc/jcgp/backend/statistics/RunEntry.html create mode 100644 doc/jcgp/backend/statistics/StatisticsLogger.html create mode 100644 doc/jcgp/backend/statistics/class-use/RunEntry.html create mode 100644 doc/jcgp/backend/statistics/class-use/StatisticsLogger.html create mode 100644 doc/jcgp/backend/statistics/package-frame.html create mode 100644 doc/jcgp/backend/statistics/package-summary.html create mode 100644 doc/jcgp/backend/statistics/package-tree.html create mode 100644 doc/jcgp/backend/statistics/package-use.html (limited to 'doc/jcgp/backend/statistics') diff --git a/doc/jcgp/backend/statistics/RunEntry.html b/doc/jcgp/backend/statistics/RunEntry.html new file mode 100644 index 0000000..102e331 --- /dev/null +++ b/doc/jcgp/backend/statistics/RunEntry.html @@ -0,0 +1,354 @@ + + + + + +RunEntry + + + + + + + + +
+ + + + + + + +
+ + + +
+
jcgp.backend.statistics
+

Class RunEntry

+
+
+ +
+
    +
  • +
    +
    +
    public class RunEntry
    +extends java.lang.Object
    +
    This class encapsulates the data contained in a log entry. +

    + Once constructed, data can only be retrieved. Note that + the generation argument in the constructor (and consequently + the value returned by getGeneration() refer to the + last generation when improvement occurred.
    +
    +
    Author:
    +
    Eduardo Pedroni
    +
    See Also:
    +
    StatisticsLogger
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      RunEntry(int generation, + double fitness, + int active, + boolean successful) +
      Creates a new run entry for a logger.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        RunEntry

        +
        public RunEntry(int generation,
        +                double fitness,
        +                int active,
        +                boolean successful)
        +
        Creates a new run entry for a logger.
        +
        +
        Parameters:
        +
        generation - the generation when fitness improvement last occurred.
        +
        fitness - the best fitness achieved.
        +
        active - the number of active nodes in the best solution found.
        +
        successful - whether or not the run found a perfect solution.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getGeneration

        +
        public int getGeneration()
        +
        +
        Returns:
        +
        the generation when improvement last occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getFitness

        +
        public double getFitness()
        +
        +
        Returns:
        +
        the best fitness achieved during the run.
        +
        +
      • +
      + + + +
        +
      • +

        isSuccessful

        +
        public boolean isSuccessful()
        +
        +
        Returns:
        +
        true if the run was successful.
        +
        +
      • +
      + + + +
        +
      • +

        getActiveNodes

        +
        public int getActiveNodes()
        +
        +
        Returns:
        +
        the number of active nodes in the best solution found.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/doc/jcgp/backend/statistics/StatisticsLogger.html b/doc/jcgp/backend/statistics/StatisticsLogger.html new file mode 100644 index 0000000..4c80b52 --- /dev/null +++ b/doc/jcgp/backend/statistics/StatisticsLogger.html @@ -0,0 +1,562 @@ + + + + + +StatisticsLogger + + + + + + + + +
+ + + + + + + +
+ + + +
+
jcgp.backend.statistics
+

Class StatisticsLogger

+
+
+ +
+
    +
  • +
    +
    +
    public class StatisticsLogger
    +extends java.lang.Object
    +
    This is a utility class for logging experiment statistics when doing multiple runs. +

    + Information about each run is added via the logRun() method. The many getters + can be used to obtain statistics about the logged runs, such as success rate and average + fitness. +

    + JCGP uses this class to perform its logging and print out experiment data at the end.
    +
    +
    Author:
    +
    Eduardo Pedroni
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      StatisticsLogger() +
      Create a new statistics logger, use this when resetting is necessary.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      doublegetAverageActiveNodes() +
      Averages the number of active nodes in the + best chromosomes obtained across all runs.
      +
      doublegetAverageActiveNodesStdDev() +
      Calculates the standard deviation of + the number of active nodes in the best solution + in each run.
      +
      doublegetAverageFitness() +
      Averages the best fitness obtained in each run.
      +
      doublegetAverageFitnessStdDev() +
      Calculates the standard deviation of + the best fitness obtained in each run.
      +
      doublegetAverageGenerations() +
      Calculates the average generation out of all runs.
      +
      doublegetAverageGenerationsStdDev() +
      Calculates the standard deviation of + the average number of generations in + each run.
      +
      doublegetAverageSuccessfulGenerations() +
      Calculates the average generation out of successful runs only.
      +
      doublegetAverageSuccessfulGenerationsStdDev() +
      Calculates the standard deviation of + the average number of generations in + each run where a perfect solution was found.
      +
      doublegetHighestFitness() 
      doublegetLowestFitness() 
      intgetSuccessfulRuns() 
      doublegetSuccessRate() +
      Calculates the ratio of successful runs (runs where + a perfect solution was found) to total number of runs.
      +
      voidlogRun(int generation, + double fitness, + int active, + boolean successful) +
      Log a new run.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StatisticsLogger

        +
        public StatisticsLogger()
        +
        Create a new statistics logger, use this when resetting is necessary.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        logRun

        +
        public void logRun(int generation,
        +                   double fitness,
        +                   int active,
        +                   boolean successful)
        +
        Log a new run. Calling any of the statistics getters will + now take this logged run into account as well as all previously + logged runs.
        +
        +
        Parameters:
        +
        generation - the last generation when improvement occurred.
        +
        fitness - the best fitness achieved in the run.
        +
        active - the number of active nodes in the best chromosome found.
        +
        successful - true if a perfect solution was found, false if otherwise.
        +
        +
      • +
      + + + +
        +
      • +

        getAverageFitness

        +
        public double getAverageFitness()
        +
        Averages the best fitness obtained in each run.
        +
        +
        Returns:
        +
        the average fitness.
        +
        +
      • +
      + + + +
        +
      • +

        getAverageFitnessStdDev

        +
        public double getAverageFitnessStdDev()
        +
        Calculates the standard deviation of + the best fitness obtained in each run.
        +
        +
        Returns:
        +
        the standard deviation of average fitnesses.
        +
        +
      • +
      + + + +
        +
      • +

        getAverageActiveNodes

        +
        public double getAverageActiveNodes()
        +
        Averages the number of active nodes in the + best chromosomes obtained across all runs.
        +
        +
        Returns:
        +
        the average number of active nodes.
        +
        +
      • +
      + + + +
        +
      • +

        getAverageActiveNodesStdDev

        +
        public double getAverageActiveNodesStdDev()
        +
        Calculates the standard deviation of + the number of active nodes in the best solution + in each run.
        +
        +
        Returns:
        +
        the standard deviation of active node counts.
        +
        +
      • +
      + + + +
        +
      • +

        getAverageGenerations

        +
        public double getAverageGenerations()
        +
        Calculates the average generation out of all runs. + The generation value in each run corresponds to the + last generation in which improvement happened. +

        + Note that this method includes runs where no perfect + solution was found. For the average number of generations + for perfect solutions only, use getAverageSuccessfulGenerations.
        +
        +
        Returns:
        +
        the average number of generations.
        +
        +
      • +
      + + + +
        +
      • +

        getAverageGenerationsStdDev

        +
        public double getAverageGenerationsStdDev()
        +
        Calculates the standard deviation of + the average number of generations in + each run.
        +
        +
        Returns:
        +
        the standard deviation of the number of generations.
        +
        +
      • +
      + + + +
        +
      • +

        getHighestFitness

        +
        public double getHighestFitness()
        +
        +
        Returns:
        +
        the highest fitness across all runs.
        +
        +
      • +
      + + + +
        +
      • +

        getLowestFitness

        +
        public double getLowestFitness()
        +
        +
        Returns:
        +
        the lowest fitness across all runs.
        +
        +
      • +
      + + + +
        +
      • +

        getSuccessfulRuns

        +
        public int getSuccessfulRuns()
        +
        +
        Returns:
        +
        the number of runs in which a perfect solution was found.
        +
        +
      • +
      + + + +
        +
      • +

        getSuccessRate

        +
        public double getSuccessRate()
        +
        Calculates the ratio of successful runs (runs where + a perfect solution was found) to total number of runs. + A double-precision value between 0 and 1 is returned, + where 0 means 0% success rate and 1 means 100% success rate.
        +
        +
        Returns:
        +
        the success rate across all runs.
        +
        +
      • +
      + + + +
        +
      • +

        getAverageSuccessfulGenerations

        +
        public double getAverageSuccessfulGenerations()
        +
        Calculates the average generation out of successful runs only. + The generation value in each successful run corresponds to the + generation in which the perfect solution was found.
        +
        +
        Returns:
        +
        the average number of generations for perfect solutions.
        +
        +
      • +
      + + + +
        +
      • +

        getAverageSuccessfulGenerationsStdDev

        +
        public double getAverageSuccessfulGenerationsStdDev()
        +
        Calculates the standard deviation of + the average number of generations in + each run where a perfect solution was found.
        +
        +
        Returns:
        +
        the standard deviation of the number of generations in successful runs.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/doc/jcgp/backend/statistics/class-use/RunEntry.html b/doc/jcgp/backend/statistics/class-use/RunEntry.html new file mode 100644 index 0000000..4aefb02 --- /dev/null +++ b/doc/jcgp/backend/statistics/class-use/RunEntry.html @@ -0,0 +1,124 @@ + + + + + +Uses of Class jcgp.backend.statistics.RunEntry + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
jcgp.backend.statistics.RunEntry

+
+
No usage of jcgp.backend.statistics.RunEntry
+ +
+ + + + + + + +
+ + + + diff --git a/doc/jcgp/backend/statistics/class-use/StatisticsLogger.html b/doc/jcgp/backend/statistics/class-use/StatisticsLogger.html new file mode 100644 index 0000000..b441141 --- /dev/null +++ b/doc/jcgp/backend/statistics/class-use/StatisticsLogger.html @@ -0,0 +1,124 @@ + + + + + +Uses of Class jcgp.backend.statistics.StatisticsLogger + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
jcgp.backend.statistics.StatisticsLogger

+
+
No usage of jcgp.backend.statistics.StatisticsLogger
+ +
+ + + + + + + +
+ + + + diff --git a/doc/jcgp/backend/statistics/package-frame.html b/doc/jcgp/backend/statistics/package-frame.html new file mode 100644 index 0000000..1bcde50 --- /dev/null +++ b/doc/jcgp/backend/statistics/package-frame.html @@ -0,0 +1,21 @@ + + + + + +jcgp.backend.statistics + + + + + +

jcgp.backend.statistics

+
+

Classes

+ +
+ + diff --git a/doc/jcgp/backend/statistics/package-summary.html b/doc/jcgp/backend/statistics/package-summary.html new file mode 100644 index 0000000..55579f8 --- /dev/null +++ b/doc/jcgp/backend/statistics/package-summary.html @@ -0,0 +1,150 @@ + + + + + +jcgp.backend.statistics + + + + + + + + +
+ + + + + + + +
+ + +
+

Package jcgp.backend.statistics

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/doc/jcgp/backend/statistics/package-tree.html b/doc/jcgp/backend/statistics/package-tree.html new file mode 100644 index 0000000..1317c96 --- /dev/null +++ b/doc/jcgp/backend/statistics/package-tree.html @@ -0,0 +1,138 @@ + + + + + +jcgp.backend.statistics Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package jcgp.backend.statistics

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/doc/jcgp/backend/statistics/package-use.html b/doc/jcgp/backend/statistics/package-use.html new file mode 100644 index 0000000..26ece29 --- /dev/null +++ b/doc/jcgp/backend/statistics/package-use.html @@ -0,0 +1,124 @@ + + + + + +Uses of Package jcgp.backend.statistics + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
jcgp.backend.statistics

+
+
No usage of jcgp.backend.statistics
+ +
+ + + + + + + +
+ + + + -- cgit v1.2.3