|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.BasicML
org.encog.neural.cpn.CPN
public class CPN
Counterpropagation Neural Networks (CPN) were developed by Professor Robert Hecht-Nielsen in 1987. CPN neural networks are a hybrid neural network, employing characteristics of both a feedforward neural network and a self-organzing map (SOM). The CPN is composed of three layers, the input, the instar and the outstar. The connection from the input to the instar layer is competitive, with only one neuron being allowed to win. The connection between the instar and outstar is feedforward. The layers are trained separately, using instar training and outstar training. The CPN network is good at regression.
Constructor Summary | |
---|---|
CPN(int theInputCount,
int theInstarCount,
int theOutstarCount,
int theWinnerCount)
Construct the counterpropagation neural network. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.encog.ml.BasicML |
---|
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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.Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |