Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  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
`PrgPopulation(EncogProgramContext theContext, int thePopulationSize)` Construct the population.

Method Summary
`MLData` | `compute(MLData input)` Compute the output from the best Genome.
`void` | `dumpMembers(int i)` Dump the specified number of genomes.
`EncogProgramContext` | `getContext()`
`int` | `getInputCount()`
`int` | `getOutputCount()`

Methods inherited from class org.encog.ml.ea.population.BasicPopulation
`clear, createSpecies, determineBestSpecies, flatten, getBestGenome, getGenomeFactory, getMaxIndividualSize, getName, getPopulationSize, getSpecies, purgeInvalidGenomes, setBestGenome, setGenomeFactory, setName, setPopulationSize, size, updateProperties`

Methods inherited from class org.encog.ml.BasicML
`getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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:
    `compute` in interface `MLRegression`
  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:
    `getInputCount` in interface `MLInput`
  Returns:
    The input.

### getOutputCount

    public int getOutputCount()

  Specified by:
    `getOutputCount` in interface `MLOutput`
  Returns:
    The output count.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.