#include <annetwork.h>
Inheritance diagram for ANNetwork:
Public Methods | |
ANNetwork (const char *description=NULL) | |
void | makeUnits (const char *topology) |
virtual void | make (const char *top) |
virtual void | empty () |
virtual void | copy (const ANNetwork &fnet, bool onlyWeights=false) |
void | connectFfw (const PackTable< int > &conns) |
void | connectFullFfw (bool shortcuts) |
void | connectFull () |
void | setUnitPrototype (Neuron *t) |
virtual void | copyFreeNet (const ANNetwork &orig, bool onlyWeights=false) |
virtual void | init (double r=0.0) |
void | reset () |
virtual void | update () |
virtual Vector | testPattern (const PatternSource &set, int pattern) const |
const ANNTopology & | getTopology () const |
void | setInitializer (NeuronInitializer *initer) |
Equalizer * | getEqualizer () |
const Equalizer * | getEqualizer () const |
void | setEqualizer (Equalizer *eq=NULL) |
Connection * | connect (int i, int j) |
virtual OStream & | operator>> (OStream &out) const |
void | cleanup (bool removeDisableds=false, bool removePassthroughs=false) |
String | drawEPS (double xsize=-1, double ysize=-1) const |
void | drawFeedForward () |
void | check () const |
Protected Attributes | |
ANNTopology * | mTopology |
Neuron * | mUnitTemplate |
NeuronInitializer * | mInitializer |
Equalizer * | mpEqualizer |
Definition at line 109 of file annetwork.h.
|
Constructs a neural network with a topology described by the description string. See ANNetwork::makeUnits() for more information about the format of the description string. Definition at line 103 of file annetwork.cc. References makeUnits(), mInitializer, mpEqualizer, mTopology, and mUnitTemplate. |
|
Implementation for Object.
Definition at line 557 of file annetwork.cc. References Neuron::check(), NeuronContainer::mUnits, and mUnitTemplate. |
|
Removes unnecessary connections and disables lonely units.
Definition at line 365 of file annetwork.cc. References ANNLayering::getPos(), NeuronContainer::mUnits, ANNLayering::removeLayer(), and NeuronContainer::removeUnit(). |
|
Creates a connection from neuron i to neuron j.
Definition at line 228 of file annetwork.cc. References NeuronContainer::mUnits. Referenced by connectFfw(), connectFull(), and connectFullFfw(). |
|
Builds the network from connection matrix, restricting the topology to only feedforward connections.
Definition at line 139 of file annetwork.cc. References connect(), ANNLayering::getPos(), ANNLayering::layerIndex(), and NeuronContainer::mUnits. |
|
Connects all units to all units, including self.
Definition at line 185 of file annetwork.cc. References connect(), and NeuronContainer::mUnits. |
|
Connects all units in subsequent layers to form feedforward topology.
Definition at line 162 of file annetwork.cc. References connect(), ANNLayering::layerIndex(), ANNLayering::layers(), and mTopology. Referenced by AbsoluteNeuralPrediction::train(). |
|
Implementation for LearningMapping.
Definition at line 121 of file annetwork.cc. References Learner::copy(), and copyFreeNet(). |
|
Implementation for AnyNetwork. Copies the other FreeNet unto self. Reimplemented from Learner. Definition at line 193 of file annetwork.cc. References Neuron::clone(), mTopology, NeuronContainer::mUnits, and mUnitTemplate. Referenced by copy(). |
|
Draws a picture of the network in EPS (Encapsulated PostScript). If no size is given, the image is drawn using default scaling.
Definition at line 299 of file annetwork.cc. References BiNode::id(), BiNode::incoming(), BiNode::incomings(), Neuron::isEnabled(), ANNLayering::layers(), NeuronContainer::mUnits, Connection::source(), and Neuron::transferFunc(). |
|
Order the coordinates of the Neuron neurons (which do have coordinates) in the network in a pretty way in two-dimensional space.
Definition at line 468 of file annetwork.cc. References ANNLayering::layerIndex(), ANNLayering::layers(), ANNLayering::make(), and NeuronContainer::mUnits. |
|
Deletes all the neurons in the network.
Definition at line 133 of file annetwork.cc. References ANNTopology::empty(), and mTopology. |
|
Returns pointer (or NULL) to the equalization handler for the network. Const version. Definition at line 196 of file annetwork.h. References mpEqualizer. |
|
Returns pointer (or NULL) to the equalization handler for the network. Non-const version. Definition at line 191 of file annetwork.h. References mpEqualizer. Referenced by AbsoluteNeuralPrediction::predict(), and AbsoluteNeuralPrediction::train(). |
|
Returns current layering.
Definition at line 180 of file annetwork.h. References mTopology. |
|
Implementation for AnyNetwork. Initializes the weights and biases randomly according to the range, or if an initializer has been given, using that. Implements Learner. Definition at line 206 of file annetwork.cc. References NeuronInitializer::initialize(), mInitializer, and NeuronContainer::mUnits. Referenced by Trainer::initTrain(), and AbsoluteNeuralPrediction::train(). |
|
Implementation for LearningMapping.
Implements Learner. Definition at line 129 of file annetwork.h. References makeUnits(). Referenced by AbsoluteNeuralPrediction::train(). |
|
Builds a non-connected network according to the given layer topology (for example: "7-4-2" or "8"). See ANNLayering for some more information about the description strings. Definition at line 127 of file annetwork.cc. References ANNTopology::build(), and mTopology. Referenced by ANNetwork(), and make(). |
|
Implementation for Object. Prints out a formatted printout of the network. Definition at line 270 of file annetwork.cc. References NeuronContainer::mUnits. |
|
Resets activations to 0.0.
Definition at line 239 of file annetwork.cc. References NeuronContainer::mUnits. |
|
Sets equalization handler for the network. Gives ownership. Definition at line 222 of file annetwork.cc. References mpEqualizer. Referenced by AbsoluteNeuralPrediction::train(). |
|
Sets the given initializer. NOTE: Takes the ownership of the initializer. Definition at line 216 of file annetwork.cc. References mInitializer. |
|
Sets the unit template. The object t must be an instance of an inheritor of Neuron. NOTE: The template is destructed along with the ANNetwork, so do not destroy it yourself. Definition at line 157 of file annetwork.h. References mUnitTemplate. |
|
Implementation for LearningMapping.
Reimplemented from Learner. Definition at line 250 of file annetwork.cc. References PatternSource::input(), PatternSource::inputs, and PatternSource::outputs. Referenced by AbsoluteNeuralPrediction::predict(). |
|
Transfers signals once for all units.
Definition at line 244 of file annetwork.cc. References NeuronContainer::mUnits. Referenced by BackpropTrainer::trainPattern(). |
|
Neuron initializer method.
Definition at line 247 of file annetwork.h. Referenced by ANNetwork(), init(), and setInitializer(). |
|
Equalization object.
Definition at line 250 of file annetwork.h. Referenced by ANNetwork(), getEqualizer(), and setEqualizer(). |
|
Layering information.
Definition at line 241 of file annetwork.h. Referenced by ANNetwork(), connectFullFfw(), copyFreeNet(), empty(), getTopology(), and makeUnits(). |
|
Neuron template.
Definition at line 244 of file annetwork.h. Referenced by ANNetwork(), check(), copyFreeNet(), and setUnitPrototype(). |