Catalano.Neuro.Classifier
Class ExtremeLearningMachine
- java.lang.Object
-
- Catalano.Neuro.Classifier.ExtremeLearningMachine
-
- All Implemented Interfaces:
- IClassifier, java.io.Serializable, java.lang.Cloneable
public class ExtremeLearningMachine extends java.lang.Object implements IClassifier, java.io.Serializable
Extreme Learning Machine.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ExtremeLearningMachine()Initializes a new instance of the ExtremeLearningMachine class.ExtremeLearningMachine(int nHiddenNodes)Initializes a new instance of the ExtremeLearningMachine class.ExtremeLearningMachine(int nHiddenNodes, double c)Initializes a new instance of the ExtremeLearningMachine class.ExtremeLearningMachine(int nHiddenNodes, double c, IActivationFunction function)Initializes a new instance of the ExtremeLearningMachine class.ExtremeLearningMachine(int nHiddenNodes, double c, IActivationFunction function, long seed)Initializes a new instance of the ExtremeLearningMachine class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IClassifierclone()Clone of the object.double[]getBias()Get the bias of the hidden nodes.IActivationFunctiongetFunction()Get the activation function.double[][]getInputWeight()Get the input weight.intgetNumberOfHiddenNodes()Get the number of hidden nodes.double[][]getOutputWeight()Get the output weight.doublegetRegulazationFactor()Get regularization factor.longgetSeed()Get random seed.voidLearn(DatasetClassification dataset)Learn from a dataset.voidLearn(double[][] input, int[] output)Learn.intPredict(double[] feature)Predict.voidsetBias(double[] bias)Set the bias of the hidden nodes.voidsetFunction(IActivationFunction function)Set the activation function.voidsetInputWeight(double[][] inputWeight)Set the input weight.voidsetNumberOfHiddenNodes(int nHiddenNodes)Set the number of hidden nodes.voidsetOutputWeight(double[][] outputWeight)Set the output weight.voidsetRegularizationFactor(double c)Set regularization factor.voidsetSeed(long seed)Set random seed.
-
-
-
Constructor Detail
-
ExtremeLearningMachine
public ExtremeLearningMachine()
Initializes a new instance of the ExtremeLearningMachine class.
-
ExtremeLearningMachine
public ExtremeLearningMachine(int nHiddenNodes)
Initializes a new instance of the ExtremeLearningMachine class.- Parameters:
nHiddenNodes- Number of hidden nodes.
-
ExtremeLearningMachine
public ExtremeLearningMachine(int nHiddenNodes, double c)Initializes a new instance of the ExtremeLearningMachine class.- Parameters:
nHiddenNodes- Number of hidden nodes.c- Regularization factor.
-
ExtremeLearningMachine
public ExtremeLearningMachine(int nHiddenNodes, double c, IActivationFunction function)Initializes a new instance of the ExtremeLearningMachine class.- Parameters:
nHiddenNodes- Number of hidden nodes.c- Regularization factor.function- Activation function.
-
ExtremeLearningMachine
public ExtremeLearningMachine(int nHiddenNodes, double c, IActivationFunction function, long seed)Initializes a new instance of the ExtremeLearningMachine class.- Parameters:
nHiddenNodes- Number of hidden nodes.c- Regularization factor.function- Activation function.seed- Random seed.
-
-
Method Detail
-
getNumberOfHiddenNodes
public int getNumberOfHiddenNodes()
Get the number of hidden nodes.- Returns:
- Number of hidden nodes.
-
setNumberOfHiddenNodes
public void setNumberOfHiddenNodes(int nHiddenNodes)
Set the number of hidden nodes.- Parameters:
nHiddenNodes- Number of hidden nodes.
-
getRegulazationFactor
public double getRegulazationFactor()
Get regularization factor.- Returns:
- Regularization factor.
-
setRegularizationFactor
public void setRegularizationFactor(double c)
Set regularization factor.- Parameters:
c- Regularization factor.
-
getBias
public double[] getBias()
Get the bias of the hidden nodes.- Returns:
- Bias of the hidden nodes.
-
setBias
public void setBias(double[] bias)
Set the bias of the hidden nodes.- Parameters:
bias- Bias of the hidden nodes.
-
getInputWeight
public double[][] getInputWeight()
Get the input weight.- Returns:
- Input weight.
-
setInputWeight
public void setInputWeight(double[][] inputWeight)
Set the input weight.- Parameters:
inputWeight- Input weight.
-
getOutputWeight
public double[][] getOutputWeight()
Get the output weight.- Returns:
- Output weight.
-
setOutputWeight
public void setOutputWeight(double[][] outputWeight)
Set the output weight.- Parameters:
outputWeight- Output weight.
-
getFunction
public IActivationFunction getFunction()
Get the activation function.- Returns:
- Activation function.
-
setFunction
public void setFunction(IActivationFunction function)
Set the activation function.- Parameters:
function- Activation function.
-
getSeed
public long getSeed()
Get random seed.- Returns:
- Seed.
-
setSeed
public void setSeed(long seed)
Set random seed.- Parameters:
seed- Seed.
-
Learn
public void Learn(DatasetClassification dataset)
Description copied from interface:IClassifierLearn from a dataset.- Specified by:
Learnin interfaceIClassifier- Parameters:
dataset- Dataset.
-
Learn
public void Learn(double[][] input, int[] output)Description copied from interface:IClassifierLearn.- Specified by:
Learnin interfaceIClassifier- Parameters:
input- Matrix of features.output- Labels.
-
Predict
public int Predict(double[] feature)
Description copied from interface:IClassifierPredict.- Specified by:
Predictin interfaceIClassifier- Parameters:
feature- Feature.- Returns:
- Label.
-
clone
public IClassifier clone()
Description copied from interface:IClassifierClone of the object.- Specified by:
clonein interfaceIClassifier- Overrides:
clonein classjava.lang.Object- Returns:
- A new copy of the object.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG