Documentation of 'org.encog.ml.model.EncogModel' Java class
EncogModel
org.encog.ml.model

Class EncogModel



  • public class EncogModel
    extends java.lang.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 Detail

      • EncogModel

        public EncogModel(VersatileMLDataSet theDataset)
        Construct a model for the specified dataset.
        Parameters:
        theDataset - The dataset.
    • Method Detail

      • getInputFeatures

        public java.util.List<ColumnDefinition> getInputFeatures()
        Returns:
        the inputFeatures
      • getPredictedFeatures

        public java.util.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,
                                 java.lang.String methodType,
                                 java.lang.String methodArgs,
                                 java.lang.String trainingType,
                                 java.lang.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,
                                 java.lang.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,
                                   java.lang.String trainingType,
                                   java.lang.String trainingArgs)
        Select the training to use.
        Parameters:
        dataset - The dataset.
        trainingType - The type of training.
        trainingArgs - The training arguments.
      • getMethodConfigurations

        public java.util.Map<java.lang.String,MethodConfig> getMethodConfigurations()
        Returns:
        the methodConfigurations
      • setReport

        public void setReport(StatusReportable report)
        Parameters:
        report - the report to set
      • train

        public MLRegression train(int iterations,
                                  boolean shuffle)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.