C# Класс Encog.Neural.Networks.BasicNetwork

Наследование: Encog.ML.BasicML, IMLMethod, IContainsFlat, IMLContext, IMLRegression, IMLInputOutput, IMLInput, IMLOutput, IMLEncodable, IMLResettable, IMLClassification, IMLError
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

AddLayer() публичный Метод

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.
Результат void

AddWeight() публичный Метод

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.
Результат void

BasicNetwork() публичный Метод

Construct an empty neural network.
public BasicNetwork ( ) : System
Результат System

CalculateError() публичный Метод

Calculate the error for this neural network.
public CalculateError ( IMLDataSet data ) : double
data IMLDataSet The training set.
Результат double

CalculateNeuronCount() публичный Метод

Calculate the total number of neurons in the network across all layers.
public CalculateNeuronCount ( ) : int
Результат int

Classify() публичный Метод

public Classify ( IMLData input ) : int
input IMLData
Результат int

ClearContext() публичный Метод

Clear any data from any context layers.
public ClearContext ( ) : void
Результат void

Clone() публичный Метод

Return a clone of this neural network. Including structure, weights and bias values. This is a deep copy.
public Clone ( ) : Object
Результат Object

Compute() публичный Метод

Compute the output for a given input to the neural network.
public Compute ( IMLData input ) : IMLData
input IMLData The input to the neural network.
Результат IMLData

Compute() публичный Метод

Compute the output for this network.
public Compute ( double input, double output ) : void
input double The input.
output double The output.
Результат void

DecodeFromArray() публичный Метод

public DecodeFromArray ( double encoded ) : void
encoded double
Результат void

DumpWeights() публичный Метод

public DumpWeights ( ) : String
Результат String

EnableConnection() публичный Метод

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.
Результат void

EncodeToArray() публичный Метод

public EncodeToArray ( double encoded ) : void
encoded double
Результат void

EncodedArrayLength() публичный Метод

public EncodedArrayLength ( ) : int
Результат int

Equals() публичный Метод

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.
Результат bool

Equals() публичный Метод

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.
Результат bool

GetActivation() публичный Метод

Get the activation function for the specified layer.
public GetActivation ( int layer ) : IActivationFunction
layer int The layer.
Результат IActivationFunction

GetHashCode() публичный закрытый Метод

Generate a hash code.
public final GetHashCode ( ) : int
Результат int

GetLayerBiasActivation() публичный Метод

Get the bias activation for the specified layer.
public GetLayerBiasActivation ( int l ) : double
l int The layer.
Результат double

GetLayerNeuronCount() публичный Метод

Get the neuron count.
public GetLayerNeuronCount ( int l ) : int
l int The layer.
Результат int

GetLayerOutput() публичный Метод

Get the layer output for the specified neuron.
public GetLayerOutput ( int layer, int neuronNumber ) : double
layer int The layer.
neuronNumber int The neuron number.
Результат double

GetLayerTotalNeuronCount() публичный Метод

Get the total (including bias and context) neuron cont for a layer.
public GetLayerTotalNeuronCount ( int l ) : int
l int The layer.
Результат int

GetWeight() публичный Метод

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.
Результат double

IsConnected() публичный Метод

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.
Результат bool

IsLayerBiased() публичный Метод

Determine if the specified layer is biased.
public IsLayerBiased ( int l ) : bool
l int The layer number.
Результат bool

Reset() публичный Метод

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
Результат void

Reset() публичный Метод

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
Результат void

SetLayerBiasActivation() публичный Метод

Set the bias activation for the specified layer.
public SetLayerBiasActivation ( int l, double v ) : void
l int The layer to use.
v double
Результат void

SetWeight() публичный Метод

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.
Результат void

ToString() публичный закрытый Метод

public final ToString ( ) : String
Результат String

UpdateProperties() публичный закрытый Метод

public final UpdateProperties ( ) : void
Результат void

ValidateNeuron() публичный Метод

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.
Результат void

Winner() публичный Метод

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.
Результат int