OpenNN::PatternRecognitionTesting Class Reference

#include <pattern_recognition_testing.h>

List of all members.

Public Member Functions

 PatternRecognitionTesting (void)
 PatternRecognitionTesting (NeuralNetwork *)
 PatternRecognitionTesting (DataSet *)
 PatternRecognitionTesting (NeuralNetwork *, DataSet *)
 PatternRecognitionTesting (TiXmlElement *)
virtual ~PatternRecognitionTesting (void)
NeuralNetworkget_neural_network_pointer (void) const
DataSetget_data_set_pointer (void) const
const bool & get_display (void) const
void set_neural_network_pointer (NeuralNetwork *)
void set_data_set_pointer (DataSet *)
void set_display (const bool &)
void set_default (void)
Matrix< bool > calculate_binary_output_data (void) const
Matrix< bool > calculate_binary_training_output_data (void) const
Matrix< bool > calculate_binary_generalization_output_data (void) const
Matrix< bool > calculate_binary_testing_output_data (void) const
Matrix< bool > calculate_binary_target_data (void) const
Matrix< bool > calculate_binary_training_target_data (void) const
Matrix< bool > calculate_binary_generalization_target_data (void) const
Matrix< bool > calculate_binary_testing_target_data (void) const
Vector< double > calculate_binary_classification_test (void) const
Matrix< unsigned int > calculate_confusion (void) const
void save_binary_classification_test (const std::string &) const
void save_confusion (const std::string &) const
std::string to_string (void) const
virtual TiXmlElement * to_XML (void) const
virtual void from_XML (TiXmlElement *)


Detailed Description

This class contains some useful methods for pattern recognition (or classification) problem testing. That includes binary classification tests or confusion.

Definition at line 33 of file pattern_recognition_testing.h.


Constructor & Destructor Documentation

OpenNN::PatternRecognitionTesting::PatternRecognitionTesting ( void   )  [explicit]

Default constructor. It creates a pattern recognition utilites object not associated to any neural network neither any data set objects.

Definition at line 36 of file pattern_recognition_testing.cpp.

OpenNN::PatternRecognitionTesting::PatternRecognitionTesting ( NeuralNetwork new_neural_network_pointer  )  [explicit]

Neural network constructor. It creates a pattern recognition utilites object associated to a neural network but not to a data set.

Parameters:
new_neural_network_pointer Pointer to a neural network object.

Definition at line 49 of file pattern_recognition_testing.cpp.

OpenNN::PatternRecognitionTesting::PatternRecognitionTesting ( DataSet new_data_set_pointer  )  [explicit]

Data set constructor. It creates a pattern recognition utilites object associated to a data set but not to a neural network.

Parameters:
new_data_set_pointer Pointer to a data set object.

Definition at line 62 of file pattern_recognition_testing.cpp.

OpenNN::PatternRecognitionTesting::PatternRecognitionTesting ( NeuralNetwork new_neural_network_pointer,
DataSet new_data_set_pointer 
) [explicit]

General constructor. It creates a pattern recognition testing object associated to a neural network and a data set.

Parameters:
new_neural_network_pointer Pointer to a neural network object.
new_data_set_pointer Pointer to a data set object.

Definition at line 76 of file pattern_recognition_testing.cpp.

OpenNN::PatternRecognitionTesting::PatternRecognitionTesting ( TiXmlElement *  pattern_recognition_testing_element  )  [explicit]

XML constructor. It creates a pattern recognition 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.

Parameters:
pattern_recognition_testing_element XML element which contains the member data.

Definition at line 90 of file pattern_recognition_testing.cpp.

OpenNN::PatternRecognitionTesting::~PatternRecognitionTesting ( void   )  [virtual]

Destructor.

Definition at line 104 of file pattern_recognition_testing.cpp.


Member Function Documentation

NeuralNetwork * OpenNN::PatternRecognitionTesting::get_neural_network_pointer ( void   )  const

Structure with the results from a linear regression analysis.

This method returns a pointer to the neural network which is to be tested.

Definition at line 115 of file pattern_recognition_testing.cpp.

DataSet * OpenNN::PatternRecognitionTesting::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 125 of file pattern_recognition_testing.cpp.

const bool & OpenNN::PatternRecognitionTesting::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 136 of file pattern_recognition_testing.cpp.

