|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.encog.neural.prune.Prune
public class Prune
Prune: The prune class provides some basic help for determining the correct number of neurons to put in a hidden layer. Two types of prune are supported. Selective - Try removing neurons from the hidden layers and if the affect on the accuracy of the neural network is not great then make the removal permanent. Incremental - Start with one neuron in the hidden layer and increase until the neural network error is acceptable.
| Field Summary | |
|---|---|
static int |
MAX_TRY
Maximum number of tries. |
static double |
ONE_PERCENT
One percent. |
| Constructor Summary | |
|---|---|
Prune(BasicNetwork network,
NeuralDataSet training,
double maxError)
Constructor that is designed to setup for a selective prune. |
|
Prune(double rate,
double momentum,
NeuralDataSet training,
double maxError)
Constructor used to setup the prune object for an incremental prune. |
|
| Method Summary | |
|---|---|
protected BasicNetwork |
clipHiddenNeuron(int neuron)
Internal method used to clip the hidden neurons. |
protected double |
determineError(BasicNetwork network)
Internal method to determine the error for a neural network. |
protected boolean |
findNeuron()
Internal method that will loop through all hidden neurons and prune them if pruning the neuron does not cause too great of an increase in error. |
BasicNetwork |
getCurrentNetwork()
Get the current neural network. |
int |
getCycles()
Called to get the current number of cycles. |
boolean |
getDone()
Called to determine if we are done in an incremental prune. |
double |
getError()
Called to get the current error. |
protected int |
getHiddenCount()
The current number of hidden neurons being evaluated. |
double |
getHiddenNeuronCount()
Get the number of hidden neurons. |
protected void |
increment()
Internal method that is called at the end of each incremental cycle. |
void |
pruneIncramental()
Method that is called to prune the neural network incramentaly. |
int |
pruneSelective()
Called to complete the selective pruning process. |
void |
startIncremental()
Method that is called to start the incremental prune process. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_TRY
public static final double ONE_PERCENT
| Constructor Detail |
|---|
public Prune(BasicNetwork network,
NeuralDataSet training,
double maxError)
network - The neural network that we wish to prune.training - The training set to use.maxError - The max error allowed.
public Prune(double rate,
double momentum,
NeuralDataSet training,
double maxError)
rate - The desired learning rate.momentum - The desired momentum.training - The training data.maxError - The max error that is acceptable.| Method Detail |
|---|
protected BasicNetwork clipHiddenNeuron(int neuron)
neuron - The neuron to clip.
protected double determineError(BasicNetwork network)
network - The neural network that we are seeking a error rate for.
protected boolean findNeuron()
public BasicNetwork getCurrentNetwork()
public int getCycles()
public boolean getDone()
public double getError()
protected int getHiddenCount()
public double getHiddenNeuronCount()
protected void increment()
public void pruneIncramental()
public int pruneSelective()
public void startIncremental()
|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||