OpenNN  2.2
Open Neural Networks Library
Classes | Public Member Functions | Private Attributes | List of all members
OpenNN::F1ScoreOptimizationThreshold Class Reference

#include <f1_score_optimization_threshold.h>

Inheritance diagram for OpenNN::F1ScoreOptimizationThreshold:


struct  F1ScoreOptimizationThresholdResults

Public Member Functions

 F1ScoreOptimizationThreshold (void)
 F1ScoreOptimizationThreshold (TrainingStrategy *)
 F1ScoreOptimizationThreshold (const tinyxml2::XMLDocument &)
 F1ScoreOptimizationThreshold (const std::string &)
virtual ~F1ScoreOptimizationThreshold (void)
const double & get_minimum_threshold (void) const
const double & get_maximum_threshold (void) const
const double & get_step (void) const
void set_default (void)
void set_minimum_threshold (const double &)
void set_maximum_threshold (const double &)
void set_step (const double &)
F1ScoreOptimizationThresholdResultsperform_threshold_selection (void)
Matrix< std::string > to_string_matrix (void) const
tinyxml2::XMLDocument * to_XML (void) const
void from_XML (const tinyxml2::XMLDocument &)
void write_XML (tinyxml2::XMLPrinter &) const
void save (const std::string &) const
void load (const std::string &)
- Public Member Functions inherited from OpenNN::ThresholdSelectionAlgorithm
 ThresholdSelectionAlgorithm (void)
 ThresholdSelectionAlgorithm (TrainingStrategy *)
 ThresholdSelectionAlgorithm (const std::string &)
 ThresholdSelectionAlgorithm (const tinyxml2::XMLDocument &)
virtual ~ThresholdSelectionAlgorithm (void)
TrainingStrategyget_training_strategy_pointer (void) const
bool has_training_strategy (void) const
const bool & get_reserve_binary_classification_tests_data (void) const
const bool & get_reserve_function_data (void) const
const bool & get_display (void) const
void set_training_strategy_pointer (TrainingStrategy *)
void set_default (void)
void set_reserve_binary_classification_tests_data (const bool &)
void set_reserve_function_data (const bool &)
void set_display (const bool &)
Matrix< size_t > calculate_confusion (const double &) const
Vector< double > calculate_binary_classification_test (const Matrix< size_t > &) const
void check (void) const

Private Attributes

double minimum_threshold
double maximum_threshold
double step

Additional Inherited Members

- Public Types inherited from OpenNN::ThresholdSelectionAlgorithm
enum  StoppingCondition { PerfectConfusionMatrix, AlgorithmFinished }
- Protected Attributes inherited from OpenNN::ThresholdSelectionAlgorithm
bool reserve_binary_classification_tests_data
bool reserve_function_data
bool display

Detailed Description

This concrete class represents a F1 score optimization for the threshold selection of a neural network.

Definition at line 47 of file f1_score_optimization_threshold.h.

Constructor & Destructor Documentation

◆ F1ScoreOptimizationThreshold() [1/3]

OpenNN::F1ScoreOptimizationThreshold::F1ScoreOptimizationThreshold ( TrainingStrategy new_training_strategy_pointer)

Training strategy constructor.

new_training_strategy_pointerPointer to a training strategy object.

Definition at line 37 of file f1_score_optimization_threshold.cpp.

◆ F1ScoreOptimizationThreshold() [2/3]

OpenNN::F1ScoreOptimizationThreshold::F1ScoreOptimizationThreshold ( const tinyxml2::XMLDocument &  f1_score_optimization_document)

XML constructor.

f1_score_optimization_documentPointer to a TinyXML document containing the f1 score optimization data.

Definition at line 48 of file f1_score_optimization_threshold.cpp.

◆ F1ScoreOptimizationThreshold() [3/3]

OpenNN::F1ScoreOptimizationThreshold::F1ScoreOptimizationThreshold ( const std::string &  file_name)

File constructor.

file_nameName of XML f1 score optimization file.

Definition at line 59 of file f1_score_optimization_threshold.cpp.

Member Function Documentation

◆ from_XML()

void OpenNN::F1ScoreOptimizationThreshold::from_XML ( const tinyxml2::XMLDocument &  document)

Deserializes a TinyXML document into this f1 score optmization object.

documentTinyXML document containing the member data.

Definition at line 533 of file f1_score_optimization_threshold.cpp.

◆ load()

void OpenNN::F1ScoreOptimizationThreshold::load ( const std::string &  file_name)

Loads a f1 score optimization object from a XML-type file.

file_nameName of f1 score optimization XML-type file.

Definition at line 664 of file f1_score_optimization_threshold.cpp.

◆ save()

void OpenNN::F1ScoreOptimizationThreshold::save ( const std::string &  file_name) const

Saves to a XML-type file the members of the f1 score optimization object.

file_nameName of f1 score optimization XML-type file.

Definition at line 649 of file f1_score_optimization_threshold.cpp.

◆ set_maximum_threshold()

void OpenNN::F1ScoreOptimizationThreshold::set_maximum_threshold ( const double &  new_maximum_threshold)

Sets the maximum value of the threshold selection algotihm.

new_maximum_thresholdMaximum threshold for the algorithm.

Definition at line 147 of file f1_score_optimization_threshold.cpp.

◆ set_minimum_threshold()

void OpenNN::F1ScoreOptimizationThreshold::set_minimum_threshold ( const double &  new_minimum_threshold)

Sets the minimum value of the threshold selection algotihm.

new_minimum_thresholdMinimum threshold for the algorithm.

Definition at line 122 of file f1_score_optimization_threshold.cpp.

◆ set_step()

void OpenNN::F1ScoreOptimizationThreshold::set_step ( const double &  new_step)

Sets the step between two iterations of the threshold selection algotihm.

new_stepDifference of threshold between two consecutive iterations.

Definition at line 172 of file f1_score_optimization_threshold.cpp.

◆ to_XML()

tinyxml2::XMLDocument * OpenNN::F1ScoreOptimizationThreshold::to_XML ( void  ) const

Prints to the screen the f1 score optimization parameters, the stopping criteria and other user stuff concerning the f1 score optmization object.

Definition at line 367 of file f1_score_optimization_threshold.cpp.

◆ write_XML()

void OpenNN::F1ScoreOptimizationThreshold::write_XML ( tinyxml2::XMLPrinter &  file_stream) const

Serializes the bounding layer object into a XML document of the TinyXML library without keep the DOM tree in memory. See the OpenNN manual for more information about the format of this document.

Definition at line 472 of file f1_score_optimization_threshold.cpp.

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