void OpenNN::PatternRecognitionTesting::set_neural_network_pointer ( NeuralNetwork new_neural_network_pointer  ) 

This method sets a new neural network to be tested.

Parameters:
new_neural_network_pointer Pointer to the neural network object to be tested.

Definition at line 147 of file pattern_recognition_testing.cpp.

void OpenNN::PatternRecognitionTesting::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.

Parameters:
new_data_set_pointer Pointer to the data set object used for testing.

Definition at line 158 of file pattern_recognition_testing.cpp.

void OpenNN::PatternRecognitionTesting::set_display ( const bool &  new_display  ) 

This method sets a new display flag.

Parameters:
new_display Flag for displaying messages from this class or not.

Definition at line 169 of file pattern_recognition_testing.cpp.

void OpenNN::PatternRecognitionTesting::set_default ( void   ) 

This method sets the default values from the pattern recognition testing class:

  • Display: True.

Definition at line 183 of file pattern_recognition_testing.cpp.

Matrix< bool > OpenNN::PatternRecognitionTesting::calculate_binary_output_data ( void   )  const

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

Definition at line 565 of file pattern_recognition_testing.cpp.

Matrix< bool > OpenNN::PatternRecognitionTesting::calculate_binary_training_output_data ( void   )  const

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

Definition at line 666 of file pattern_recognition_testing.cpp.

Matrix< bool > OpenNN::PatternRecognitionTesting::calculate_binary_generalization_output_data ( void   )  const

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

Definition at line 775 of file pattern_recognition_testing.cpp.

Matrix< bool > OpenNN::PatternRecognitionTesting::calculate_binary_testing_output_data ( void   )  const

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

Definition at line 877 of file pattern_recognition_testing.cpp.

Matrix< bool > OpenNN::PatternRecognitionTesting::calculate_binary_target_data ( void   )  const

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

Definition at line 194 of file pattern_recognition_testing.cpp.

Matrix< bool > OpenNN::PatternRecognitionTesting::calculate_binary_training_target_data ( void   )  const

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

Definition at line 289 of file pattern_recognition_testing.cpp.

Matrix< bool > OpenNN::PatternRecognitionTesting::calculate_binary_generalization_target_data ( void   )  const

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

Definition at line 383 of file pattern_recognition_testing.cpp.

Matrix< bool > OpenNN::PatternRecognitionTesting::calculate_binary_testing_target_data ( void   )  const

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

Definition at line 475 of file pattern_recognition_testing.cpp.

Vector< double > OpenNN::PatternRecognitionTesting::calculate_binary_classification_test ( void   )  const

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 1149 of file pattern_recognition_testing.cpp.

Matrix< unsigned int > OpenNN::PatternRecognitionTesting::calculate_confusion ( void   )  const

This method returns the confusion matrix of a neural network on the testing instances of a data set.

Definition at line 978 of file pattern_recognition_testing.cpp.

void OpenNN::PatternRecognitionTesting::save_binary_classification_test ( const std::string &  filename  )  const

This method computes the binary classification test values and saves them into a data file.

Parameters:
filename Name of binary classification tests file.

Definition at line 1261 of file pattern_recognition_testing.cpp.

void OpenNN::PatternRecognitionTesting::save_confusion ( const std::string &  filename  )  const

This method computes the confusion matrix and saves it into a data file.

Parameters:
filename Name of confusion matrix file.

Definition at line 1295 of file pattern_recognition_testing.cpp.

std::string OpenNN::PatternRecognitionTesting::to_string ( void   )  const

This method returns a string representation of the current pattern recognition testing object.

Definition at line 1322 of file pattern_recognition_testing.cpp.

TiXmlElement * OpenNN::PatternRecognitionTesting::to_XML ( void   )  const [virtual]

This method serializes the pattern recognition testing object into a XML element of the TinyXML library. See the OpenNN manual for more information about the format of this element.

Todo:

Definition at line 1339 of file pattern_recognition_testing.cpp.

void OpenNN::PatternRecognitionTesting::from_XML ( TiXmlElement *   )  [virtual]

Todo:

Definition at line 1349 of file pattern_recognition_testing.cpp.


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

Generated on Sun Aug 26 11:58:19 2012 for OpenNN by  doxygen 1.5.9