|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.neural.prune.PruneSelective
public class PruneSelective
Prune a neural network selectively. This class allows you to either add or remove neurons from layers of a neural network. You can also randomize or stimulate neurons. No provision is given for removing an entire layer. Removing a layer requires a totally new set of weights between the layers before and after the removed one. This essentially makes any remaining weights useless. At this point you are better off just creating a new network of the desired dimensions.
Constructor Summary | |
---|---|
PruneSelective(BasicNetwork network)
Construct an object prune the neural network. |
Method Summary | |
---|---|
void |
changeNeuronCount(int layer,
int neuronCount)
Change the neuron count for the network. |
double |
determineNeuronSignificance(int layer,
int neuron)
Determine the significance of the neuron. |
BasicNetwork |
getNetwork()
|
void |
prune(int targetLayer,
int neuron)
Prune one of the neurons from this layer. |
void |
randomizeNeuron(double low,
double high,
int targetLayer,
int neuron)
|
void |
randomizeNeuron(int targetLayer,
int neuron)
Assign random values to the network. |
void |
stimulateNeuron(double percent,
int targetLayer,
int neuron)
Stimulate the specified neuron by the specified percent. |
void |
stimulateWeakNeurons(int layer,
int count,
double percent)
Stimulate weaker neurons on a layer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PruneSelective(BasicNetwork network)
network
- The network to prune.Method Detail |
---|
public void changeNeuronCount(int layer, int neuronCount)
layer
- The layer to adjust.neuronCount
- The new neuron count for this layer.public double determineNeuronSignificance(int layer, int neuron)
layer
- The layer to query.neuron
- The neuron to query.
public BasicNetwork getNetwork()
public void prune(int targetLayer, int neuron)
targetLayer
- The neuron to prune. Zero specifies the first neuron.neuron
- The neuron to prune.public void randomizeNeuron(double low, double high, int targetLayer, int neuron)
low
- The low-end of the range.high
- The high-end of the range.targetLayer
- The target layer.neuron
- The target neuron.public void randomizeNeuron(int targetLayer, int neuron)
targetLayer
- The target layer.neuron
- The target neuron.public void stimulateNeuron(double percent, int targetLayer, int neuron)
percent
- The percent to randomize by.targetLayer
- The layer that the neuron is on.neuron
- The neuron to randomize.public void stimulateWeakNeurons(int layer, int count, double percent)
layer
- The layer to stimulate.count
- The number of weak neurons to stimulate.percent
- The percent to stimulate by.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |