public class OptimizationStatistics extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, Printable
Modifier and Type | Field and Description |
---|---|
protected double[] |
BestSoFar
Best objective function of entries added by all previous generations
|
protected int[] |
EvaluatedSoFar
Number of entries that have been evaluated so far
|
protected boolean[] |
FoundAllSuccess
Whether all successful entries have been found
|
protected boolean[] |
FoundAllTop
Whether all of the top entries have been found
|
protected double[] |
GenerationAverage
Average objective function of entries added by the previous generation
|
protected double[] |
GenerationBest
Best objective function of entries added by the previous generation
|
protected int |
IterationsEvaluated
Number of iterations that have been evaluated
|
protected int[] |
NSuccess
Number of entries pass a success filter
|
int |
NumberTopEntries
Number of top entries to select
|
protected BaseDatasetFilter |
SuccessFilter
Defines when an entry is considered successful
|
protected Dataset |
SuccessfulEntries
A list of entries that pass the SuccessFilter (if defined)
|
protected Dataset |
TopEntries
A list of top entries that optimization algorithm is designed to find.
|
protected int[] |
TopEntriesFound
Number of top entries found in the population for each iteration
|
Constructor and Description |
---|
OptimizationStatistics() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
about()
Prints a simple status message about this object
|
protected void |
allocateResults(int NumberGenerations)
Before evaluation, allocate result arrays
|
OptimizationStatistics |
clone() |
protected void |
collectAnswers(BaseOptimizer Optimizer)
If answers to optimization problem are already known, collect them.
|
void |
evaluate(BaseOptimizer Optimizer)
Evaluate the performance of an optimizer.
|
protected void |
evaluateEntries(Dataset Generation,
Dataset Population,
BaseEntryRanker Ranker,
int IterationNumber)
Given the new entries for a generation and the total population so far,
calculate the statistics for this generation
|
protected void |
findSuccesses(Dataset searchSpace)
Find all entries in the search space that pass the success filter.
|
protected void |
findTopEntries(Dataset searchSpace,
BaseEntryRanker ranker)
Set the top entry list with a known list
|
protected java.lang.String |
getHeader()
Print out a header that has all statistics which have been calculated.
|
java.lang.String |
printCommand(java.util.List<java.lang.String> Command)
Handles more complicated printing commands.
|
protected java.lang.String |
printData(int i)
Print out the data for a single iteration
|
java.lang.String |
printDescription(boolean htmlFormat)
Print full name of object, and a simple description of the options.
|
java.lang.String |
printResults()
Print out all results into a neatly-formated table
|
void |
setNumberTopEntries(int NumberTopEntries)
Define the number of top entries to hold for statistical purposes.
|
void |
setSuccessFilter(BaseDatasetFilter filter)
Define a filter to define when the optimization algorithm has found an acceptable
entry.
|
protected BaseDatasetFilter SuccessFilter
public int NumberTopEntries
protected Dataset TopEntries
protected Dataset SuccessfulEntries
protected int IterationsEvaluated
protected int[] EvaluatedSoFar
protected int[] TopEntriesFound
protected boolean[] FoundAllTop
protected double[] GenerationAverage
protected double[] GenerationBest
protected double[] BestSoFar
protected int[] NSuccess
protected boolean[] FoundAllSuccess
public void setSuccessFilter(BaseDatasetFilter filter)
filter
- Desired filterpublic void setNumberTopEntries(int NumberTopEntries)
NumberTopEntries
- Desired numberpublic void evaluate(BaseOptimizer Optimizer)
Optimizer
- Optimization run to be analyzedprotected void evaluateEntries(Dataset Generation, Dataset Population, BaseEntryRanker Ranker, int IterationNumber)
Generation
- New entries added this iterationPopulation
- Total population so farRanker
- Objective function used during optimizationIterationNumber
- Which iteration we are oneprotected void collectAnswers(BaseOptimizer Optimizer)
Optimizer
- Optimization run to draw results fromprotected void findTopEntries(Dataset searchSpace, BaseEntryRanker ranker)
searchSpace
- Search space from which to pull top entriesranker
- Objective function to use for ranking entriesprotected void findSuccesses(Dataset searchSpace)
searchSpace
- Search spaceprotected void allocateResults(int NumberGenerations)
NumberGenerations
- Number of generations to expectpublic java.lang.String printResults()
protected java.lang.String getHeader()
protected java.lang.String printData(int i)
i
- Iteration number to printpublic OptimizationStatistics clone()
clone
in class java.lang.Object
public java.lang.String printCommand(java.util.List<java.lang.String> Command) throws java.lang.Exception
Printable
printCommand
in interface Printable
Command
- Command specifying what to printjava.lang.Exception
- If command not understoodpublic java.lang.String about()
Printable
public java.lang.String printDescription(boolean htmlFormat)
Printable
Example: For a model training a separate WekaRegression for intermetallics
magpie.models.regression.SplitRegression
printDescription
in interface Printable
htmlFormat
- Whether format for output to an HTML page
(e.g., <div> to create indentation) or for printing to screen.#printModel()