org.encog.neural.cpn
public class CPN extends BasicML implements MLRegression, MLResettable, MLError
| Constructor and Description |
|---|
CPN(int theInputCount,
int theInstarCount,
int theOutstarCount,
int theWinnerCount)
Construct the counterpropagation neural network.
|
| Modifier and Type | Method and Description |
|---|---|
double |
calculateError(MLDataSet data)
Calculate the error for this neural network.
|
MLData |
compute(MLData input)
Compute regression.
|
MLData |
computeInstar(MLData input)
Compute the instar layer.
|
MLData |
computeOutstar(MLData input)
Compute the outstar layer.
|
int |
getInputCount() |
int |
getInstarCount() |
int |
getOutputCount() |
int |
getOutstarCount() |
Matrix |
getWeightsInputToInstar() |
Matrix |
getWeightsInstarToOutstar() |
int |
getWinnerCount() |
void |
reset()
Reset the weights.
|
void |
reset(int seed)
Reset the weights with a seed.
|
void |
updateProperties()
Update any objeccts when a property changes.
|
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setPropertypublic CPN(int theInputCount, int theInstarCount, int theOutstarCount, int theWinnerCount)
theInputCount - The number of input neurons.theInstarCount - The number of instar neurons.theOutstarCount - The number of outstar neurons.theWinnerCount - The winner count.public double calculateError(MLDataSet data)
calculateError in interface MLErrordata - The training set.public MLData compute(MLData input)
compute in interface MLRegressioninput - The input data.public MLData computeInstar(MLData input)
input - The input.public MLData computeOutstar(MLData input)
input - The input.public int getInputCount()
getInputCount in interface MLInputpublic int getInstarCount()
public int getOutputCount()
getOutputCount in interface MLOutputpublic int getOutstarCount()
public Matrix getWeightsInputToInstar()
public Matrix getWeightsInstarToOutstar()
public int getWinnerCount()
public void reset()
reset in interface MLResettablepublic void reset(int seed)
reset in interface MLResettableseed - The seed value.public void updateProperties()
updateProperties in interface MLPropertiesupdateProperties in class BasicMLCopyright © 2014. All Rights Reserved.