createConnectionMatrix.h File Reference

Offers methods for creating connection matrices for neural networks. More...

#include <Array/ArrayIo.h>
#include <fstream>

Go to the source code of this file.

Functions

void createConnectionMatrix (Array< int > &con, Array< unsigned > &layers, bool ff_layer=true, bool ff_in_out=true, bool ff_all=true, bool bias=true)
 Creates a connection matrix for a network.
void createConnectionMatrix (Array< int > &con, unsigned in, unsigned hidden, unsigned out, bool ff_layer=true, bool ff_in_out=true, bool ff_all=true, bool bias=true)
 Creates a connection matrix for a network with a single hidden layer.
void createConnectionMatrix (Array< int > &con, unsigned in, unsigned hidden1, unsigned hidden2, unsigned out, bool ff_layer=true, bool ff_in_out=true, bool ff_all=true, bool bias=true)
 Creates a connection matrix for a network with two hidden layers.
void createConnectionMatrixRNN (Array< int > &con, unsigned in, unsigned hidden, unsigned out, unsigned memory=1, bool layered=false, bool recurrentInputs=true, bool bias=true, bool elman=false, bool previousInputs=false)
 Creates a connection matrix for a recurrent network.

Detailed Description

Offers methods for creating connection matrices for neural networks.

Author:
C. Igel, M. Hüsken
Date:
2002
Copyright (c) 1995, 1999, 2002:
Institut für Neuroinformatik
Ruhr-Universität Bochum
D-44780 Bochum, Germany
Phone: +49-234-32-25558
Fax: +49-234-32-14209
eMail: Shark-admin@neuroinformatik.ruhr-uni-bochum.de
www: http://www.neuroinformatik.ruhr-uni-bochum.de

Project:
ReClaM




This file is part of ReClaM. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Definition in file createConnectionMatrix.h.


Function Documentation

void createConnectionMatrix ( Array< int > &  con,
unsigned  in,
unsigned  hidden1,
unsigned  hidden2,
unsigned  out,
bool  ff_layer = true,
bool  ff_in_out = true,
bool  ff_all = true,
bool  bias = true 
)

Creates a connection matrix for a network with two hidden layers.

Automatically creates a connection matrix for a network with four different layers: An input layer with in input neurons, an output layer with out output neurons and two hidden layers with hidden1 and hidden2 hidden neurons, respectively. (Standard) connections can be defined by ff_layer, ff_in_out, ff_all and bias.

Parameters:
con the resulting connection matrix.
in number of input neurons.
hidden1 number of neurons of the first hidden layer.
hidden2 number of neurons of the second hidden layer.
out number of output neurons.
ff_layer if set to true, connections from each neuron of layer $i$ to each neuron of layer $i+1$ will be set for all layers.
ff_in_out if set to true, connections from all input neurons to all output neurons will be set.
ff_all if set to true, connections from all neurons of layer $i$ to all neurons of layers $j$ with $j > i$ will be set for all layers $i$.
bias if set to true, connections from all neurons (except the input neurons) to the bias will be set.
Returns:
none
Author:
C. Igel, M. Hüsken
Date:
2002
Changes
none
Status
stable

Definition at line 269 of file createConnectionMatrix.h.

References createConnectionMatrix().

void createConnectionMatrix ( Array< int > &  con,
unsigned  in,
unsigned  hidden,
unsigned  out,
bool  ff_layer = true,
bool  ff_in_out = true,
bool  ff_all = true,
bool  bias = true 
)

Creates a connection matrix for a network with a single hidden layer.

Automatically creates a connection matrix for a network with three different layers: An input layer with in input neurons, an output layer with out output neurons and a single hidden layer with hidden hidden neurons. (Standard) connections can be defined by ff_layer, ff_in_out, ff_all and bias.

Parameters:
con the resulting connection matrix.
in number of input neurons.
hidden number of neurons of the single hidden layer.
out number of output neurons.
ff_layer if set to true, connections from each neuron of layer $i$ to each neuron of layer $i+1$ will be set for all layers.
ff_in_out if set to true, connections from all input neurons to all output neurons will be set.
ff_all if set to true, connections from all neurons of layer $i$ to all neurons of layers $j$ with $j > i$ will be set for all layers $i$.
bias if set to true, connections from all neurons (except the input neurons) to the bias will be set.
Returns:
none
Author:
C. Igel, M. Hüsken
Date:
2002
Changes
none
Status
stable

Definition at line 212 of file createConnectionMatrix.h.

References createConnectionMatrix().

void createConnectionMatrix ( Array< int > &  con,
Array< unsigned > &  layers,
bool  ff_layer = true,
bool  ff_in_out = true,
bool  ff_all = true,
bool  bias = true 
)

Creates a connection matrix for a network.

Automatically creates a connection matrix with several layers, with the numbers of neurons for each layer defined by layers and (standard) connections defined by ff_layer, ff_in_out, ff_all and bias.

Parameters:
con the resulting connection matrix.
layers contains the numbers of neurons for each layer of the network.
ff_layer if set to true, connections from each neuron of layer $i$ to each neuron of layer $i+1$ will be set for all layers.
ff_in_out if set to true, connections from all input neurons to all output neurons will be set.
ff_all if set to true, connections from all neurons of layer $i$ to all neurons of layers $j$ with $j > i$ will be set for all layers $i$.
bias if set to true, connections from all neurons (except the input neurons) to the bias will be set.
Returns:
none
Author:
C. Igel, M. Hüsken
Date:
2002
Changes
none
Status
stable

Definition at line 90 of file createConnectionMatrix.h.

Referenced by createConnectionMatrix().

void createConnectionMatrixRNN ( Array< int > &  con,
unsigned  in,
unsigned  hidden,
unsigned  out,
unsigned  memory = 1,
bool  layered = false,
bool  recurrentInputs = true,
bool  bias = true,
bool  elman = false,
bool  previousInputs = false 
)

Creates a connection matrix for a recurrent network.

Changes
none
Status
stable

Definition at line 295 of file createConnectionMatrix.h.

References i.