org.encog.neural.som
public class SOM extends BasicML implements MLClassification, MLResettable, MLError
Modifier and Type | Field and Description |
---|---|
static double |
VERYSMALL
Do not allow patterns to go below this very small number.
|
Constructor and Description |
---|
SOM()
Default constructor.
|
SOM(int inputCount,
int outputCount)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
calculateError(MLDataSet data)
Calculate the error of the ML method, given a dataset.
|
int |
classify(MLData input)
Classify the input into a group.
|
int |
getInputCount() |
int |
getOutputCount() |
Matrix |
getWeights() |
void |
reset()
Reset the weights.
|
void |
reset(int seed)
Reset the weights with a seed.
|
void |
setWeights(Matrix weights) |
void |
updateProperties()
Update any objeccts when a property changes.
|
int |
winner(MLData input)
An alias for the classify method, kept for compatibility
with earlier versions of Encog.
|
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty
public static final double VERYSMALL
public SOM()
public SOM(int inputCount, int outputCount)
inputCount
- Number of input neuronsoutputCount
- Number of output neuronspublic double calculateError(MLDataSet data)
calculateError
in interface MLError
data
- The dataset.public int classify(MLData input)
classify
in interface MLClassification
input
- The input data to classify.public int getInputCount()
getInputCount
in interface MLInput
public int getOutputCount()
getOutputCount
in interface MLOutput
public Matrix getWeights()
public void reset()
reset
in interface MLResettable
public void reset(int seed)
reset
in interface MLResettable
seed
- The seed value.public void setWeights(Matrix weights)
weights
- the weights to setpublic void updateProperties()
updateProperties
in interface MLProperties
updateProperties
in class BasicML
public int winner(MLData input)
input
- The input pattern.Copyright © 2014. All Rights Reserved.