SuperNN
1.0.0
|
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 std::vector<double> SuperNN::Row |
enum SuperNN::ActFuncType |
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.
enum SuperNN::ErrorType |
Errors that the library can throw.
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.
train | Training algorithm to be evaluated |
net | Artificial neural network topology to be trained |
training | Training data |
validation | Validation data |
step_size | Number of epochs to train at each verification |
max_stuck | Maximum number of epochs to test for local minima |
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.
train | Training algorithm to be evaluated |
net | Artificial neural network topology to be trained |
data | Data to be used in the training and validation |
k | Number of partitions to use in the k-fold procedure |
dmse | Desired MSE (stopping condition) |
max_epochs | Max training epochs (stopping condition) |
Definition at line 604 of file training.cpp.