C# Class Encog.Neural.Networks.BasicNetwork

Inheritance: Encog.ML.BasicML, IMLMethod, IContainsFlat, IMLContext, IMLRegression, IMLInputOutput, IMLInput, IMLOutput, IMLEncodable, IMLResettable, IMLClassification, IMLError
Afficher le fichier Open project: encog/encog-silverlight-core Class Usage Examples

Méthodes publiques

Méthode Description
AddLayer ( ILayer layer ) : void

Add a layer to the neural network. If there are no layers added this layer will become the input layer. This function automatically updates both the input and output layer references.

AddWeight ( int fromLayer, int fromNeuron, int toNeuron, double v ) : void

Add to a weight.

BasicNetwork ( ) : System

Construct an empty neural network.

CalculateError ( IMLDataSet data ) : double

Calculate the error for this neural network.

CalculateNeuronCount ( ) : int

Calculate the total number of neurons in the network across all layers.

Classify ( IMLData input ) : int
ClearContext ( ) : void

Clear any data from any context layers.

Clone ( ) : Object

Return a clone of this neural network. Including structure, weights and bias values. This is a deep copy.

Compute ( IMLData input ) : IMLData

Compute the output for a given input to the neural network.

Compute ( double input, double output ) : void

Compute the output for this network.

DecodeFromArray ( double encoded ) : void
DumpWeights ( ) : String
EnableConnection ( int fromLayer, int fromNeuron, int toNeuron, bool enable ) : void

Enable, or disable, a connection.

EncodeToArray ( double encoded ) : void
EncodedArrayLength ( ) : int
Equals ( BasicNetwork other ) : bool

Compare the two neural networks. For them to be equal they must be of the same structure, and have the same matrix values.

Equals ( BasicNetwork other, int precision ) : bool

Determine if this neural network is equal to another. Equal neural networks have the same weight matrix and bias values, within a specified precision.

GetActivation ( int layer ) : IActivationFunction

Get the activation function for the specified layer.

GetHashCode ( ) : int

Generate a hash code.

GetLayerBiasActivation ( int l ) : double

Get the bias activation for the specified layer.

GetLayerNeuronCount ( int l ) : int

Get the neuron count.

GetLayerOutput ( int layer, int neuronNumber ) : double

Get the layer output for the specified neuron.

GetLayerTotalNeuronCount ( int l ) : int

Get the total (including bias and context) neuron cont for a layer.

GetWeight ( int fromLayer, int fromNeuron, int toNeuron ) : double

Get the weight between the two layers.

IsConnected ( int layer, int fromNeuron, int toNeuron ) : bool

Determine if the specified connection is enabled.

IsLayerBiased ( int l ) : bool

Determine if the specified layer is biased.

Reset ( ) : void

Reset the weight matrix and the bias values. This will use a Nguyen-Widrow randomizer with a range between -1 and 1. If the network does not have an input, output or hidden layers, then Nguyen-Widrow cannot be used and a simple range randomize between -1 and 1 will be used.

Reset ( int seed ) : void

Reset the weight matrix and the bias values. This will use a Nguyen-Widrow randomizer with a range between -1 and 1. If the network does not have an input, output or hidden layers, then Nguyen-Widrow cannot be used and a simple range randomize between -1 and 1 will be used. Use the specified seed.

SetLayerBiasActivation ( int l, double v ) : void

Set the bias activation for the specified layer.

SetWeight ( int fromLayer, int fromNeuron, int toNeuron, double v ) : void

Set the weight between the two specified neurons.

ToString ( ) : String

UpdateProperties ( ) : void

ValidateNeuron ( int targetLayer, int neuron ) : void

Validate the the specified targetLayer and neuron are valid.

Winner ( IMLData input ) : int

Determine the winner for the specified input. This is the number of the winning neuron.

Method Details

AddLayer() public méthode

Add a layer to the neural network. If there are no layers added this layer will become the input layer. This function automatically updates both the input and output layer references.
public AddLayer ( ILayer layer ) : void
layer ILayer The layer to be added to the network.
Résultat void

AddWeight() public méthode

Add to a weight.
public AddWeight ( int fromLayer, int fromNeuron, int toNeuron, double v ) : void
fromLayer int The from layer.
fromNeuron int The from neuron.
toNeuron int The to neuron.
v double The value to add.
Résultat void

BasicNetwork() public méthode

Construct an empty neural network.
public BasicNetwork ( ) : System
Résultat System

CalculateError() public méthode

Calculate the error for this neural network.
public CalculateError ( IMLDataSet data ) : double
data IMLDataSet The training set.
Résultat double

CalculateNeuronCount() public méthode

Calculate the total number of neurons in the network across all layers.
public CalculateNeuronCount ( ) : int
Résultat int

Classify() public méthode

public Classify ( IMLData input ) : int
input IMLData
Résultat int

ClearContext() public méthode

Clear any data from any context layers.
public ClearContext ( ) : void
Résultat void

Clone() public méthode

