#include <neural_network.h>
Definition at line 48 of file neural_network.h.
OpenNN::NeuralNetwork::NeuralNetwork | ( | void | ) | [explicit] |
Default constructor. It creates an empty neural network object. All pointers in the object are initialized to NULL. The rest of members are initialized to their default values.
Definition at line 43 of file neural_network.cpp.
OpenNN::NeuralNetwork::NeuralNetwork | ( | const MultilayerPerceptron & | new_multilayer_perceptron | ) | [explicit] |
Multilayer Perceptron constructor. It creates a neural network object from a given multilayer perceptron. The rest of pointers are initialized to NULL. This constructor also initializes the rest of class members to their default values.
Definition at line 64 of file neural_network.cpp.
OpenNN::NeuralNetwork::NeuralNetwork | ( | const Vector< unsigned int > & | new_multilayer_perceptron_architecture | ) | [explicit] |
Multilayer perceptron architecture constructor. It creates a neural network object with a multilayer perceptron given by its architecture. The rest of pointers are initialized to NULL. This constructor also initializes the rest of class members to their default values.
new_multilayer_perceptron_architecture | Vector with the number of inputs and the numbers of perceptrons in each layer. The size of this vector must be equal to one plus the number of layers. |
Definition at line 89 of file neural_network.cpp.
OpenNN::NeuralNetwork::NeuralNetwork | ( | const unsigned int & | new_inputs_number, | |
const unsigned int & | new_perceptrons_number | |||
) | [explicit] |
One layer constructor. It creates a one-layer perceptron object. The number of independent parameters is set to zero. The multilayer perceptron parameters are initialized at random.
new_inputs_number | Number of inputs in the layer. | |
new_perceptrons_number | Number of perceptrons in the layer. |
Definition at line 114 of file neural_network.cpp.
OpenNN::NeuralNetwork::NeuralNetwork | ( | const unsigned int & | new_inputs_number, | |
const unsigned int & | new_hidden_perceptrons_number, | |||
const unsigned int & | new_output_perceptrons_number | |||
) | [explicit] |
Two layers constructor. It creates a neural network object with a two layers perceptron. The rest of pointers of this object are initialized to NULL. The other members are initialized to their default values.
new_inputs_number | Number of inputs in the multilayer perceptron | |
new_hidden_perceptrons_number | Number of neurons in the hidden layer of the multilayer perceptron | |
new_output_perceptrons_number | Number of outputs neurons. |
Definition at line 140 of file neural_network.cpp.
OpenNN::NeuralNetwork::NeuralNetwork | ( | const unsigned int & | new_independent_parameters_number | ) | [explicit] |
Independent parameters constructor. It creates a neural network with only independent parameters. The independent parameters are initialized at random.
new_independent_parameters_number | Number of independent parameters associated to the multilayer perceptron |
Definition at line 163 of file neural_network.cpp.
OpenNN::NeuralNetwork::NeuralNetwork | ( | const std::string & | filename | ) | [explicit] |
File constructor. It creates a neural network object by loading its members from an XML-type file. Please be careful with the format of that file, which is specified in the OpenNN manual.
filename | Name of neural network file. |
Definition at line 186 of file neural_network.cpp.
OpenNN::NeuralNetwork::NeuralNetwork | ( | const NeuralNetwork & | other_neural_network | ) |
Copy constructor. It creates a copy of an existing neural network object.
other_neural_network | Neural network object to be copied. |
Definition at line 206 of file neural_network.cpp.
OpenNN::NeuralNetwork::~NeuralNetwork | ( | void | ) | [virtual] |
NeuralNetwork & OpenNN::NeuralNetwork::operator= | ( | const NeuralNetwork & | other_neural_network | ) |
Assignment operator. It assigns to this object the members of an existing neural network object.
other_neural_network | Neural network object to be assigned. |
Definition at line 243 of file neural_network.cpp.
bool OpenNN::NeuralNetwork::operator== | ( | const NeuralNetwork & | other_neural_network | ) | const |
Equal to operator.
other_neural_network | Neural network object to be assigned. |
Definition at line 287 of file neural_network.cpp.
MultilayerPerceptron * OpenNN::NeuralNetwork::get_multilayer_perceptron_pointer | ( | void | ) | const |
This method returns a pointer to the multilayer perceptron composing this neural network.
Definition at line 319 of file neural_network.cpp.
InputsOutputsInformation * OpenNN::NeuralNetwork::get_inputs_outputs_information_pointer | ( | void | ) | const |
This method returns a pointer to the inputs outputs information object composing this neural network.
Definition at line 379 of file neural_network.cpp.
ScalingLayer * OpenNN::NeuralNetwork::get_scaling_layer_pointer | ( | void | ) | const |
This method returns a pointer to the scaling layer composing this neural network.
Definition at line 329 of file neural_network.cpp.
UnscalingLayer * OpenNN::NeuralNetwork::get_unscaling_layer_pointer | ( | void | ) | const |
This method returns a pointer to the unscaling layer composing this neural network.
Definition at line 339 of file neural_network.cpp.
BoundingLayer * OpenNN::NeuralNetwork::get_bounding_layer_pointer | ( | void | ) | const |
This method returns a pointer to the bounding layer composing this neural network.
Definition at line 349 of file neural_network.cpp.
ProbabilisticLayer * OpenNN::NeuralNetwork::get_probabilistic_layer_pointer | ( | void | ) | const |
This method returns a pointer to the probabilistic layer composing this neural network.
Definition at line 359 of file neural_network.cpp.
ConditionsLayer * OpenNN::NeuralNetwork::get_conditions_layer_pointer | ( | void | ) | const |
This method returns a pointer to the conditions layer composing this neural network.
Definition at line 369 of file neural_network.cpp.
IndependentParameters * OpenNN::NeuralNetwork::get_independent_parameters_pointer | ( | void | ) | const |
This method returns a pointer to the independent parameters object composing this neural network.
Definition at line 389 of file neural_network.cpp.
const bool & OpenNN::NeuralNetwork::get_multilayer_perceptron_flag | ( | void | ) | const |
This method returns the flag used by the neural network to apply the multilayer perceptron or not.
Definition at line 399 of file neural_network.cpp.
const bool & OpenNN::NeuralNetwork::get_scaling_layer_flag | ( | void | ) | const |
This method returns the flag used by the neural network to apply the scaling layer or not.
Definition at line 409 of file neural_network.cpp.
const bool & OpenNN::NeuralNetwork::get_unscaling_layer_flag | ( | void | ) | const |
This method returns the flag used by the neural network to apply the unscaling layer or not.
Definition at line 419 of file neural_network.cpp.
const bool & OpenNN::NeuralNetwork::get_bounding_layer_flag | ( | void | ) | const |
This method returns the flag used by the neural network to apply the bounding layer or not.
Definition at line 429 of file neural_network.cpp.
const bool & OpenNN::NeuralNetwork::get_probabilistic_layer_flag | ( | void | ) | const |
This method returns the flag used by the neural network to apply the probabilistic layer or not.
Definition at line 439 of file neural_network.cpp.
const bool & OpenNN::NeuralNetwork::get_conditions_layer_flag | ( | void | ) | const |
This method returns the flag used by the neural network to apply the conditions layer or not.
Definition at line 449 of file neural_network.cpp.
const bool & OpenNN::NeuralNetwork::get_display | ( | void | ) | const |
This method returns true if messages from this class are to be displayed on the screen, or false if messages from this class are not to be displayed on the screen.
Definition at line 460 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set | ( | void | ) |
This method deletes all the pointers in the neural network. It also sets the rest of members to their default values.
Definition at line 471 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set | ( | const MultilayerPerceptron & | new_multilayer_perceptron | ) |
This method deletes all the pointers in the neural network and then constructs a copy of an exisiting multilayer perceptron. It also sets the rest of members to their default values.
new_multilayer_perceptron | Multilayer perceptron object to be copied. |
Definition at line 485 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set | ( | const Vector< unsigned int > & | new_multilayer_perceptron_architecture | ) |
This method sets a new neural network with a given multilayer perceptron architecture. It also sets the rest of members to their default values.
new_multilayer_perceptron_architecture | Architecture of the multilayer perceptron. |
Definition at line 501 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set | ( | const unsigned int & | new_inputs_number, | |
const unsigned int & | new_outputs_number | |||
) |
This method sets a new multilayer_perceptron_pointer architecture with one layer and zero independent parameters. It also sets the rest of members to their default values.
new_inputs_number | Number of inputs. | |
new_outputs_number | Number of outputs. |
Definition at line 518 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set | ( | const unsigned int & | new_inputs_number, | |
const unsigned int & | new_hidden_neurons_number, | |||
const unsigned int & | new_outputs_number | |||
) |
This method sets a new multilayer_perceptron_pointer architecture with one hidden layer and zero independent parameters. It also sets the rest of members to their default values.
new_inputs_number | Number of inputs. | |
new_hidden_neurons_number | Number of neurons in the hidden layer. | |
new_outputs_number | Number of outputs. |
Definition at line 536 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set | ( | const unsigned int & | new_independent_parameters_number | ) |
This method sets a null new multilayer_perceptron_pointer architecture a given number of independent parameters. It also sets the rest of members to their default values.
new_independent_parameters_number | Number of independent_parameters_pointer. |
Definition at line 552 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set | ( | const std::string & | filename | ) |
This method sets the neural network members by loading them from a XML file.
filename | Neural network XML filename. |
Definition at line 567 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set | ( | const NeuralNetwork & | other_neural_network | ) |
This method sets the members of this neural network object with those from other neural network object.
other_neural_network | Neural network object to be copied. |
Definition at line 580 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_default | ( | void | ) | [virtual] |
This method sets those members which are not pointer to their default values.
Definition at line 650 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_multilayer_perceptron_pointer | ( | MultilayerPerceptron * | new_multilayer_perceptron_pointer | ) |
This method sets a new multilayer perceptron within the neural network.
new_multilayer_perceptron_pointer | Pointer to a multilayer perceptron object. Note that the neural network destructror will delete this pointer. |
Definition at line 669 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_scaling_layer_pointer | ( | ScalingLayer * | new_scaling_layer_pointer | ) |
This method sets a new scaling layer within the neural network.
new_scaling_layer_pointer | Pointer to a scaling layer object. Note that the neural network destructror will delete this pointer. |
Definition at line 686 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_unscaling_layer_pointer | ( | UnscalingLayer * | new_unscaling_layer_pointer | ) |
This method sets a new unscaling layer within the neural network.
new_unscaling_layer_pointer | Pointer to an unscaling layer object. Note that the neural network destructror will delete this pointer. |
Definition at line 703 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_bounding_layer_pointer | ( | BoundingLayer * | new_bounding_layer_pointer | ) |
This method sets a new bounding layer within the neural network.
new_bounding_layer_pointer | Pointer to a bounding layer object. Note that the neural network destructror will delete this pointer. |
Definition at line 720 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_probabilistic_layer_pointer | ( | ProbabilisticLayer * | new_probabilistic_layer_pointer | ) |
This method sets a new probabilistic layer within the neural network.
new_probabilistic_layer_pointer | Pointer to a probabilistic layer object. Note that the neural network destructror will delete this pointer. |
Definition at line 737 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_conditions_layer_pointer | ( | ConditionsLayer * | new_conditions_layer_pointer | ) |
This method sets a new conditions layer within the neural network.
new_conditions_layer_pointer | Pointer to a conditions layer object. Note that the neural network destructror will delete this pointer. |
Definition at line 754 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_inputs_outputs_information_pointer | ( | InputsOutputsInformation * | new_inputs_outputs_information_pointer | ) |
This method sets a new inputs-outputs information object within the neural network.
new_inputs_outputs_information_pointer | Pointer to an inputs-outputs information object. Note that the neural network destructror will delete this pointer. |
Definition at line 771 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_independent_parameters_pointer | ( | IndependentParameters * | new_independent_parameters_pointer | ) |
This method sets new independent parameters within the neural network.
new_independent_parameters_pointer | Pointer to an independent parameters object. Note that the neural network destructror will delete this pointer. |
Definition at line 788 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_multilayer_perceptron_flag | ( | const bool & | new_multilayer_perceptron_flag | ) |
This method sets the flag for using a multilayer perceptron within the neural network or not.
new_multilayer_perceptron_flag | True if the multilayer perceptron is to be used, and false otherwise. |
Definition at line 804 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_scaling_layer_flag | ( | const bool & | new_scaling_layer_flag | ) |
This method sets the flag for scaling the inputs to the multilayer perceptron or not.
new_scaling_layer_flag | True if the inputs are to be scaled, and false otherwise. |
Definition at line 815 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_unscaling_layer_flag | ( | const bool & | new_unscaling_layer_flag | ) |
This method sets the flag for unscaling the outputs from the multilayer perceptron or not.
new_unscaling_layer_flag | True if the outputs are to be unscaled, and false otherwise. |
Definition at line 838 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_scaling_unscaling_layers_flag | ( | const bool & | new_scaling_unscaling_layers_flag | ) |
This method sets a unique flag for scaling the inputs and unscaling the outputs.
new_scaling_unscaling_layers_flag | True if the inputs are to be scaled and the outputs unscaled, false otherwise. |
Definition at line 861 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_bounding_layer_flag | ( | const bool & | new_bounding_layer_flag | ) |
This method sets the flag for using a bounding layer for the outputs or not.
new_bounding_layer_flag | True if the outputs are to be bounded, and false otherwise. |
Definition at line 873 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_probabilistic_layer_flag | ( | const bool & | new_probabilistic_layer_flag | ) |
This method sets the flag for using a probabilistic layer in the neural network. A probabilistic layer is used if the outputs are to be interpreted as probabilities, and false otherwise.
new_probabilistic_layer_flag | Flag for using a probabilistic layer not. |
Definition at line 897 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_conditions_layer_flag | ( | const bool & | new_conditions_layer_flag | ) |
This method sets the flag for applying some boundary conditions defined by a particular and an homogeneous solutions.
new_conditions_layer_flag | True if the boundary conditions are to be applied, and false otherwise. |
Definition at line 920 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_display | ( | const bool & | new_display | ) |
This method sets a new display value. If it is set to true messages from this class are to be displayed on the screen; if it is set to false messages from this class are not to be displayed on the screen.
new_display | Display value. |
Definition at line 1555 of file neural_network.cpp.
void OpenNN::NeuralNetwork::construct_multilayer_perceptron | ( | void | ) |
This method constructs an empty multilayer perceptron within the neural network. It also sets the corresponding flag to true.
Definition at line 1146 of file neural_network.cpp.
void OpenNN::NeuralNetwork::construct_scaling_layer | ( | void | ) |
This method constructs a scaling layer within the neural network. The size of the scaling layer is the number of inputs in the multilayer perceptron. It also sets the corresponding flag to true.
Definition at line 1163 of file neural_network.cpp.
void OpenNN::NeuralNetwork::construct_unscaling_layer | ( | void | ) |
This method constructs an unscaling layer within the neural network. The size of the unscaling layer is the number of outputs in the multilayer perceptron. It also sets the corresponding flag to true.
Definition at line 1187 of file neural_network.cpp.
void OpenNN::NeuralNetwork::construct_bounding_layer | ( | void | ) |
This method constructs a bounding layer within the neural network. The size of the bounding layer is the number of outputs in the multilayer perceptron. It also sets the corresponding flag to true.
Definition at line 1211 of file neural_network.cpp.
void OpenNN::NeuralNetwork::construct_probabilistic_layer | ( | void | ) |
This method constructs a probabilistic layer within the neural network. The size of the probabilistic layer is the number of outputs in the multilayer perceptron. It also sets the corresponding flag to true.
Definition at line 1235 of file neural_network.cpp.
void OpenNN::NeuralNetwork::construct_conditions_layer | ( | void | ) |
This method constructs a conditions layer within the neural network. The number of external inputs in the conditions layer is the number of inputs in the multilayer perceptron. The size fo the conditions layer is the number of outputs in the multilayer perceptron. It also sets the corresponding flag to true.
Definition at line 1260 of file neural_network.cpp.
void OpenNN::NeuralNetwork::construct_inputs_outputs_information | ( | void | ) |
This method constructs an inputs outputs information object within the neural network. The number of inputs is the number of inputs in the multilayer perceptron. The number of outputs is the number of outputs in the multilayer perceptron.
Definition at line 1286 of file neural_network.cpp.
void OpenNN::NeuralNetwork::construct_independent_parameters | ( | void | ) |
This method constructs an independent parameters object within the neural network. It sets the number of parameters to zero.
Definition at line 1309 of file neural_network.cpp.
void OpenNN::NeuralNetwork::destruct_multilayer_perceptron | ( | void | ) |
This method deletes the multilayer perceptron within the neural network. It also sets the corresponding flag to false.
Definition at line 1323 of file neural_network.cpp.
void OpenNN::NeuralNetwork::destruct_scaling_layer | ( | void | ) |
This method deletes the scaling layer within the neural network. It also sets the corresponding flag to false.
Definition at line 1338 of file neural_network.cpp.
void OpenNN::NeuralNetwork::destruct_unscaling_layer | ( | void | ) |
This method deletes the unscaling layer within the neural network. It also sets the corresponding flag to false.
Definition at line 1353 of file neural_network.cpp.
void OpenNN::NeuralNetwork::destruct_bounding_layer | ( | void | ) |
This method deletes the bounding layer within the neural network. It also sets the corresponding flag to false.
Definition at line 1368 of file neural_network.cpp.
void OpenNN::NeuralNetwork::destruct_probabilistic_layer | ( | void | ) |
This method deletes the probabilistic layer within the neural network. It also sets the corresponding flag to false.
Definition at line 1383 of file neural_network.cpp.
void OpenNN::NeuralNetwork::destruct_conditions_layer | ( | void | ) |
This method deletes the conditions layer within the neural network. It also sets the corresponding flag to false.
Definition at line 1398 of file neural_network.cpp.
void OpenNN::NeuralNetwork::destruct_inputs_outputs_information | ( | void | ) |
This method deletes the inputs-outputs information object within the neural network.
Definition at line 1412 of file neural_network.cpp.
void OpenNN::NeuralNetwork::destruct_independent_parameters | ( | void | ) |
This method deletes the independent parameters object within the neural network.
Definition at line 1424 of file neural_network.cpp.
void OpenNN::NeuralNetwork::delete_pointers | ( | void | ) |
This method deletes all the pointers composing the neural network:
Definition at line 1119 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_random | ( | void | ) |
This method initializes the neural network at random. This is useful for testing purposes.
Definition at line 1437 of file neural_network.cpp.
unsigned int OpenNN::NeuralNetwork::count_layers_number | ( | void | ) |
This method returns the number of layers in the neural network. That includes perceptron, scaling, unscaling, bounding, probabilistic or conditions layers.
Definition at line 1566 of file neural_network.cpp.
unsigned int OpenNN::NeuralNetwork::count_parameters_number | ( | void | ) | const |
This method returns the number of parameters in the multilayer perceptron The number of parameters is the sum of all the multilayer_perceptron_pointer parameters (biases and synaptic weights) and independent parameters.
Definition at line 945 of file neural_network.cpp.
Vector< double > OpenNN::NeuralNetwork::arrange_parameters | ( | void | ) | const |
This method returns the values of the parameters in the multilayer perceptron as a single vector. This contains all the multilayer_perceptron_pointer parameters (biases and synaptic weights) and preprocessed independent parameters.
Definition at line 968 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_parameters | ( | const Vector< double > & | new_parameters | ) |
This method sets all the parameters (multilayer_perceptron_pointer parameters and independent parameters) from a single vector.
new_parameters | New set of parameter values. |
Definition at line 1033 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters | ( | const double & | value | ) |
This method initializes all the neural and the independent parameters with a given value.
Definition at line 1608 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters_uniform | ( | void | ) |
This method initializes all the parameters in the newtork (biases and synaptic weiths + independent parameters) at random with values comprised between -1 and +1.
Definition at line 1627 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters_uniform | ( | const double & | minimum, | |
const double & | maximum | |||
) |
This method initializes all the parameters in the newtork (biases and synaptic weiths + independent parameters) at random with values comprised between a given minimum and a given maximum values.
minimum | Minimum initialization value. | |
maximum | Maximum initialization value. |
Definition at line 1648 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters_uniform | ( | const Vector< double > & | minimum, | |
const Vector< double > & | maximum | |||
) |
This method initializes all the parameters in the newtork (biases and synaptic weiths + independent parameters) at random with values comprised between a different minimum and maximum numbers for each free parameter.
minimum | Vector of minimum initialization values. | |
maximum | Vector of maximum initialization values. |
Definition at line 1670 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters_uniform | ( | const Vector< Vector< double > > & | minimum_maximum | ) |
This method initializes all the parameters in the newtork (biases and synaptic weiths + independent parameters) values comprised between a different minimum and maximum numbers for each parameter. Minimum and maximum initialization values are given from a vector of two real vectors. The first element must contain the minimum initialization value for each parameter. The second element must contain the maximum initialization value for each parameter.
minimum_maximum | Vector of minimum and maximum initialization vectors. |
Definition at line 1693 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters_normal | ( | void | ) |
This method initializes all the parameters in the neural newtork (biases and synaptic weiths + independent parameters) at random with values chosen from a normal distribution with mean 0 and standard deviation 1.
Definition at line 1712 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters_normal | ( | const double & | mean, | |
const double & | standard_deviation | |||
) |
This method initializes all the parameters in the newtork (biases and synaptic weiths + independent parameters) at random with values chosen from a normal distribution with a given mean and a given standard deviation.
mean | Mean of normal distribution. | |
standard_deviation | Standard deviation of normal distribution. |
Definition at line 1734 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters_normal | ( | const Vector< double > & | mean, | |
const Vector< double > & | standard_deviation | |||
) |
This method initializes all the parameters in the neural newtork (biases and synaptic weiths + independent parameters) at random with values chosen from normal distributions with a given mean and a given standard deviation for each parameter.
mean | Vector of minimum initialization values. | |
standard_deviation | Vector of maximum initialization values. |
Definition at line 1756 of file neural_network.cpp.
void OpenNN::NeuralNetwork::initialize_parameters_normal | ( | const Vector< Vector< double > > & | mean_standard_deviation | ) |
This method initializes all the parameters in the newtork (biases and synaptic weiths + independent parameters) at random with values chosen from normal distributions with a given mean and a given standard deviation for each parameter. All mean and standard deviation values are given from a vector of two real vectors. The first element must contain the mean value for each parameter. The second element must contain the standard deviation value for each parameter.
mean_standard_deviation | Mean and standard deviation vectors. |
Definition at line 1780 of file neural_network.cpp.
double OpenNN::NeuralNetwork::calculate_parameters_norm | ( | void | ) | const |
This method returns the norm of the vector of parameters.
Definition at line 1798 of file neural_network.cpp.
This method calculates the outputs vector from the multilayer perceptron in response to an inputs vector. The activity for that is the following:
inputs | Set of inputs to the multilayer perceptron |
Definition at line 1822 of file neural_network.cpp.
Matrix< double > OpenNN::NeuralNetwork::calculate_Jacobian | ( | const Vector< double > & | inputs | ) | const |
This method returns the Jacobian Matrix of the multilayer perceptron for a set of inputs, corresponding to the point in inputs space at which the Jacobian Matrix is to be found. It uses a forward-propagation method.
inputs | Set of inputs to the multilayer perceptron |
Definition at line 2003 of file neural_network.cpp.
Vector< Matrix< double > > OpenNN::NeuralNetwork::calculate_Hessian_form | ( | const Vector< double > & | inputs | ) | const |
This method returns the second partial derivatives of the outputs with respect to the inputs.
Definition at line 2157 of file neural_network.cpp.
Vector< double > OpenNN::NeuralNetwork::calculate_parameters_output | ( | const Vector< double > & | inputs, | |
const Vector< double > & | parameters | |||
) | const |
This method returns which would be the outputs for a given inputs and a set of parameters.
inputs | Vector of inputs to the multilayer perceptron | |
parameters | Vector of potential parameters of the neural network. |
Definition at line 1902 of file neural_network.cpp.
Matrix< double > OpenNN::NeuralNetwork::calculate_parameters_Jacobian | ( | const Vector< double > & | inputs, | |
const Vector< double > & | parameters | |||
) | const |
This method returns the partial derivatives of the outputs with respect to the multilayer_perceptron_pointer parameters.
Definition at line 2146 of file neural_network.cpp.
Vector< Matrix< double > > OpenNN::NeuralNetwork::calculate_parameters_Hessian_form | ( | const Vector< double > & | inputs, | |
const Vector< double > & | parameters | |||
) | const |
This method returns the second partial derivatives of the outputs with respect to the multilayer_perceptron_pointer parameters.
Definition at line 2168 of file neural_network.cpp.
Matrix< double > OpenNN::NeuralNetwork::calculate_output_data | ( | const Matrix< double > & | input_data | ) | const |
This method calculates a set of outputs from the multilayer perceptron in response to a set of inputs. The format is a matrix, where each row is a single inputs vector.
input_data | Matrix of inputs to the neural network. |
Definition at line 1954 of file neural_network.cpp.
This method returns all the available information about the inputs and output variables. The format is a vector of pointers to vectors of size six:
Definition at line 2277 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_inputs_outputs_information | ( | const Vector< Vector< std::string > > & | new_inputs_outputs_information | ) |
This method sets all the possible information about the inputs and output variables. The format is a vector of vectors of size eight:
new_inputs_outputs_information | Input and output variables information. |
Definition at line 2188 of file neural_network.cpp.
This method returns all the available statistics of the inputs and output variables. The format is a vector of pointers to vectors of size ten:
Definition at line 2327 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_inputs_outputs_statistics | ( | const Vector< Vector< double > > & | new_inputs_outputs_statistics | ) |
This method sets all the available statistics about the inputs and output variables. The format is a vector of ten real vectors:
new_inputs_outputs_statistics | Input and output variables statistics. |
Definition at line 2611 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_inputs_outputs_minimums_maximums | ( | const Vector< Vector< double > > & | new_inputs_outputs_minimum_maximum | ) |
This method sets the scaling and unscaling layers minimums and maximums from a single vector. The format is:
new_inputs_outputs_minimum_maximum | Vector with the minimums and maximums of the input and output variables. |
Definition at line 2395 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_inputs_outputs_means_standard_deviations | ( | const Vector< Vector< double > > & | new_inputs_outputs_mean_standard_deviation | ) |
This method sets the scaling and unscaling layers means and standard deviations from a single vector. The format is:
new_inputs_outputs_mean_standard_deviation | Vector with the means and standard deviations of the input and output variables. |
Definition at line 2496 of file neural_network.cpp.
void OpenNN::NeuralNetwork::set_inputs_scaling_outputs_unscaling_methods | ( | const std::string & | new_inputs_scaling_outputs_unscaling_methods | ) |
This method sets the scaling method of the scaling layer and the unscaling method of the unscaling layer.
new_inputs_scaling_outputs_unscaling_methods | Method for scaling inputs and uscaling outputs. It can be "MinimumMaximum" and "MeanStandardDeviation". |
Definition at line 2706 of file neural_network.cpp.
std::string OpenNN::NeuralNetwork::to_string | ( | void | ) | const |
This method returns a string representation of the current neural network object.
Definition at line 2735 of file neural_network.cpp.
TiXmlElement * OpenNN::NeuralNetwork::to_XML | ( | void | ) | const [virtual] |
This method serializes the neural network object into a XML element of the TinyXML library. See the OpenNN manual for more information about the format of this element.
Definition at line 2814 of file neural_network.cpp.
void OpenNN::NeuralNetwork::from_XML | ( | TiXmlElement * | neural_network_element | ) | [virtual] |
This method deserializes a TinyXML element into this neural network object.
neural_network_element | Pointer to a XML element containing the member data. |
Definition at line 2966 of file neural_network.cpp.
void OpenNN::NeuralNetwork::print | ( | void | ) | const |
This method prints to the screen the members of a neural network object in a XML-type format.
Definition at line 3231 of file neural_network.cpp.
void OpenNN::NeuralNetwork::save | ( | const std::string & | filename | ) | const |
This method saves to a XML-type format file the members of a neural network object.
filename | Name of multilayer perceptron XML-type file. |
Definition at line 3245 of file neural_network.cpp.
void OpenNN::NeuralNetwork::save_parameters | ( | const std::string & | filename | ) | const |
This method saves to a data file the parameters of a neural network object.
filename | Name of parameters data file. |
Definition at line 3270 of file neural_network.cpp.
void OpenNN::NeuralNetwork::load | ( | const std::string & | filename | ) | [virtual] |
This method loads from a XML-type file the members of a neural network object. Please mind about the file format, which is specified in the User's Guide.
filename | Name of multilayer perceptron XML-type file. |
Definition at line 3301 of file neural_network.cpp.
void OpenNN::NeuralNetwork::load_parameters | ( | const std::string & | filename | ) |
This method loads the multilayer perceptron parameters from a data file. The format of this file is just a sequence of numbers.
filename | Name of parameters data file. |
Definition at line 3339 of file neural_network.cpp.
void OpenNN::NeuralNetwork::save_data | ( | const std::string & | filename | ) | const |
This method saves a set of input-output values from the neural network to a data file.
filename | Name of data file. |
Definition at line 3537 of file neural_network.cpp.
std::string OpenNN::NeuralNetwork::write_expression | ( | void | ) | const |
void OpenNN::NeuralNetwork::save_expression | ( | const std::string & | filename | ) |
This method saves the mathematical expression represented by the neural network to a text file.
filename | Name of expression text file. |
Definition at line 3511 of file neural_network.cpp.
ScalingLayer* OpenNN::NeuralNetwork::scaling_layer_pointer [protected] |
bool OpenNN::NeuralNetwork::multilayer_perceptron_flag [protected] |
bool OpenNN::NeuralNetwork::scaling_layer_flag [protected] |
bool OpenNN::NeuralNetwork::unscaling_layer_flag [protected] |
bool OpenNN::NeuralNetwork::bounding_layer_flag [protected] |
bool OpenNN::NeuralNetwork::probabilistic_layer_flag [protected] |
bool OpenNN::NeuralNetwork::conditions_layer_flag [protected] |
bool OpenNN::NeuralNetwork::display [protected] |