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, setProperty
public 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 MLError
data
- The training set.public MLData compute(MLData input)
compute
in interface MLRegression
input
- 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 MLInput
public int getInstarCount()
public int getOutputCount()
getOutputCount
in interface MLOutput
public int getOutstarCount()
public Matrix getWeightsInputToInstar()
public Matrix getWeightsInstarToOutstar()
public int getWinnerCount()
public void reset()
reset
in interface MLResettable
public void reset(int seed)
reset
in interface MLResettable
seed
- The seed value.public void updateProperties()
updateProperties
in interface MLProperties
updateProperties
in class BasicML
Copyright © 2014. All Rights Reserved.