Return a clone of this neural network. Including structure, weights and bias values. This is a deep copy.
public Clone ( ) : Object
Résultat Object

Compute() public méthode

Compute the output for a given input to the neural network.
public Compute ( IMLData input ) : IMLData
input IMLData The input to the neural network.
Résultat IMLData

Compute() public méthode

Compute the output for this network.
public Compute ( double input, double output ) : void
input double The input.
output double The output.
Résultat void

DecodeFromArray() public méthode

public DecodeFromArray ( double encoded ) : void
encoded double
Résultat void

DumpWeights() public méthode

public DumpWeights ( ) : String
Résultat String

EnableConnection() public méthode

Enable, or disable, a connection.
public EnableConnection ( int fromLayer, int fromNeuron, int toNeuron, bool enable ) : void
fromLayer int The layer that contains the from neuron.
fromNeuron int The source neuron.
toNeuron int The target connection.
enable bool True to enable, false to disable.
Résultat void

EncodeToArray() public méthode

public EncodeToArray ( double encoded ) : void
encoded double
Résultat void

EncodedArrayLength() public méthode

public EncodedArrayLength ( ) : int
Résultat int

Equals() public méthode

Compare the two neural networks. For them to be equal they must be of the same structure, and have the same matrix values.
public Equals ( BasicNetwork other ) : bool
other BasicNetwork The other neural network.
Résultat bool

Equals() public méthode

Determine if this neural network is equal to another. Equal neural networks have the same weight matrix and bias values, within a specified precision.
public Equals ( BasicNetwork other, int precision ) : bool
other BasicNetwork The other neural network.
precision int The number of decimal places to compare to.
Résultat bool

GetActivation() public méthode

Get the activation function for the specified layer.
public GetActivation ( int layer ) : IActivationFunction
layer int The layer.
Résultat IActivationFunction

GetHashCode() public final méthode

Generate a hash code.
public final GetHashCode ( ) : int
Résultat int

GetLayerBiasActivation() public méthode

Get the bias activation for the specified layer.
public GetLayerBiasActivation ( int l ) : double
l int The layer.
Résultat double

GetLayerNeuronCount() public méthode

Get the neuron count.
public GetLayerNeuronCount ( int l ) : int
l int The layer.
Résultat int

GetLayerOutput() public méthode

Get the layer output for the specified neuron.
public GetLayerOutput ( int layer, int neuronNumber ) : double
layer int The layer.
neuronNumber int The neuron number.
Résultat double

GetLayerTotalNeuronCount() public méthode

Get the total (including bias and context) neuron cont for a layer.
public GetLayerTotalNeuronCount ( int l ) : int
l int The layer.
Résultat int

GetWeight() public méthode

Get the weight between the two layers.
public GetWeight ( int fromLayer, int fromNeuron, int toNeuron ) : double
fromLayer int The from layer.
fromNeuron int The from neuron.
toNeuron int The to neuron.
Résultat double

IsConnected() public méthode

Determine if the specified connection is enabled.
public IsConnected ( int layer, int fromNeuron, int toNeuron ) : bool
layer int The layer to check.
fromNeuron int The source neuron.
toNeuron int THe target neuron.
Résultat bool

IsLayerBiased() public méthode

Determine if the specified layer is biased.
public IsLayerBiased ( int l ) : bool
l int The layer number.
Résultat bool

Reset() public méthode

Reset the weight matrix and the bias values. This will use a Nguyen-Widrow randomizer with a range between -1 and 1. If the network does not have an input, output or hidden layers, then Nguyen-Widrow cannot be used and a simple range randomize between -1 and 1 will be used.
public Reset ( ) : void
Résultat void

Reset() public méthode

Reset the weight matrix and the bias values. This will use a Nguyen-Widrow randomizer with a range between -1 and 1. If the network does not have an input, output or hidden layers, then Nguyen-Widrow cannot be used and a simple range randomize between -1 and 1 will be used. Use the specified seed.
public Reset ( int seed ) : void
seed int
Résultat void

SetLayerBiasActivation() public méthode

Set the bias activation for the specified layer.
public SetLayerBiasActivation ( int l, double v ) : void
l int The layer to use.
v double
Résultat void

SetWeight() public méthode

Set the weight between the two specified neurons.
public SetWeight ( int fromLayer, int fromNeuron, int toNeuron, double v ) : void
fromLayer int The from layer.
fromNeuron int The from neuron.
toNeuron int The to neuron.
v double The to value.
Résultat void

ToString() public final méthode

public final ToString ( ) : String
Résultat String

UpdateProperties() public final méthode

public final UpdateProperties ( ) : void
Résultat void

ValidateNeuron() public méthode

Validate the the specified targetLayer and neuron are valid.
public ValidateNeuron ( int targetLayer, int neuron ) : void
targetLayer int The target layer.
neuron int The target neuron.
Résultat void

Winner() public méthode

Determine the winner for the specified input. This is the number of the winning neuron.
public Winner ( IMLData input ) : int
input IMLData The input patter to present to the neural network.
Résultat int