C# Class Accord.Neuro.Networks.DeepBeliefNetwork

Inheritance: ActivationNetwork
Show file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
Compute ( double input ) : double[]

Computes the network's outputs for a given input.

Compute ( double input, int layerIndex ) : double[]

Computes the network's outputs for a given input.

CreateGaussianBernoulli ( int inputsCount ) : DeepBeliefNetwork

Creates a Gaussian-Bernoulli network.

CreateMixedNetwork ( IStochasticFunction visible, IStochasticFunction hidden, int inputsCount ) : DeepBeliefNetwork

Creates a Mixed-Bernoulli network.

DeepBeliefNetwork ( IStochasticFunction function, int inputsCount ) : System

Creates a new DeepBeliefNetwork.

DeepBeliefNetwork ( int inputsCount ) : System

Creates a new DeepBeliefNetwork.

GenerateInput ( double output ) : double[]

Samples an input vector from the network given an output vector.

GenerateOutput ( double input ) : double[]

Samples an output vector from the network given an input vector.

GenerateOutput ( double input, int layerIndex ) : double[]

Samples an output vector from the network given an input vector.

Load ( Stream stream ) : DeepBeliefNetwork

Loads a network from a stream.

Load ( string path ) : DeepBeliefNetwork

Loads a network from a file.

Pop ( ) : void

Removes the last layer from the network.

Push ( RestrictedBoltzmannMachine network ) : void

Stacks a new Boltzmann Machine at the end of this network.

Push ( int neurons ) : void

Inserts a new layer at the end of this network.

Push ( int neurons, IStochasticFunction function ) : void

Inserts a new layer at the end of this network.

Push ( int neurons, IStochasticFunction visibleFunction, IStochasticFunction hiddenFunction ) : void

Inserts a new layer at the end of this network.

Reconstruct ( double output ) : double[]

Reconstructs a input vector for a given output.

Reconstruct ( double output, int layerIndex ) : double[]

Reconstructs a input vector using the output vector of a given layer.

Save ( Stream stream ) : void

Saves the network to a stream.

Save ( string path ) : void

Saves the network to a stream.

UpdateVisibleWeights ( ) : void

Updates the weights of the visible layers by copying the reverse of the weights in the hidden layers.

Method Details

Compute() public method

Computes the network's outputs for a given input.
public Compute ( double input ) : double[]
input double The input vector.
return double[]

Compute() public method

Computes the network's outputs for a given input.
public Compute ( double input, int layerIndex ) : double[]
input double The input vector.
layerIndex int The index of the layer.
return double[]

CreateGaussianBernoulli() public static method

Creates a Gaussian-Bernoulli network.
public static CreateGaussianBernoulli ( int inputsCount ) : DeepBeliefNetwork
inputsCount int The number of inputs for the network.
return DeepBeliefNetwork

CreateMixedNetwork() public static method

Creates a Mixed-Bernoulli network.
public static CreateMixedNetwork ( IStochasticFunction visible, IStochasticFunction hidden, int inputsCount ) : DeepBeliefNetwork
visible IStochasticFunction The to be used in the first visible layer.
hidden IStochasticFunction The to be used in all other layers.
inputsCount int The number of inputs for the network.
return DeepBeliefNetwork

DeepBeliefNetwork() public method

Creates a new DeepBeliefNetwork.
public DeepBeliefNetwork ( IStochasticFunction function, int inputsCount ) : System
function IStochasticFunction The activation function to be used in the network neurons.
inputsCount int The number of inputs for the network.
return System

DeepBeliefNetwork() public method

Creates a new DeepBeliefNetwork.
public DeepBeliefNetwork ( int inputsCount ) : System
inputsCount int The number of inputs for the network.
return System

GenerateInput() public method

Samples an input vector from the network given an output vector.
public GenerateInput ( double output ) : double[]
output double An output vector.
return double[]

GenerateOutput() public method

Samples an output vector from the network given an input vector.
public GenerateOutput ( double input ) : double[]
input double An input vector.
return double[]

GenerateOutput() public method

Samples an output vector from the network given an input vector.
public GenerateOutput ( double input, int layerIndex ) : double[]
input double An input vector.
layerIndex int The index of the layer.
return double[]

Load() public static method

Loads a network from a stream.
public static Load ( Stream stream ) : DeepBeliefNetwork
stream Stream The network from which the machine is to be deserialized.
return DeepBeliefNetwork

Load() public static method

Loads a network from a file.
public static Load ( string path ) : DeepBeliefNetwork
path string The path to the file from which the network is to be deserialized.
return DeepBeliefNetwork

Pop() public method

Removes the last layer from the network.
public Pop ( ) : void
return void

Push() public method

Stacks a new Boltzmann Machine at the end of this network.
public Push ( RestrictedBoltzmannMachine network ) : void
network RestrictedBoltzmannMachine The machine to be added to the network.
return void

Push() public method

Inserts a new layer at the end of this network.
public Push ( int neurons ) : void
neurons int The number of neurons in the new layer.
return void

Push() public method

Inserts a new layer at the end of this network.
public Push ( int neurons, IStochasticFunction function ) : void
neurons int The number of neurons in the new layer.
function IStochasticFunction The activation function which should be used by the neurons.
return void

Push() public method

Inserts a new layer at the end of this network.
public Push ( int neurons, IStochasticFunction visibleFunction, IStochasticFunction hiddenFunction ) : void
neurons int The number of neurons in the layer.
visibleFunction IStochasticFunction The activation function which should be used by the visible neurons.
hiddenFunction IStochasticFunction The activation function which should be used by the hidden neurons.
return void

Reconstruct() public method

Reconstructs a input vector for a given output.
public Reconstruct ( double output ) : double[]
output double The output vector.
return double[]

Reconstruct() public method

Reconstructs a input vector using the output vector of a given layer.
public Reconstruct ( double output, int layerIndex ) : double[]
output double The output vector.
layerIndex int The index of the layer.
return double[]

Save() public method

Saves the network to a stream.
public Save ( Stream stream ) : void
stream Stream The stream to which the network is to be serialized.
return void

Save() public method

Saves the network to a stream.
public Save ( string path ) : void
path string The file path to which the network is to be serialized.
return void

UpdateVisibleWeights() public method

Updates the weights of the visible layers by copying the reverse of the weights in the hidden layers.
public UpdateVisibleWeights ( ) : void
return void