SuperNN  1.0.0
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
SuperNN Namespace Reference

Namespaces

 Utils
 Functions used in other sections.
 

Classes

struct  ActFunc
 Activation function dispatcher. More...
 
struct  Batch
 Batch backpropagation. More...
 
struct  Bounds
 Data scaling information, for all input and output neurons. More...
 
struct  Connection
 Synaptic connection between two neurons. More...
 
struct  Data
 Data used in training, validation and testing. More...
 
struct  Elliot
 Elliot sigmoid-like function. More...
 
struct  ElliotSymmetric
 Elliot sigmoid-like function (Symmetric). More...
 
class  Exception
 The exception can be identified by the type() method. More...
 
struct  Gaussian
 Gaussian function. More...
 
struct  GaussianSymmetric
 Gaussian symmetric function. More...
 
struct  ImplBackprop
 Base class for the standard backpropagation algorithm. More...
 
struct  Incremental
 Incremental backpropagation. More...
 
struct  IRprop
 Improved resilient backpropagation algorithm. More...
 
struct  IRpropL1
 Modified improved resilient backpropagation algorithm. More...
 
struct  Layer
 Array of neurons. More...
 
struct  Linear
 Linear function. More...
 
struct  NBN
 Neuron by Neuron algorithm. More...
 
struct  Network
 Artificial neural network structure that supports arbitrary feedforward topologies, like multilayer perceptrons and fully connected cascade networks. More...
 
struct  Neuron
 Neuron, that can contain connections to neurons in the next layers. More...
 
struct  Runner
 Auxiliary class to ease the usage of an already trained neural network. More...
 
struct  Sigmoid
 Activation functions were not implemented in an OO way due to performance. More...
 
struct  SigmoidSymmetric
 Sigmoid symmetric function. More...
 
struct  Sign
 Sign function (net >= 0 ? 1 : -1). More...
 
struct  SInfo
 Minimum / maximum scaling information. More...
 
struct  TrainingAlgorithm
 Abstract class that provides the calculation of the error derivatives and the error accumulation, used by the derived backpropagation training algorithms. More...
 

Typedefs

typedef std::vector< double > Row
 Data row. More...
 

Enumerations

enum  ActFuncType {
  ACT_SIGMOID = 0, ACT_SIGMOID_SYMMETRIC, ACT_LINEAR, ACT_ELLIOT,
  ACT_ELLIOT_SYMMETRIC, ACT_GAUSSIAN, ACT_GAUSSIAN_SYMMETRIC, ACT_SIGN,
  ACT_LAST
}
 Activation functions built-in in the library. More...
 
enum  ErrorType {
  ERROR_COULDNT_OPEN_FILE, ERROR_INVALID_CONTENTS, ERROR_INVALID_PARAMETERS, ERROR_SINGULARITY,
  ERROR_NOT_DIFERENTIABLE, ERROR_DIMENSIONS_DO_NOT_MATCH, ERROR_GENERIC
}
 Errors that the library can throw. More...
 

Functions

SUPERNN_EXPORT unsigned early_stopping (TrainingAlgorithm &algo, Network &net, const Data &training, const SuperNN::Data &validation, unsigned step_size=1, unsigned max_stuck=20, unsigned max_epochs=1000)
 Trains an artificial neural network by using early stopping in order to avoid over-fitting. More...
 
SUPERNN_EXPORT double k_fold_error (TrainingAlgorithm &algo, const SuperNN::Network &net, const Data &data, unsigned k=10, double dmse=0, unsigned max_epochs=1000)
 Estimates the performance of a neural network for an independent data set by using k-fold cross validation. More...
 

Variables

const unsigned file_precision = 12
 Precision used when writting floating point number to files. More...
 

Typedef Documentation

typedef std::vector<double> SuperNN::Row

Data row.

Definition at line 90 of file data.hpp.

Enumeration Type Documentation

Activation functions built-in in the library.

Enumerator
ACT_SIGMOID 

Sigmoid activation function.

ACT_SIGMOID_SYMMETRIC 

Sigmoid symmetric activation function.

ACT_LINEAR 

Linear activation function.

ACT_ELLIOT 

Sigmoid-like activation function.

ACT_ELLIOT_SYMMETRIC 

Sigmoid-like activation function, symmetric version.

ACT_GAUSSIAN 

Gaussian activation function.

ACT_GAUSSIAN_SYMMETRIC 

Gaussian symmetric function.

ACT_SIGN 

Sign.

ACT_LAST 

End marker.

Definition at line 28 of file activation_type.hpp.

Errors that the library can throw.

Enumerator
ERROR_COULDNT_OPEN_FILE 

thrown when a file couldn't be opened

ERROR_INVALID_CONTENTS 

thrown when a file has invalid contents

ERROR_INVALID_PARAMETERS 

thrown when calling a function with invalid parameters

ERROR_SINGULARITY 

thrown when a matrix can't be solved/inverted

ERROR_NOT_DIFERENTIABLE 

thrown when training with a non-diferentiable activation function

ERROR_DIMENSIONS_DO_NOT_MATCH 

thrown when the dimensions of a Row and the network does not match

ERROR_GENERIC 

thrown when no other type applies

Definition at line 42 of file utils.hpp.

Function Documentation

unsigned SuperNN::early_stopping ( TrainingAlgorithm algo,
Network net,
const Data training,
const SuperNN::Data validation,
unsigned  step_size = 1,
unsigned  max_stuck = 20,
unsigned  max_epochs = 1000 
)

Trains an artificial neural network by using early stopping in order to avoid over-fitting.

The training is performed with the training set until the error on the validation set rises, indicating an overfitting.

To reduce the influence of local minima, the training continues for at least max_stuck iterations. The overfitting is verified every step_size steps.

Parameters
trainTraining algorithm to be evaluated
netArtificial neural network topology to be trained
trainingTraining data
validationValidation data
step_sizeNumber of epochs to train at each verification
max_stuckMaximum number of epochs to test for local minima
Returns
Number of epochs when the training stopped (before overfitting)

Definition at line 625 of file training.cpp.

double SuperNN::k_fold_error ( TrainingAlgorithm algo,
const SuperNN::Network net,
const Data data,
unsigned  k = 10,
double  dmse = 0,
unsigned  max_epochs = 1000 
)

Estimates the performance of a neural network for an independent data set by using k-fold cross validation.

Parameters
trainTraining algorithm to be evaluated
netArtificial neural network topology to be trained
dataData to be used in the training and validation
kNumber of partitions to use in the k-fold procedure
dmseDesired MSE (stopping condition)
max_epochsMax training epochs (stopping condition)

Definition at line 604 of file training.cpp.

Variable Documentation

const unsigned SuperNN::file_precision = 12

Precision used when writting floating point number to files.

Definition at line 39 of file utils.hpp.