#include <function_regression_testing.h>
Definition at line 34 of file function_regression_testing.h.
OpenNN::FunctionRegressionTesting::FunctionRegressionTesting | ( | void | ) | [explicit] |
Default constructor. It creates a function regression testing object neither associated to a neural network nor to a data set.
Definition at line 36 of file function_regression_testing.cpp.
OpenNN::FunctionRegressionTesting::FunctionRegressionTesting | ( | NeuralNetwork * | new_neural_network_pointer | ) | [explicit] |
Neural network constructor. It creates a function regression testing object associated to a neural network but not to a a data set.
new_neural_network_pointer | Pointer to a neural network object. |
Definition at line 50 of file function_regression_testing.cpp.
OpenNN::FunctionRegressionTesting::FunctionRegressionTesting | ( | DataSet * | new_data_set_pointer | ) | [explicit] |
Data set constructor. It creates a function regression testing object associated to a data set but not to a neural network.
new_data_set_pointer | Pointer to a data set object. |
Definition at line 64 of file function_regression_testing.cpp.
OpenNN::FunctionRegressionTesting::FunctionRegressionTesting | ( | NeuralNetwork * | new_neural_network_pointer, | |
DataSet * | new_data_set_pointer | |||
) | [explicit] |
General constructor. It creates a function regression testing object associated to a neural network and a data set objects.
new_neural_network_pointer | Pointer to a neural network object. | |
new_data_set_pointer | Pointer to a data set object. |
Definition at line 79 of file function_regression_testing.cpp.
OpenNN::FunctionRegressionTesting::FunctionRegressionTesting | ( | TiXmlElement * | function_regression_testing_element | ) | [explicit] |
XML constructor. It creates a function regression testing object neither associated to a neural network nor to a data set objects. It also loads the members of this object from a TinyXML element.
function_regression_testing_element | XML element which contains the member data. |
Definition at line 94 of file function_regression_testing.cpp.
OpenNN::FunctionRegressionTesting::~FunctionRegressionTesting | ( | void | ) | [virtual] |
Destructor. It does not delete any pointer.
Definition at line 109 of file function_regression_testing.cpp.
NeuralNetwork * OpenNN::FunctionRegressionTesting::get_neural_network_pointer | ( | void | ) | const |
This method returns a pointer to the neural network which is to be tested.
Definition at line 118 of file function_regression_testing.cpp.
DataSet * OpenNN::FunctionRegressionTesting::get_data_set_pointer | ( | void | ) | const |
This method returns a pointer to the data set object on which the neural network is tested.
Definition at line 128 of file function_regression_testing.cpp.
const bool & OpenNN::FunctionRegressionTesting::get_display | ( | void | ) | const |
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 139 of file function_regression_testing.cpp.
void OpenNN::FunctionRegressionTesting::set_neural_network_pointer | ( | NeuralNetwork * | new_neural_network_pointer | ) |
This method sets a new neural network to be tested.
new_neural_network_pointer | Pointer to the neural network object to be tested. |
Definition at line 150 of file function_regression_testing.cpp.
void OpenNN::FunctionRegressionTesting::set_data_set_pointer | ( | DataSet * | new_data_set_pointer | ) |
This method sets a new data set on which the neural network is to be tested.
new_data_set_pointer | Pointer to the data set object used for testing. |
Definition at line 161 of file function_regression_testing.cpp.
void OpenNN::FunctionRegressionTesting::set_display | ( | const bool & | new_display | ) |
This method sets a new display flag.
new_display | Flag for displaying messages from this class or not. |
Definition at line 172 of file function_regression_testing.cpp.
void OpenNN::FunctionRegressionTesting::set_default | ( | void | ) |
This method sets the default values from the function regression testing class:
Definition at line 185 of file function_regression_testing.cpp.
void OpenNN::FunctionRegressionTesting::check | ( | void | ) | const |
This method checks that:
Definition at line 260 of file function_regression_testing.cpp.
Vector< Matrix< double > > OpenNN::FunctionRegressionTesting::calculate_scaled_target_output_data | ( | void | ) | const |
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 targets value and the outputs value).
Definition at line 196 of file function_regression_testing.cpp.
Vector< Vector< double > > OpenNN::FunctionRegressionTesting::calculate_linear_regression_parameters | ( | void | ) | const |
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 293 of file function_regression_testing.cpp.
FunctionRegressionTesting::LinearRegressionAnalysisResults OpenNN::FunctionRegressionTesting::perform_linear_regression_analysis | ( | void | ) | const |
This method performs a linear regression analysis of a neural network on the testing indices of a data set. It returns a linear regression analysis results structure, which consists on:
Definition at line 384 of file function_regression_testing.cpp.
This method calculates the errors between the outputs from a neural network and the testing instances in a data set. It returns a vector of tree matrices:
Definition at line 425 of file function_regression_testing.cpp.
Vector< Vector< Vector< double > > > OpenNN::FunctionRegressionTesting::calculate_error_data_statistics | ( | void | ) | const |
This method calculates the basic statistics on the error data (to do).
Definition at line 491 of file function_regression_testing.cpp.
Vector< Vector< Vector< double > > > OpenNN::FunctionRegressionTesting::calculate_error_data_histogram | ( | const unsigned int & | bins_number | ) | const |
This method calculates histograms for the relative errors of all the output variables. The number of bins is set by the user.
bins_number | Number of bins in the histograms. |
Definition at line 505 of file function_regression_testing.cpp.
Vector< Vector< Vector< double > > > OpenNN::FunctionRegressionTesting::calculate_error_data_histogram | ( | void | ) | const |
This method calculates histograms for the relative errors of all the output variables. The number of bins is the default (10).
Definition at line 518 of file function_regression_testing.cpp.
std::string OpenNN::FunctionRegressionTesting::to_string | ( | void | ) | const |
This method returns a string representation of this function regression testing object.
Definition at line 530 of file function_regression_testing.cpp.
TiXmlElement * OpenNN::FunctionRegressionTesting::to_XML | ( | void | ) | const [virtual] |
This method serializes this function regression testing object into a TinyXML element. Please read the OpenNN manual for more information about this.
Definition at line 547 of file function_regression_testing.cpp.
void OpenNN::FunctionRegressionTesting::from_XML | ( | TiXmlElement * | ) | [virtual] |
This method deserializes a TinyXML element into this function regression testing object.
Definition at line 559 of file function_regression_testing.cpp.