Flood::PatternRecognitionUtilities Class Reference

#include <PatternRecognitionUtilities.h>

List of all members.

Public Member Functions

 PatternRecognitionUtilities (void)
 PatternRecognitionUtilities (MultilayerPerceptron *)
 PatternRecognitionUtilities (InputTargetDataSet *)
 PatternRecognitionUtilities (MultilayerPerceptron *, InputTargetDataSet *)
virtual ~PatternRecognitionUtilities (void)
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< Vector< double > > &, const Vector< Vector< double > > &, const Vector< double > &)
Matrix< bool > calculate_binary_output_data (void)
Matrix< bool > calculate_binary_training_output_data (void)
Matrix< bool > calculate_binary_validation_output_data (void)
Matrix< bool > calculate_binary_testing_output_data (void)
Matrix< bool > get_binary_target_data (void)
Matrix< bool > get_binary_training_target_data (void)
Matrix< bool > get_binary_validation_target_data (void)
Matrix< bool > get_binary_testing_target_data (void)
Vector< int > calculate_class_distribution (void)
std::string get_class_distribution_XML (bool)
void print_class_distribution (void)
void save_class_distribution (const char *)
Vector< double > calculate_binary_classification_test (void)
std::string get_binary_classification_test_XML (bool)
void print_binary_classification_test (void)
void save_binary_classification_test (const char *)
Matrix< int > calculate_confusion (void)
std::string get_confusion_XML (bool)
void print_confusion (void)
void save_confusion (const char *)


Detailed Description

This class contains some useful utilities for pattern recognition (or classification problems). That includes generating artificial data or performing testing of results.

Definition at line 32 of file PatternRecognitionUtilities.h.


Constructor & Destructor Documentation

Flood::PatternRecognitionUtilities::PatternRecognitionUtilities ( void   )  [explicit]

Default constructor. It creates a pattern recognition utilites object not associated to any multilayer perceptron neither any input-target data set objects.

Definition at line 36 of file PatternRecognitionUtilities.cpp.

Flood::PatternRecognitionUtilities::PatternRecognitionUtilities ( MultilayerPerceptron new_multilayer_perceptron_pointer  )  [explicit]

Multilayer perceptron constructor. It creates a pattern recognition utilites object associated to a multilayer perceptron but not to an input-target data set.

Parameters:
new_multilayer_perceptron_pointer Pointer to a multilayer perceptron object.

Definition at line 51 of file PatternRecognitionUtilities.cpp.

Flood::PatternRecognitionUtilities::PatternRecognitionUtilities ( InputTargetDataSet new_input_target_data_set_pointer  )  [explicit]

Input-target data set constructor. It creates a pattern recognition utilites 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 66 of file PatternRecognitionUtilities.cpp.

Flood::PatternRecognitionUtilities::PatternRecognitionUtilities ( MultilayerPerceptron new_multilayer_perceptron_pointer,
InputTargetDataSet new_input_target_data_set_pointer 
) [explicit]

General constructor. It creates a pattern recognition utilities object associated to a multilayer perceptron and an input-target data set.

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 83 of file PatternRecognitionUtilities.cpp.

Flood::PatternRecognitionUtilities::~PatternRecognitionUtilities ( void   )  [virtual]

Destructor.

Definition at line 96 of file PatternRecognitionUtilities.cpp.


Member Function Documentation

Vector< double > Flood::PatternRecognitionUtilities::calculate_binary_classification_test ( void   ) 

This method returns the results of a binary classification test in a single vector. The size of that vector is six. The elements are:

  • Classification accuracy
  • Error rate
  • Sensitivity
  • Specifity
  • Positive likelihood
  • Negative likelihood

Definition at line 1420 of file PatternRecognitionUtilities.cpp.

Matrix< bool > Flood::PatternRecognitionUtilities::calculate_binary_output_data ( void   ) 

This method retuns a Matrix containing the binary neural network outputs for all the instances in the input-target data set.

Definition at line 660 of file PatternRecognitionUtilities.cpp.

Matrix< bool > Flood::PatternRecognitionUtilities::calculate_binary_testing_output_data ( void   ) 

This method retuns a Matrix containing the binary neural network outputs for the training instances in the input-target data set.

Definition at line 951 of file PatternRecognitionUtilities.cpp.

Matrix< bool > Flood::PatternRecognitionUtilities::calculate_binary_training_output_data ( void   ) 

This method retuns a Matrix containing the binary neural network outputs for the training instances in the input-target data set.

Definition at line 756 of file PatternRecognitionUtilities.cpp.

Matrix< bool > Flood::PatternRecognitionUtilities::calculate_binary_validation_output_data ( void   ) 

This method retuns a Matrix containing the binary neural network outputs for the training instances in the input-target data set.

Definition at line 853 of file PatternRecognitionUtilities.cpp.

Vector< int > Flood::PatternRecognitionUtilities::calculate_class_distribution ( void   ) 

This method returns a vector containing the number of instances of each class in the input-target data set. If the number of target variables is one then the number of classes is two. If the number of target variables is greater than one then the number of classes is equal to the number of target variables.

Definition at line 1051 of file PatternRecognitionUtilities.cpp.

