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 java.lang.Object implements EnsembleML
-
-
Constructor Summary
Constructors Constructor and Description GenericEnsembleML(MLMethod fromML, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intclassify(MLData input)Classify the input into a group.MLDatacompute(MLData input)Compute regression.doublegetError(EnsembleDataSet testset)Get the error for this ML on the datasetintgetInputCount()java.lang.StringgetLabel()MLMethodgetMl()intgetOutputCount()MLTraingetTraining()EnsembleDataSetgetTrainingSet()voidsetMl(MLMethod newMl)Set the MLMethod to runvoidsetTraining(MLTrain train)Set the training for this membervoidsetTrainingSet(EnsembleDataSet dataSet)Set the dataset for this membervoidtrain(double targetError)Train the ML to a certain accuracy.voidtrain(double targetError, boolean verbose)Train the ML to a certain accuracy.voidtrain(double targetError, int maxIterations)Train the ML to a certain accuracy.voidtrain(double targetError, int maxIterations, boolean verbose)Train the ML to a certain accuracy.voidtrainStep()intwinner(MLData output)
-
-
-
Constructor Detail
-
GenericEnsembleML
public GenericEnsembleML(MLMethod fromML, java.lang.String description)
-
-
Method Detail
-
setTrainingSet
public void setTrainingSet(EnsembleDataSet dataSet)
Description copied from interface:EnsembleMLSet the dataset for this member- Specified by:
setTrainingSetin interfaceEnsembleML- Parameters:
dataSet- The data set.
-
getTrainingSet
public EnsembleDataSet getTrainingSet()
- Specified by:
getTrainingSetin interfaceEnsembleML- Returns:
- Get the dataset for this member
-
train
public void train(double targetError, int maxIterations, boolean verbose)Description copied from interface:EnsembleMLTrain the ML to a certain accuracy.- Specified by:
trainin interfaceEnsembleML- Parameters:
targetError- Target error.maxIterations- Stop after this number of iterationsverbose- Verbose mode.
-
train
public void train(double targetError)
Description copied from interface:EnsembleMLTrain the ML to a certain accuracy.- Specified by:
trainin interfaceEnsembleML- Parameters:
targetError- The target error.
-
train
public void train(double targetError, int maxIterations)Description copied from interface:EnsembleMLTrain the ML to a certain accuracy.- Specified by:
trainin interfaceEnsembleML- Parameters:
targetError- Target error.maxIterations- Stop after this number of iterations
-
train
public void train(double targetError, boolean verbose)Description copied from interface:EnsembleMLTrain the ML to a certain accuracy.- Specified by:
trainin interfaceEnsembleML- Parameters:
targetError- Target error.verbose- Verbose mode.
-
setMl
public void setMl(MLMethod newMl)
Description copied from interface:EnsembleMLSet the MLMethod to run- Specified by:
setMlin interfaceEnsembleML- Parameters:
newMl- The new ML.
-
getMl
public MLMethod getMl()
- Specified by:
getMlin interfaceEnsembleML- Returns:
- Returns the current MLMethod
-
classify
public int classify(MLData input)
Description copied from interface:MLClassificationClassify the input into a group.- Specified by:
classifyin interfaceMLClassification- 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:MLRegressionCompute regression.- Specified by:
computein interfaceMLRegression- Parameters:
input- The input data.- Returns:
- The output data.
-
getInputCount
public int getInputCount()
- Specified by:
getInputCountin interfaceMLInput- Returns:
- The input.
-
getOutputCount
public int getOutputCount()
- Specified by:
getOutputCountin interfaceMLOutput- Returns:
- The output count.
-
winner
public int winner(MLData output)
-
setTraining
public void setTraining(MLTrain train)
Description copied from interface:EnsembleMLSet the training for this member- Specified by:
setTrainingin interfaceEnsembleML- Parameters:
train- The trainer.
-
getTraining
public MLTrain getTraining()
- Specified by:
getTrainingin interfaceEnsembleML- Returns:
- Get the dataset for this member.
-
trainStep
public void trainStep()
- Specified by:
trainStepin interfaceEnsembleML
-
getLabel
public java.lang.String getLabel()
- Specified by:
getLabelin interfaceEnsembleML
-
getError
public double getError(EnsembleDataSet testset)
Description copied from interface:EnsembleMLGet the error for this ML on the dataset- Specified by:
getErrorin interfaceEnsembleML- Parameters:
testset- The dataset.- Returns:
- The error.
-
-
DMelt 3.0 © DataMelt by jWork.ORG