org.encog.ml.model

## Class EncogModel

- java.lang.Object
- - org.encog.ml.model.EncogModel

-     public class EncogModel
      extends Object

  Encog model is designed to allow you to easily swap between different model types and automatically normalize data. It is designed to work with a VersatileMLDataSet only.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncogModel(VersatileMLDataSet theDataset)` Construct a model for the specified dataset.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `calculateError(MLMethod method, MLDataSet data)` Calculate the error for the given method and dataset.
    `MLMethod` | `createMethod()` Create the selected method.
    `MLMethod` | `crossvalidate(int k, boolean shuffle)` Crossvalidate and fit.
    `VersatileMLDataSet` | `getDataset()`
    `List<ColumnDefinition>` | `getInputFeatures()`
    `Map<String,MethodConfig>` | `getMethodConfigurations()`
    `List<ColumnDefinition>` | `getPredictedFeatures()`
    `StatusReportable` | `getReport()`
    `MatrixMLDataSet` | `getTrainingDataset()`
    `MatrixMLDataSet` | `getValidationDataset()`
    `void` | `holdBackValidation(double validationPercent, boolean shuffle, int seed)` Specify a validation set to hold back.
    `void` | `selectMethod(VersatileMLDataSet dataset, String methodType)` Select the method to create.
    `void` | `selectMethod(VersatileMLDataSet dataset, String methodType, String methodArgs, String trainingType, String trainingArgs)` Select the method to use.
    `void` | `selectTraining(VersatileMLDataSet dataset, String trainingType, String trainingArgs)` Select the training to use.
    `void` | `selectTrainingType(VersatileMLDataSet dataset)` Select the training type.
    `void` | `setReport(StatusReportable report)`
    `void` | `setTrainingDataset(MatrixMLDataSet trainingDataset)`
    `void` | `setValidationDataset(MatrixMLDataSet validationDataset)`

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

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

- - ### Constructor Detail

    - #### EncogModel

          public EncogModel(VersatileMLDataSet theDataset)

      Construct a model for the specified dataset.
      Parameters:
        `theDataset` - The dataset.

  - ### Method Detail

    - #### getDataset

          public VersatileMLDataSet getDataset()

      Returns:
        the dataset

    - #### getInputFeatures

          public List<ColumnDefinition> getInputFeatures()

      Returns:
        the inputFeatures

    - #### getPredictedFeatures

          public List<ColumnDefinition> getPredictedFeatures()

      Returns:
        the predictedFeatures

    - #### holdBackValidation

          public void holdBackValidation(double validationPercent,
                                boolean shuffle,
                                int seed)

      Specify a validation set to hold back.
      Parameters:
        `validationPercent` - The percent to use for validation.
        `shuffle` - True to shuffle.
        `seed` - The seed for random generation.

    - #### calculateError

          public double calculateError(MLMethod method,
                              MLDataSet data)

      Calculate the error for the given method and dataset.
      Parameters:
        `method` - The method to use.
        `data` - The data to use.
      Returns:
        The error.

    - #### crossvalidate

          public MLMethod crossvalidate(int k,
                               boolean shuffle)

      Crossvalidate and fit.
      Parameters:
        `k` - The number of folds.
        `shuffle` - True if we should shuffle.
      Returns:
        The trained method.

    - #### getTrainingDataset

          public MatrixMLDataSet getTrainingDataset()

      Returns:
        the trainingDataset

    - #### setTrainingDataset

          public void setTrainingDataset(MatrixMLDataSet trainingDataset)

      Parameters:
        `trainingDataset` - the trainingDataset to set

    - #### getValidationDataset

          public MatrixMLDataSet getValidationDataset()

      Returns:
        the validationDataset

    - #### setValidationDataset

          public void setValidationDataset(MatrixMLDataSet validationDataset)

      Parameters:
        `validationDataset` - the validationDataset to set

    - #### selectMethod

          public void selectMethod(VersatileMLDataSet dataset,
                          String methodType,
                          String methodArgs,
                          String trainingType,
                          String trainingArgs)

      Select the method to use.
      Parameters:
        `dataset` - The dataset.
        `methodType` - The type of method.
        `methodArgs` - The method arguments.
        `trainingType` - The training type.
        `trainingArgs` - The training arguments.

    - #### createMethod

          public MLMethod createMethod()

      Create the selected method.
      Returns:
        The created method.

    - #### selectMethod

          public void selectMethod(VersatileMLDataSet dataset,
                          String methodType)

      Select the method to create.
      Parameters:
        `dataset` - The dataset.
        `methodType` - The method type.

    - #### selectTrainingType

          public void selectTrainingType(VersatileMLDataSet dataset)

      Select the training type.
      Parameters:
        `dataset` - The dataset.

    - #### selectTraining

          public void selectTraining(VersatileMLDataSet dataset,
                            String trainingType,
                            String trainingArgs)

      Select the training to use.
      Parameters:
        `dataset` - The dataset.
        `trainingType` - The type of training.
        `trainingArgs` - The training arguments.

    - #### getMethodConfigurations

          public Map<String,MethodConfig> getMethodConfigurations()

      Returns:
        the methodConfigurations

    - #### getReport

          public StatusReportable getReport()

      Returns:
        the report

    - #### setReport

          public void setReport(StatusReportable report)

      Parameters:
        `report` - the report to set

Copyright © 2014. All Rights Reserved.