#include <FunctionRegressionUtilities.h>
Definition at line 32 of file FunctionRegressionUtilities.h.
Flood::FunctionRegressionUtilities::FunctionRegressionUtilities | ( | void | ) | [explicit] |
Default constructor. It creates a function regression utilities object nor associated to a multilayer perceptron neither to an input-target data set.
Definition at line 36 of file FunctionRegressionUtilities.cpp.
Flood::FunctionRegressionUtilities::FunctionRegressionUtilities | ( | MultilayerPerceptron * | new_multilayer_perceptron_pointer | ) | [explicit] |
Multilayer perceptron constructor. It creates a function regression utilities object associated to a multilayer perceptron but not to a an input-target data set.
new_multilayer_perceptron_pointer | Pointer to a multilayer perceptron object. |
Definition at line 52 of file FunctionRegressionUtilities.cpp.
Flood::FunctionRegressionUtilities::FunctionRegressionUtilities | ( | InputTargetDataSet * | new_input_target_data_set_pointer | ) | [explicit] |
Input-target data set constructor. It creates a function regression utilities object associated to an input-target data set but not to a multilayer perceptron.
new_input_target_data_set_pointer | Pointer to an input-target data set object. |
Definition at line 68 of file FunctionRegressionUtilities.cpp.
Flood::FunctionRegressionUtilities::FunctionRegressionUtilities | ( | MultilayerPerceptron * | new_multilayer_perceptron_pointer, | |
InputTargetDataSet * | new_input_target_data_set_pointer | |||
) | [explicit] |
General constructor. It creates a function regression utilities object associated to a multilayer perceptron and an input-target data set objects.
new_multilayer_perceptron_pointer | Pointer to a multilayer perceptron object. | |
new_input_target_data_set_pointer | Pointer to an input-target data set object. |
Definition at line 86 of file FunctionRegressionUtilities.cpp.
Flood::FunctionRegressionUtilities::~FunctionRegressionUtilities | ( | ) | [virtual] |
Vector< Vector< double > > Flood::FunctionRegressionUtilities::calculate_linear_regression_parameters | ( | void | ) |
This method performs a linear regression analysis between the testing instances in the data set and the corresponding neural network outputs. It returns all the provided parameters in a vector of vectors. The number of elements in the vector is equal to the number of output variables. The size of each element is equal to the number of regression parameters (2). In this way, each subvector contains the regression parameters intercept and slope of an output variable.
Definition at line 317 of file FunctionRegressionUtilities.cpp.
Vector< Matrix< double > > Flood::FunctionRegressionUtilities::calculate_testing_target_output_data | ( | void | ) |
This method returns a vector of matrices with number of rows equal to number of testing instances and number of columns equal to two (the target value and the output value).
Definition at line 185 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::generate_artificial_data | ( | const Vector< double > & | mean, | |
const Vector< double > & | standard_deviation, | |||
const Vector< std::string > & | function_names | |||
) |
This method generates artificial input and target data, which can be useful for testing some neural networks algorithms. The data is generated acording to the number of instances and the number of input and output variables in the input-target data set object. The input data matrix is filled at random with values comprised between -1 and +1. The target data matrix is filled with some functions of several variables.
mean | Mean values for the input variables. | |
standard_deviation | Standard deviation values for the target variables. | |
function_names | Names of target functions ("ZeroFunction", "DeJongFunction", "RosenbrockFunction" or "RastriginFunction"). |
Definition at line 576 of file FunctionRegressionUtilities.cpp.
bool Flood::FunctionRegressionUtilities::get_display | ( | void | ) |
This method 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 134 of file FunctionRegressionUtilities.cpp.
InputTargetDataSet * Flood::FunctionRegressionUtilities::get_input_target_data_set_pointer | ( | void | ) |
This method returns a pointer to the input-target data set object used for validating the performance of a trained multilayer perceptron.
Definition at line 123 of file FunctionRegressionUtilities.cpp.
std::string Flood::FunctionRegressionUtilities::get_linear_regression_analysis | ( | bool | show_declaration | ) |
This method returns a XML-type string with the complete linear regression analysis results:
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 483 of file FunctionRegressionUtilities.cpp.
std::string Flood::FunctionRegressionUtilities::get_linear_regression_parameters | ( | bool | show_declaration | ) |
This method returns an XML-type string with the linear regression parameters (intercept and slope).
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 402 of file FunctionRegressionUtilities.cpp.
MultilayerPerceptron * Flood::FunctionRegressionUtilities::get_multilayer_perceptron_pointer | ( | void | ) |
This method returns a pointer to the multilayer perceptron object which is to be validated.
Definition at line 112 of file FunctionRegressionUtilities.cpp.
std::string Flood::FunctionRegressionUtilities::get_testing_target_output_data | ( | bool | show_declaration | ) |
This method returns a string in XML-type format with the targets and the corresponding outputs for the testing instances in the data set.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Definition at line 243 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::print_linear_regression_analysis | ( | void | ) |
This method prints to the screen the complete results from the linear regression analysis in an XML-type format.
Definition at line 527 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::print_linear_regression_parameters | ( | void | ) |
This method prints to the screen in an XML-type format the linear regression parameters (intercept and slope).
Definition at line 441 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::print_testing_target_output_data | ( | void | ) |
This method prints to the screen in XML-type format with the targets and the corresponding outputs for the testing instances in the data set.
Definition at line 274 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::save_linear_regression_analysis | ( | const char * | filename | ) |
This methods saves to an XML-type file the complete results of linear regression analysis of a multilayer perceptron on an input-target data set.
filename | Name of linear regression analysis XML-type file. |
Definition at line 539 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::save_linear_regression_parameters | ( | const char * | filename | ) |
This method saves to a XML-type file the linear regression parameters (intercept and slope).
filename | Name of linear regression parameters XML-type file. |
Definition at line 453 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::save_testing_target_output_data | ( | const char * | filename | ) |
This method saves to to a XML-type file the targets and the corresponding outputs for the testing instances in the data set.
Definition at line 286 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::set_display | ( | 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 174 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::set_input_target_data_set_pointer | ( | InputTargetDataSet * | new_input_target_data_set_pointer | ) |
This method sets a new input-target data set to be used for validating the quality of a trained multilayer perceptron.
new_input_target_data_set_pointer | Pointer to an input-target data set object. |
Definition at line 160 of file FunctionRegressionUtilities.cpp.
void Flood::FunctionRegressionUtilities::set_multilayer_perceptron_pointer | ( | MultilayerPerceptron * | new_multilayer_perceptron_pointer | ) |
This method sets a new multilayer perceptron which is to be validated.
new_multilayer_perceptron_pointer | Pointer to a multilayer perceptron object. |
Definition at line 146 of file FunctionRegressionUtilities.cpp.