| Home | Trees | Index | Help |
|
|---|
| Package pyrobot :: Package brain :: Module governor :: Class GovernorSRN |
|
Governor--+ |Network--+ | | |SRN--+ | GovernorSRN
| Method Summary | |
|---|---|
__init__(self,
bufferSize,
epsilon,
delta,
historySize,
alpha,
mask,
verbosity)
| |
Adds a layer. | |
addContextLayer(self,
name,
size,
hiddenLayerName,
verbosity)
| |
addLayer(self,
name,
size,
verbosity)
| |
addThreeLayers(self,
i,
h,
o)
| |
Connects two layers by instantiating an instance of Connection class. | |
decayModelVectors(self)
| |
This exists so that other extensions can interface at the point where the call is made to Network.step(). | |
report(self,
hist)
| |
setEpsilon(self,
liveEpsilon,
govEpsilon)
| |
Sets learning to value. | |
setMomentum(self,
liveMomentum,
govMomentum)
| |
You must set this! Set it to "epoch" or "pattern". | |
setVerbosity(self,
val)
| |
Runs through entire dataset. | |
trainFromBuffers(self)
| |
trainFromModelVectors(self)
| |
| Inherited from Governor | |
For use in iterable positions: >>> govnet = GovernorNetwork() >>> for item in govnet: ... | |
Computes euclidean distance from a vector to all model vectors. | |
For each model, how different is it from each of the buffer items? Returns list of incompatibilities. | |
Wrapper around ravq.input() which returns index and mapped-to m.v. | |
Loads RAVQ data from a file. | |
Returns the index and vector of winning position. | |
Public interface for getting next item from RAVQ. | |
Saves RAVQ data to a file. | |
Give each layer an equal weighting, so that all weights sum to one. | |
Takes a dictionary of layer names and mask weights. | |
Get's winning name, m.v. | |
| Inherited from SRN | |
Adds a context layer. | |
Wraps SRN.addThreeLayers() for compatibility. | |
Extends backprop() from Network to automatically deal with context layers. | |
Uses key to identify the hidden layer associated with each layer in the self.contextLayers dictionary. | |
Sets prediction between an input and output layer. | |
SRN.propagate: Sets error flags and propagates. | |
Clears the context layer by setting context layer to (default) value 0.5. | |
Clear context layer between sequences. | |
Set self.learnDuringSequence. | |
SRN.step() Extends network step method by automatically copying hidden layer activations to the context layer. | |
sweepCrossValidation() will go through each of the crossvalidation input/targets. | |
| Inherited from Network | |
Returns the layer specified by name. | |
Returns the number of layers in the network. | |
Returns string representation of network. | |
Determine the activation of a node based on that nodes net input. | |
Used in compute_error. | |
Adds a pattern with key word. | |
Returns an array of node bias values and connection weights for use in a GA. | |
inName layer and outName layer will be auto-associating. | |
Initializes error computation. | |
Changes the weights according to the error values calculated during backprop(). | |
Changes layer size. | |
Close the layerName's log file. | |
Compares two values. | |
Computes error for all non-output layers backwards through all projections. | |
Computes weight error derivative for all connections in self.connections starting with the last connection. | |
Copies activations in vec to the specified layer, replacing patterns if necessary. | |
Copies targets in vec to specified layer, replacing patterns if necessary. | |
Copies vec2 into vector1 being sure to replace patterns if necessary. | |
Alternate to sweep(). | |
Delete a pattern with key word. | |
Returns value to within 0.001. | |
Displays the network to the screen. | |
Returns a dictionary of layer names that map to a list of activations. | |
Returns the value of the active flag for the layer specified by layerName. | |
Returns the connection instance connecting the specified (string) layer names. | |
Returns the number of correct activation within tolerance of a layer. | |
Returns dictionary with input and target given pos. | |
| |
Returns the epsilon for the Network instance. | |
| |
Returns the layer with the argument (string) name. | |
Given a reference to a layer, returns the index of that layer in self.layers. | |
Returns the pattern with key word. | |
Gets the weights of the connection between two layers (argument strings). | |
Returns the word associated with pattern. | |
Initializes network by calling Connection.initialize() and Layer.initialize(). | |
| |
Loads data (targets/inputs) from file. | |
Loads inputs as patterns from file. | |
Loads inputs from file. | |
Loads targets as patterns from file. | |
Loads targets from file. | |
Load a set of vectors from a file. | |
Loads weights from a file in pickle, plain, or tlearn mode. | |
Sets the layerName's log feature. | |
Logs a message with layerName log. | |
Adds layerName and offset to inputMap. | |
| |
Adds layerName and offset to targetMap. | |
| |
Used in error checking with verifyArchitecture() and in prop_from(). | |
Replaces vector with patterns. | |
| |
| |
| |
| |
| |
| |
Start propagation from the layers in the list startLayers. | |
Propagates activation through the network. | |
Puts a dict of name: activations into their respective layers. | |
Randomizes self.loadOrder, the order in which inputs set with self.setInputs() are presented. | |
Replaces patterned inputs or targets with activation vectors. | |
| |
| |
| |
| |
Resets seed values. | |
Resets layer flags for activation and target. | |
Returns Root Mean Squared Error for all output layers in this network. | |
Saves data (targets/inputs) to file. | |
Saves inputs to file. | |
| |
Saves network to file using pickle. | |
Saves targets to file. | |
Saves weights to file in pickle, plain, or tlearn mode. | |
Sets a layer to active. | |
| |
| |
Sets self.batch to value. | |
Sets self.input to inputs. | |
Network.setInputsAndTargets() Sets the corpus of data for training. | |
Sets interactive to value. | |
| |
Sets the maxRandom Layer attribute for each layer to value.Specifies the global range for randomly initialized values, [-max, max]. | |
Sets self.orderedInputs to value. | |
For compatiblity. | |
Sets a pattern with key word. | |
Sets the network to use patterns for inputs and targets. | |
Sets patterns to the dictionary argument. | |
Sets self.reportRate to value. | |
Sets self.resetEpoch to value. | |
Sets self.resetLimit to value. | |
Sets the seed to value. | |
Sets self.sigmoid_prime_offset to value. | |
Sets self.stopPercent to value. | |
Sets self.sweepReportRate to value. | |
Sets the targets. | |
Sets tolerance to value. | |
| |
Sets flag so that self.stopPercent is compared to cross validation percent rather than the regular training data percentage correct. | |
Sets the weight of the connection between two layers (argument strings). | |
Share weights with another network. | |
Returns the network layers as a string. | |
Trains the network on the dataset till a stopping condition is met. | |
Returns Total Sum Squared error for the specified layer's pattern. | |
Copies gene bias values and weights to network bias values and weights. | |
Check for orphaned layers or connections. | |
Verifies that arguments to setInputs and setTargets are appropriately formatted. | |
Used in propagate() to verify that the network input activations have been set. | |
Used in backprop() to verify that the network targets have been set. | |
| Method Details |
|---|
add(self, layer, verbosity=0)Adds a layer. Layer verbosity is optional (default 0).
|
connect(self, fromName, toName)Connects two layers by instantiating an instance of Connection class.
|
networkStep(self, **args)This exists so that other extensions can interface at the point where the call is made to Network.step(). See governor.py for an example.
|
setLearning(self, value)Sets learning to value. Determines if the network learns, ie. changes connection weights.
|
setSequenceType(self, value)You must set this! Set it to "epoch" or "pattern".
|
sweep(self)Runs through entire dataset. Returns TSS error, total correct, and total count.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Jul 25 01:39:27 2005 | http://epydoc.sf.net |