OpenNN
2.2
Open Neural Networks Library
|
#include <performance_functional.h>
Classes | |
struct | FirstOrderperformance |
struct | SecondOrderperformance |
struct | ZeroOrderperformance |
Public Types | |
enum | ObjectiveType { NO_OBJECTIVE, SUM_SQUARED_ERROR_OBJECTIVE, MEAN_SQUARED_ERROR_OBJECTIVE, ROOT_MEAN_SQUARED_ERROR_OBJECTIVE, NORMALIZED_SQUARED_ERROR_OBJECTIVE, MINKOWSKI_ERROR_OBJECTIVE, CROSS_ENTROPY_ERROR_OBJECTIVE, OUTPUTS_INTEGRALS_OBJECTIVE, SOLUTIONS_ERROR_OBJECTIVE, FINAL_SOLUTIONS_ERROR_OBJECTIVE, INDEPENDENT_PARAMETERS_ERROR_OBJECTIVE, INVERSE_SUM_SQUARED_ERROR_OBJECTIVE, USER_OBJECTIVE } |
enum | RegularizationType { NO_REGULARIZATION, NEURAL_PARAMETERS_NORM_REGULARIZATION, OUTPUTS_INTEGRALS_REGULARIZATION, USER_REGULARIZATION } |
enum | ConstraintsType { NO_CONSTRAINTS, OUTPUTS_INTEGRALS_CONSTRAINTS, SOLUTIONS_ERROR_CONSTRAINTS, FINAL_SOLUTIONS_ERROR_CONSTRAINTS, INDEPENDENT_PARAMETERS_ERROR_CONSTRAINTS, USER_CONSTRAINTS } |
This abstract class represents the concept of performance functional for a neural network. A performance functional is composed of three terms: An performance term, a regularization functional and a constraints functional. Any derived class must implement the calculate_performance(void) method.
Definition at line 62 of file performance_functional.h.
|
explicit |
Default constructor. It creates a performance functional object with all pointers initialized to NULL. It also initializes all the rest of class members to their default values.
Definition at line 27 of file performance_functional.cpp.
|
explicit |
Objective term constructor. It creates a performance functional object with a given objective functional. The rest of pointers are initialized to NULL. The other members are set to their default values, but the objective term type, which is set to USER_PERFORMANCE_TERM.
Definition at line 236 of file performance_functional.cpp.
|
explicit |
Neural network constructor. It creates a performance functional object associated to a neural network object. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. |
Definition at line 68 of file performance_functional.cpp.
|
explicit |
Neural network and data set constructor. It creates a performance functional object associated to a neural network and a data set objects. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. |
new_data_set_pointer | Pointer to a data set object. |
Definition at line 110 of file performance_functional.cpp.
|
explicit |
Neural network and mathematical model constructor. It creates a performance functional object associated to a neural network and a mathematical model objects. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. |
new_mathematical_model_pointer | Pointer to a mathematical model object. |
Definition at line 153 of file performance_functional.cpp.
|
explicit |
Neural network, mathematical model and data set constructor. It creates a performance functional object associated to a neural network, a mathematical model and a data set objects. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. |
new_mathematical_model_pointer | Pointer to a mathematical model object. |
new_data_set_pointer | Pointer to a data set object. |
Definition at line 196 of file performance_functional.cpp.
|
explicit |
File constructor. It creates a performance functional 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.
file_name | Name of performance functional file. |
Definition at line 276 of file performance_functional.cpp.
|
explicit |
XML constructor. It creates a performance functional object by loading its members from an XML document->
performance_functional_document | Pointer to a TinyXML document containing the performance functional data. |
Definition at line 317 of file performance_functional.cpp.
OpenNN::PerformanceFunctional::PerformanceFunctional | ( | const PerformanceFunctional & | other_performance_functional | ) |
Copy constructor. It creates a copy of an existing performance functional object.
other_performance_functional | Performance functional object to be copied. |
Definition at line 359 of file performance_functional.cpp.
|
virtual |
Destructor. It deletes the objective, regularization and constraints terms.
Definition at line 590 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_constraints | ( | void | ) | const |
Returns the constraints evaluation, according to the respective constraints type used in the performance functional expression.
Definition at line 3166 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_constraints | ( | const Vector< double > & | parameters | ) | const |
Returns the constraints evaluation, according to the respective constraints type used in the performance functional expression.
Definition at line 3240 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_constraints_gradient | ( | void | ) | const |
Returns the gradient of the constraints, according to the objective type. That gradient is the vector of partial derivatives of the constraints with respect to the parameters. The size is thus the number of parameters.
Definition at line 4260 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_constraints_gradient | ( | const Vector< double > & | parameters | ) | const |
Returns the gradient of the constraints, according to the objective type. That gradient is the vector of partial derivatives of the constraints with respect to the parameters. The size is thus the number of parameters.
Definition at line 4337 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_constraints_Hessian | ( | void | ) | const |
Returns the Hessian of the constraints, according to the constraints type. That Hessian is the matrix of second partial derivatives of the constraints with respect to the parameters. That matrix is symmetric, with size the number of parameters.
Definition at line 4784 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_constraints_Hessian | ( | const Vector< double > & | ) | const |
Returns the Hessian of the constraints, according to the constraints type. That Hessian is the matrix of second partial derivatives of the constraints with respect to the parameters. That matrix is symmetric, with size the number of parameters.
Definition at line 4862 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_constraints_terms | ( | void | ) | const |
Definition at line 3517 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_constraints_terms_Jacobian | ( | void | ) | const |
Returns the Jacobian of the constraints terms function, according to the constraints type used in the performance functional expression. Note that this function is only defined when the objective can be expressed as a sum of squared terms. The Jacobian elements are the partial derivatives of a single term with respect to a single parameter. The number of rows in the Jacobian matrix are the number of parameters, and the number of columns the number of terms composing the constraints.
Definition at line 3809 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_first_order_Taylor_approximation | ( | const Vector< double > & | parameters | ) | const |
Returns the Taylor approximation of the performance function at some point near the parameters. The order of the approximation here is one, i.e., both the performance value and the performance gradient are used.
parameters | Approximation point. |
Definition at line 5552 of file performance_functional.cpp.
|
virtual |
Calculates the generalization performance, as the sum of the objective and the regularization terms.
Definition at line 5215 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_gradient | ( | const Vector< double > & | parameters | ) | const |
Returns the performance gradient for a given vector of parameters. It does not set that vector of parameters to the neural network.
parameters | Vector of parameters for the neural network associated to the performance functional. |
Definition at line 5262 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_Hessian | ( | void | ) | const |
Returns the default objective function Hessian matrix, which is computed as the sum of the objective, regularization and constraints Hessians.
Definition at line 5301 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_Hessian | ( | const Vector< double > & | parameters | ) | const |
Returns which would be the objective function Hessian of a neural network for an hypothetical vector of parameters. It does not set that vector of parameters to the neural network.
parameters | Vector of potential parameters for the neural network associated to this performance functional. |
Definition at line 5323 of file performance_functional.cpp.
|
virtual |
Returns inverse matrix of the Hessian. It first computes the Hessian matrix and then computes its inverse.
Definition at line 5419 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_objective | ( | void | ) | const |
Returns the objective evaluation, according to the respective objective type used in the performance functional expression.
Definition at line 2814 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_objective | ( | const Vector< double > & | parameters | ) | const |
Returns the objective evaluation, according to the respective objective type used in the performance functional expression.
Definition at line 2930 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_objective_gradient | ( | void | ) | const |
Returns the gradient of the objective, according to the objective type. That gradient is the vector of partial derivatives of the objective with respect to the parameters. The size is thus the number of parameters.
Definition at line 3892 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_objective_gradient | ( | const Vector< double > & | parameters | ) | const |
Returns the gradient of the objective, according to the objective type. That gradient is the vector of partial derivatives of the objective with respect to the parameters. The size is thus the number of parameters.
Definition at line 4011 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_objective_Hessian | ( | void | ) | const |
Returns the Hessian of the objective, according to the objective type. That Hessian is the matrix of second partial derivatives of the objective with respect to the parameters. That matrix is symmetric, with size the number of parameters.
Definition at line 4414 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_objective_Hessian | ( | const Vector< double > & | parameters | ) | const |
Returns the Hessian of the objective, according to the objective type. That Hessian is the matrix of second partial derivatives of the objective with respect to the parameters. That matrix is symmetric, with size the number of parameters.
Definition at line 4534 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_objective_terms | ( | void | ) | const |
Returns the evaluation of all the objective terms, according to the respective objective type used in the performance functional expression. Note that this function is only defined when the objective can be expressed as a sum of squared terms.
Definition at line 3315 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_objective_terms_Jacobian | ( | void | ) | const |
Returns the Jacobian of the objective terms function, according to the objective type used in the performance functional expression. Note that this function is only defined when the objective can be expressed as a sum of squared terms. The Jacobian elements are the partial derivatives of a single term with respect to a single parameter. The number of rows in the Jacobian matrix are the number of parameters, and the number of columns the number of terms composing the objective.
Definition at line 3603 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_performance | ( | void | ) | const |
Calculates the evaluation value of the performance functional, as the sum of the objective, regularization and constraints functionals.
Definition at line 4938 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_performance | ( | const Vector< double > & | parameters | ) | const |
Returns the performance of a neural network for a given vector of parameters. It does not set that vector of parameters to the neural network.
parameters | Vector of parameters for the neural network associated to the performance functional. |
Definition at line 4960 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_performance | ( | const Vector< double > & | direction, |
const double & | rate | ||
) | const |
Returns the value of the performance function at some step along some direction.
direction | Direction vector. |
rate | Step value. |
Definition at line 5638 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_performance_derivative | ( | const Vector< double > & | direction, |
const double & | rate | ||
) | const |
Returns the derivative of the performance function at some step along some direction.
direction | Direction vector. |
rate | Step value. |
Definition at line 5653 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_performance_second_derivative | ( | const Vector< double > & | direction, |
const double & | rate | ||
) | const |
Returns the second derivative of the performance function at some step along some direction.
direction | Direction vector. |
rate | Step value. |
Definition at line 5677 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_regularization | ( | void | ) | const |
Returns the regularization evaluation, according to the respective regularization type used in the performance functional expression.
Definition at line 3046 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_regularization | ( | const Vector< double > & | parameters | ) | const |
Returns the regularization evaluation, according to the respective regularization type used in the performance functional expression.
Definition at line 3106 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_regularization_gradient | ( | void | ) | const |
Returns the gradient of the regularization, according to the regularization type. That gradient is the vector of partial derivatives of the regularization with respect to the parameters. The size is thus the number of parameters.
Definition at line 4130 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_regularization_gradient | ( | const Vector< double > & | parameters | ) | const |
Returns the gradient of the regularization, according to the regularization type. That gradient is the vector of partial derivatives of the regularization with respect to the parameters. The size is thus the number of parameters.
Definition at line 4195 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_regularization_Hessian | ( | void | ) | const |
Returns the Hessian of the regularization, according to the regularization type. That Hessian is the matrix of second partial derivatives of the regularization with respect to the parameters. That matrix is symmetric, with size the number of parameters.
Definition at line 4653 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_regularization_Hessian | ( | const Vector< double > & | ) | const |
Returns the Hessian of the regularization, according to the regularization type. That Hessian is the matrix of second partial derivatives of the regularization with respect to the parameters. That matrix is symmetric, with size the number of parameters.
Definition at line 4719 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_regularization_terms | ( | void | ) | const |
Definition at line 3456 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_regularization_terms_Jacobian | ( | void | ) | const |
Returns the Jacobian of the regularization terms function, according to the regularization type used in the performance functional expression. Note that this function is only defined when the objective can be expressed as a sum of squared terms. The Jacobian elements are the partial derivatives of a single term with respect to a single parameter. The number of rows in the Jacobian matrix are the number of parameters, and the number of columns the number of terms composing the regularization.
Definition at line 3745 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_second_order_Taylor_approximation | ( | const Vector< double > & | parameters | ) | const |
Returns the Taylor approximation of the performance function at some point near the parameters. The order of the approximation here is two, i.e., the performance value, the performance gradient and the performance Hessian are used.
parameters | Approximation point. |
Definition at line 5591 of file performance_functional.cpp.
Vector< double > OpenNN::PerformanceFunctional::calculate_terms | ( | void | ) | const |
Evaluates the objective, regularization and constraints terms functions, and returns the total performance terms as the assembly of that three vectors.
Definition at line 5358 of file performance_functional.cpp.
Matrix< double > OpenNN::PerformanceFunctional::calculate_terms_Jacobian | ( | void | ) | const |
Definition at line 5384 of file performance_functional.cpp.
|
virtual |
Returns the default product of some vector with the objective function Hessian matrix, which is computed using numerical differentiation.
vector | Vector in the dot product. |
Definition at line 5452 of file performance_functional.cpp.
double OpenNN::PerformanceFunctional::calculate_zero_order_Taylor_approximation | ( | const Vector< double > & | ) | const |
Returns the Taylor approximation of the performance function at some point near the parameters. The order of the approximation here is zero, i.e., only the performance value is used.
Definition at line 5540 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::check_performance_terms | ( | void | ) | const |
Throws an exception if the performance functional has not got any objective, regularization or constraints terms.
Definition at line 766 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::destruct_constraints | ( | void | ) |
This method deletes the constraints term object. It also sets the constraints term type to NONE and the corresponding flag to false.
Definition at line 2779 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::destruct_objective | ( | void | ) |
This method deletes the objective term object. It also sets the objective term type to NONE and the corresponding flag to false.
Definition at line 2723 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::destruct_regularization | ( | void | ) |
This method deletes the regularization term object. It also sets the regularization term type to NONE and the corresponding flag to false.
Definition at line 2760 of file performance_functional.cpp.
|
virtual |
Sets the performance functional member data from an XML document.
document | Pointer to a TinyXML document with the performance functional data. |
Definition at line 6115 of file performance_functional.cpp.
CrossEntropyError * OpenNN::PerformanceFunctional::get_cross_entropy_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the cross entropy error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 929 of file performance_functional.cpp.
const bool & OpenNN::PerformanceFunctional::get_display | ( | void | ) | const |
Returns true if messages from this class can be displayed on the screen, or false if messages from this class can't be displayed on the screen.
Definition at line 1678 of file performance_functional.cpp.
FinalSolutionsError * OpenNN::PerformanceFunctional::get_final_solutions_error_constraints_pointer | ( | void | ) | const |
Returns a pointer to the final solutions error which is used as constraints. If that object does not exists, an exception is thrown.
Definition at line 1266 of file performance_functional.cpp.
FinalSolutionsError * OpenNN::PerformanceFunctional::get_final_solutions_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the final solutions error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 1014 of file performance_functional.cpp.
IndependentParametersError * OpenNN::PerformanceFunctional::get_independent_parameters_error_constraints_pointer | ( | void | ) | const |
Returns a pointer to the independent parameters error which is used as constraints. If that object does not exists, an exception is thrown.
Definition at line 1294 of file performance_functional.cpp.
IndependentParametersError * OpenNN::PerformanceFunctional::get_independent_parameters_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the independent parameters error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 1042 of file performance_functional.cpp.
InverseSumSquaredError * OpenNN::PerformanceFunctional::get_inverse_sum_squared_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the inverse sum squared error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 1070 of file performance_functional.cpp.
MeanSquaredError * OpenNN::PerformanceFunctional::get_mean_squared_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the mean squared error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 817 of file performance_functional.cpp.
MinkowskiError * OpenNN::PerformanceFunctional::get_Minkowski_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the Minkowski error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 901 of file performance_functional.cpp.
NeuralParametersNorm * OpenNN::PerformanceFunctional::get_neural_parameters_norm_regularization_pointer | ( | void | ) | const |
Returns a pointer to the neural parameters norm functional which is used as regularization. If that object does not exists, an exception is thrown.
Definition at line 1126 of file performance_functional.cpp.
NormalizedSquaredError * OpenNN::PerformanceFunctional::get_normalized_squared_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the normalized squared error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 873 of file performance_functional.cpp.
OutputsIntegrals * OpenNN::PerformanceFunctional::get_outputs_integrals_constraints_pointer | ( | void | ) | const |
Returns a pointer to the outputs integrals which is used as constraints. If that object does not exists, an exception is thrown.
Definition at line 1210 of file performance_functional.cpp.
OutputsIntegrals * OpenNN::PerformanceFunctional::get_outputs_integrals_objective_pointer | ( | void | ) | const |
Returns a pointer to the outputs integrals which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 958 of file performance_functional.cpp.
OutputsIntegrals * OpenNN::PerformanceFunctional::get_outputs_integrals_regularization_pointer | ( | void | ) | const |
Returns a pointer to the outputs integrals functional which is used as regularization. If that object does not exists, an exception is thrown.
Definition at line 1154 of file performance_functional.cpp.
RootMeanSquaredError * OpenNN::PerformanceFunctional::get_root_mean_squared_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the root mean squared error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 845 of file performance_functional.cpp.
SolutionsError * OpenNN::PerformanceFunctional::get_solutions_error_constraints_pointer | ( | void | ) | const |
Returns a pointer to the solutions error which is used as constraints. If that object does not exists, an exception is thrown.
Definition at line 1238 of file performance_functional.cpp.
SolutionsError * OpenNN::PerformanceFunctional::get_solutions_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the solutions error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 986 of file performance_functional.cpp.
SumSquaredError * OpenNN::PerformanceFunctional::get_sum_squared_error_objective_pointer | ( | void | ) | const |
Returns a pointer to the sum squared error which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 789 of file performance_functional.cpp.
PerformanceTerm * OpenNN::PerformanceFunctional::get_user_constraints_pointer | ( | void | ) | const |
Returns a pointer to the user constraints functional. If that object does not exists, an exception is thrown.
Definition at line 1322 of file performance_functional.cpp.
PerformanceTerm * OpenNN::PerformanceFunctional::get_user_objective_pointer | ( | void | ) | const |
Returns a pointer to the user performance term which is used as objective. If that object does not exists, an exception is thrown.
Definition at line 1098 of file performance_functional.cpp.
PerformanceTerm * OpenNN::PerformanceFunctional::get_user_regularization_pointer | ( | void | ) | const |
Returns a pointer to the user regularization functional. If that object does not exists, an exception is thrown.
Definition at line 1182 of file performance_functional.cpp.
bool OpenNN::PerformanceFunctional::has_data_set | ( | void | ) | const |
Returns true if this performance functional has a data set associated, and false otherwise.
Definition at line 667 of file performance_functional.cpp.
bool OpenNN::PerformanceFunctional::has_generalization | ( | void | ) | const |
Returns true if this performance functional has a generalization method defined, and false otherwise.
Definition at line 685 of file performance_functional.cpp.
bool OpenNN::PerformanceFunctional::has_mathematical_model | ( | void | ) | const |
Returns true if this performance functional has a mathematical model associated, and false otherwise.
Definition at line 649 of file performance_functional.cpp.
bool OpenNN::PerformanceFunctional::has_neural_network | ( | void | ) | const |
Returns true if this performance functional has a neural network associated, and false otherwise.
Definition at line 631 of file performance_functional.cpp.
bool OpenNN::PerformanceFunctional::is_sum_squared_terms | ( | void | ) | const |
Returns true if the performance functional can be expressed as the sum of squared terms. Only those performance functionals are suitable for the Levenberg-Marquardt training algorithm.
Definition at line 710 of file performance_functional.cpp.
|
virtual |
Loads a default performance functional XML-type file.
file_name | Name of default XML-type performance functional file. |
Definition at line 6720 of file performance_functional.cpp.
|
virtual |
Saves to a XML-type file a string representation of the performance functional object.
file_name | Name of XML-type performance functional file. |
Definition at line 6698 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_constraints_type | ( | const ConstraintsType & | new_constraints_type | ) |
Creates a new constraints term inside the performance functional of a given performance term type.
new_constraints_type | Type of constraints term to be created. |
Definition at line 2659 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_constraints_type | ( | const std::string & | new_constraints_type | ) |
Sets a new type for the constraints term from a string.
new_constraints_type | String with the type of constraints term. |
Definition at line 2444 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_data_set_pointer | ( | DataSet * | new_data_set_pointer | ) |
Sets a new data set on which it will be measured the performance functional.
new_data_set_pointer | Pointer to an external data set object. |
Definition at line 2089 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_display | ( | const bool & | new_display | ) |
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 2490 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_mathematical_model_pointer | ( | MathematicalModel * | new_mathematical_model_pointer | ) |
Sets a new mathematical model on which it will be measured the performance functional.
new_mathematical_model_pointer | Pointer to an external mathematical model object. |
Definition at line 1889 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_neural_network_pointer | ( | NeuralNetwork * | new_neural_network_pointer | ) |
Sets a pointer to a multilayer perceptron object which is to be associated to the performance functional.
new_neural_network_pointer | Pointer to a neural network object to be associated to the performance functional. |
Definition at line 1689 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_objective_type | ( | const ObjectiveType & | new_objective_type | ) |
Creates a new objective term inside the performance functional of a given performance term type.
new_objective_type | Type of objective term to be created. |
Definition at line 2501 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_objective_type | ( | const std::string & | new_objective_type | ) |
Sets a new type for the objective term from a string.
new_objective_type | String with the type of objective term. |
Definition at line 2344 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_regularization_type | ( | const RegularizationType & | new_regularization_type | ) |
Creates a new regularization term inside the performance functional of a given performance term type.
new_regularization_type | Type of regularization term to be created. |
Definition at line 2607 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_regularization_type | ( | const std::string & | new_regularization_type | ) |
Sets a new type for the regularization term from a string.
new_regularization_type | String with the type of regularization term. |
Definition at line 2412 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_user_constraints_pointer | ( | PerformanceTerm * | new_user_constraints_pointer | ) |
Sets the constraints term to be a specialized one provided by the user.
new_user_constraints_pointer | Pointer to a performance term object. |
Definition at line 2319 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_user_objective_pointer | ( | PerformanceTerm * | new_user_objective_pointer | ) |
Sets the objective term to be a specialized one provided by the user.
new_user_objective_pointer | Pointer to a performance term object. |
Definition at line 2289 of file performance_functional.cpp.
void OpenNN::PerformanceFunctional::set_user_regularization_pointer | ( | PerformanceTerm * | new_user_regularization_pointer | ) |
Sets the regularization term to be a specialized one provided by the user.
new_user_regularization_pointer | Pointer to a performance term object. |
Definition at line 2304 of file performance_functional.cpp.
|
virtual |
Serializes a default performance functional object into a XML document of the TinyXML library. See the OpenNN manual for more information about the format of this element.
Definition at line 5700 of file performance_functional.cpp.
|
virtual |
Returns any useful information about the objective function during training. By default it is an empty string.
Definition at line 6744 of file performance_functional.cpp.