org.encog.ml.prg.train
Class PrgPopulation
- java.lang.Object
-
- org.encog.ml.BasicML
-
- org.encog.ml.ea.population.BasicPopulation
-
- org.encog.ml.prg.train.PrgPopulation
-
- All Implemented Interfaces:
- java.io.Serializable, Population, MLInput, MLInputOutput, MLMethod, MLOutput, MLProperties, MLRegression
public class PrgPopulation extends BasicPopulation implements MLRegression
A population that contains EncogProgram's. The primary difference between this class and BasicPopulation is that a "compute" method is provided that automatically uses the "best" genome to provide a MLRegression compute method. This population type also holds the common context that all of the EncogProgram genomes make use of.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description PrgPopulation(EncogProgramContext theContext, int thePopulationSize)Construct the population.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MLDatacompute(MLData input)Compute the output from the best Genome.voiddumpMembers(int i)Dump the specified number of genomes.EncogProgramContextgetContext()intgetInputCount()intgetOutputCount()-
Methods inherited from class org.encog.ml.ea.population.BasicPopulation
clear, createSpecies, determineBestSpecies, flatten, getBestGenome, getGenomeFactory, getMaxIndividualSize, getName, getPopulationSize, getRules, getSpecies, purgeInvalidGenomes, setBestGenome, setGenomeFactory, setName, setPopulationSize, setRules, size, updateProperties
-
Methods inherited from class org.encog.ml.BasicML
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty
-
-
-
-
Constructor Detail
-
PrgPopulation
public PrgPopulation(EncogProgramContext theContext, int thePopulationSize)
Construct the population.- Parameters:
theContext- The context.thePopulationSize- The population size.
-
-
Method Detail
-
compute
public MLData compute(MLData input)
Compute the output from the best Genome. Note: it is not safe to call this method while training is progressing.- Specified by:
computein interfaceMLRegression- Parameters:
input- The input to the- Returns:
- The output data.
-
dumpMembers
public void dumpMembers(int i)
Dump the specified number of genomes.- Parameters:
i- The specified number of genomes.
-
getContext
public EncogProgramContext getContext()
- Returns:
- The context for the programs.
-
getInputCount
public int getInputCount()
- Specified by:
getInputCountin interfaceMLInput- Returns:
- The input.
-
getOutputCount
public int getOutputCount()
- Specified by:
getOutputCountin interfaceMLOutput- Returns:
- The output count.
-
-
DMelt 3.0 © DataMelt by jWork.ORG