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, setPropertypublic 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 MLErrordata - The dataset.public int classify(MLData input)
classify in interface MLClassificationinput - The input data to classify.public int getInputCount()
getInputCount in interface MLInputpublic int getOutputCount()
getOutputCount in interface MLOutputpublic Matrix getWeights()
public void reset()
reset in interface MLResettablepublic void reset(int seed)
reset in interface MLResettableseed - The seed value.public void setWeights(Matrix weights)
weights - the weights to setpublic void updateProperties()
updateProperties in interface MLPropertiesupdateProperties in class BasicMLpublic int winner(MLData input)
input - The input pattern.Copyright © 2014. All Rights Reserved.