Flood::FunctionRegressionUtilities Class Reference

#include <FunctionRegressionUtilities.h>

List of all members.

Public Member Functions

 FunctionRegressionUtilities (void)
 FunctionRegressionUtilities (MultilayerPerceptron *)
 FunctionRegressionUtilities (InputTargetDataSet *)
 FunctionRegressionUtilities (MultilayerPerceptron *, InputTargetDataSet *)
virtual ~FunctionRegressionUtilities ()
MultilayerPerceptronget_multilayer_perceptron_pointer (void)
InputTargetDataSetget_input_target_data_set_pointer (void)
bool get_display (void)
void set_multilayer_perceptron_pointer (MultilayerPerceptron *)
void set_input_target_data_set_pointer (InputTargetDataSet *)
void set_display (bool)
void generate_artificial_data (const Vector< double > &, const Vector< double > &, const Vector< std::string > &)
Vector< Matrix< double > > calculate_testing_target_output_data (void)
std::string get_testing_target_output_data (bool)
void print_testing_target_output_data (void)
void save_testing_target_output_data (const char *)
Vector< Vector< double > > calculate_linear_regression_parameters (void)
std::string get_linear_regression_parameters (bool)
void print_linear_regression_parameters (void)
void save_linear_regression_parameters (const char *)
std::string get_linear_regression_analysis (bool)
void print_linear_regression_analysis (void)
void save_linear_regression_analysis (const char *)


Detailed Description

This class contains methods which can useful when solving function regression problems. This includes artificial data generators of testing methods for this class of applications.

Definition at line 32 of file FunctionRegressionUtilities.h.


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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]

Destructor.

Definition at line 100 of file FunctionRegressionUtilities.cpp.


Member Function Documentation

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.

Parameters:
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:

  • Linear regression parameters.
  • Targets and outputs for the testing instances.
Parameters:
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).

Parameters:
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.

Parameters:
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.

Parameters:
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).

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
new_multilayer_perceptron_pointer Pointer to a multilayer perceptron object.

Definition at line 146 of file FunctionRegressionUtilities.cpp.


The documentation for this class was generated from the following files:

Generated on Fri Jul 30 09:52:00 2010 for Flood by  doxygen 1.5.9