org.encog.ensemble

## Class GenericEnsembleML

- java.lang.Object
- - org.encog.ensemble.GenericEnsembleML

- All Implemented Interfaces:
    EnsembleML, MLClassification, MLInput, MLInputOutput, MLMethod, MLOutput, MLRegression

      public class GenericEnsembleML
      extends Object
      implements EnsembleML

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GenericEnsembleML(MLMethod fromML, String description)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `classify(MLData input)` Classify the input into a group.
    `MLData` | `compute(MLData input)` Compute regression.
    `double` | `getError(EnsembleDataSet testset)` Get the error for this ML on the dataset
    `int` | `getInputCount()`
    `String` | `getLabel()`
    `MLMethod` | `getMl()`
    `int` | `getOutputCount()`
    `MLTrain` | `getTraining()`
    `EnsembleDataSet` | `getTrainingSet()`
    `void` | `setMl(MLMethod newMl)` Set the MLMethod to run
    `void` | `setTraining(MLTrain train)` Set the training for this member
    `void` | `setTrainingSet(EnsembleDataSet dataSet)` Set the dataset for this member
    `void` | `train(double targetError)` Train the ML to a certain accuracy.
    `void` | `train(double targetError, boolean verbose)` Train the ML to a certain accuracy.
    `void` | `trainStep()`
    `int` | `winner(MLData output)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GenericEnsembleML

          public GenericEnsembleML(MLMethod fromML,
                           String description)

  - ### Method Detail

    - #### setTrainingSet

          public void setTrainingSet(EnsembleDataSet dataSet)

      Description copied from interface: `EnsembleML`
      Set the dataset for this member
      Specified by:
        `setTrainingSet` in interface `EnsembleML`
      Parameters:
        `dataSet` - The data set.

    - #### getTrainingSet

          public EnsembleDataSet getTrainingSet()

      Specified by:
        `getTrainingSet` in interface `EnsembleML`
      Returns:
        Get the dataset for this member

    - #### train

          public void train(double targetError,
                   boolean verbose)

      Description copied from interface: `EnsembleML`
      Train the ML to a certain accuracy.
      Specified by:
        `train` in interface `EnsembleML`
      Parameters:
        `targetError` - Target error.
        `verbose` - Verbose mode.

    - #### setMl

          public void setMl(MLMethod newMl)

      Description copied from interface: `EnsembleML`
      Set the MLMethod to run
      Specified by:
        `setMl` in interface `EnsembleML`
      Parameters:
        `newMl` - The new ML.

    - #### getMl

          public MLMethod getMl()

      Specified by:
        `getMl` in interface `EnsembleML`
      Returns:
        Returns the current MLMethod

    - #### classify

          public int classify(MLData input)

      Description copied from interface: `MLClassification`
      Classify the input into a group.
      Specified by:
        `classify` in interface `MLClassification`
      Parameters:
        `input` - The input data to classify.
      Returns:
        The group that the data was classified into.

    - #### compute

          public MLData compute(MLData input)

      Description copied from interface: `MLRegression`
      Compute regression.
      Specified by:
        `compute` in interface `MLRegression`
      Parameters:
        `input` - The input data.
      Returns:
        The output data.

    - #### 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.

    - #### train

          public void train(double targetError)

      Description copied from interface: `EnsembleML`
      Train the ML to a certain accuracy.
      Specified by:
        `train` in interface `EnsembleML`
      Parameters:
        `targetError` - The target error.

    - #### winner

          public int winner(MLData output)

    - #### setTraining

          public void setTraining(MLTrain train)

      Description copied from interface: `EnsembleML`
      Set the training for this member
      Specified by:
        `setTraining` in interface `EnsembleML`
      Parameters:
        `train` - The trainer.

    - #### getTraining

          public MLTrain getTraining()

      Specified by:
        `getTraining` in interface `EnsembleML`
      Returns:
        Get the dataset for this member.

    - #### trainStep

          public void trainStep()

      Specified by:
        `trainStep` in interface `EnsembleML`

    - #### getLabel

          public String getLabel()

      Specified by:
        `getLabel` in interface `EnsembleML`

    - #### getError

          public double getError(EnsembleDataSet testset)

      Description copied from interface: `EnsembleML`
      Get the error for this ML on the dataset
      Specified by:
        `getError` in interface `EnsembleML`

Copyright © 2014. All Rights Reserved.