Matrix< int > Flood::PatternRecognitionUtilities::calculate_confusion ( void   ) 

This method returns the confusion matrix of a multilayer perceptron on the testing instances of an input-target data set.

Definition at line 1215 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::generate_artificial_data ( const Vector< Vector< double > > &  mean,
const Vector< Vector< double > > &  standard_deviation,
const Vector< double > &  prior_probability 
)

This method generates artificial input and target data to be used for classification purposes. The number of instances and variables are those of the input-target data set object member.

Parameters:
mean Mean values of the Gaussian data generators for the input variables.
standard_deviation Standard deviation values of the Gaussian data generators for the input variables.
prior_probability Prior probabilities of the target variables.

Definition at line 181 of file PatternRecognitionUtilities.cpp.

std::string Flood::PatternRecognitionUtilities::get_binary_classification_test_XML ( bool  show_declaration  ) 

This method returns an XML-type string with the results of a binary classification test.

Parameters:
show_declaration True if an XML-type declaration is to be included at the beginning.

Definition at line 1523 of file PatternRecognitionUtilities.cpp.

Matrix< bool > Flood::PatternRecognitionUtilities::get_binary_target_data ( void   ) 

This method returns a matrix with the binary values of all the instances of the target variables in the input-target data set.

Definition at line 316 of file PatternRecognitionUtilities.cpp.

Matrix< bool > Flood::PatternRecognitionUtilities::get_binary_testing_target_data ( void   ) 

This method returns a matrix with the binary values of the testing instances of the target variables in the input-target data set.

Definition at line 574 of file PatternRecognitionUtilities.cpp.

Matrix< bool > Flood::PatternRecognitionUtilities::get_binary_training_target_data ( void   ) 

This method returns a matrix with the binary values of the training instances of the target variables in the input-target data set.

Definition at line 403 of file PatternRecognitionUtilities.cpp.

Matrix< bool > Flood::PatternRecognitionUtilities::get_binary_validation_target_data ( void   ) 

This method returns a matrix with the binary values of the validation instances of the target variables in the input-target data set.

Definition at line 490 of file PatternRecognitionUtilities.cpp.

std::string Flood::PatternRecognitionUtilities::get_class_distribution_XML ( bool  show_declaration  ) 

This method returns a XML-type string with information about the ditribution of classes in the input-target data set.

Parameters:
show_declaration True if an XML-type declaration is to be included at the beginning.

Definition at line 1116 of file PatternRecognitionUtilities.cpp.

std::string Flood::PatternRecognitionUtilities::get_confusion_XML ( bool  show_declaration  ) 

This method returns a XML-type string with the confusion matrix of a multilayer perceptron on the testing instances of an input-target data set.

Definition at line 1349 of file PatternRecognitionUtilities.cpp.

bool Flood::PatternRecognitionUtilities::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 128 of file PatternRecognitionUtilities.cpp.

InputTargetDataSet * Flood::PatternRecognitionUtilities::get_input_target_data_set_pointer ( void   ) 

This method returns a pointer to the input-target data set object which is a member of this class.

Definition at line 117 of file PatternRecognitionUtilities.cpp.

MultilayerPerceptron * Flood::PatternRecognitionUtilities::get_multilayer_perceptron_pointer ( void   ) 

This method returns a pointer to the multilayer perceptron object which is a member of this class.

Definition at line 107 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::print_binary_classification_test ( void   ) 

This method prints to the screen the results from a binary classification test in XML-type format.

Definition at line 1568 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::print_class_distribution ( void   ) 

This method prints to the screen in XML-type format information concerned with the class distribution in the input-target data set.

Definition at line 1178 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::print_confusion ( void   ) 

This method prints to the screen in XML-type format the confusion matrix of a multilayer perceptron on a testing data set.

Definition at line 1374 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::save_binary_classification_test ( const char *  filename  ) 

This method saves to a XML-type file the results from a binary classifiaction test.

Parameters:
filename Name of binary classification test file.

Definition at line 1579 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::save_class_distribution ( const char *  filename  ) 

This method saves to a XML-type file information concerned with the class distribution in the input-target data set.

Parameters:
filename Name of XML-type class distribution file.

Definition at line 1190 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::save_confusion ( const char *  filename  ) 

This method saves to a XML-type file the confusion matrix of a multilayer perceptron on a testing data set.

Parameters:
filename Name of XML-type confustion matrix file.

Definition at line 1385 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::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 165 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::set_input_target_data_set_pointer ( InputTargetDataSet new_input_target_data_set_pointer  ) 

This method sets a new input-target data set pointer.

Parameters:
new_input_target_data_set_pointer Pointer to an input-target data set object.

Definition at line 152 of file PatternRecognitionUtilities.cpp.

void Flood::PatternRecognitionUtilities::set_multilayer_perceptron_pointer ( MultilayerPerceptron new_multilayer_perceptron_pointer  ) 

This method sets a new multilayer perceptron pointer.

Parameters:
new_multilayer_perceptron_pointer Pointer to a multilayer perceptron object.

Definition at line 140 of file PatternRecognitionUtilities.cpp.


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

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