GEGELATI

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Log::LABasicLogger Class Reference

Basic logger that will display some useful information. More...

`#include <laBasicLogger.h>`

Inheritance diagram for Log::LABasicLogger:

## Public Member Functions
| LABasicLogger (Learn::LearningAgent &la, std::ostream &out=std::cout)
| Same constructor as LaLogger. Default output is cout.
virtual void | logHeader () override
| Logs the header (column names) of the tab that will be logged.
virtual void | logNewGeneration (uint64_t &generationNumber) override
| Logs the generation of training.
virtual void | logAfterPopulateTPG () override
| Logs the vertices nb of the tpg.
virtual void | logAfterEvaluate (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) override
| Logs the min, avg and max score of the generation.
virtual void | logAfterDecimate () override
| Does nothing in this logger.
virtual void | logAfterValidate (std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > &results) override
| Logs the min, avg and max score of the generation.
virtual void | logEndOfTraining () override
| Logs the eval, valid (if doValidation is true) and total running time.
Public Member Functions inherited from Log::LALogger
| LALogger (Learn::LearningAgent &la, std::ostream &out=std::cout)
| Constructor defining a given output and setting start and checkpoint as now. Default output is cout.
void | chronoFromNow ()
| Updates checkpoint to now.
Public Member Functions inherited from Log::Logger
| Logger (std::ostream &out=std::cout)
| Constructor initializing a specific output. Default is cout.
virtual | ~Logger ()=default
| Virtual default destructor for polyphormism support.
Logger | operator<< (std::ostream &(*manip)(std::ostream &))
| << operator to manipulate stream and enter stream-specific elements (like std::endl).
template<typename T >
Logger | operator<< (const T &val)
| << operator allowing to log elements that ostream actually accepts (char, int...).

## Additional Inherited Members
Public Attributes inherited from Log::LALogger
bool | doValidation = false
bool | useUtility = false
Protected Member Functions inherited from Log::LALogger
double | getDurationFrom (const std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > &begin) const
| Computes the duration from a given time to now.
std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > | getTime () const
| Gets the current time value, for example to set checkpoint.
Protected Attributes inherited from Log::LALogger
std::shared_ptr< std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > > const | start
std::shared_ptr< std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > > | checkpoint
double | mutationTime = 0
double | evalTime = 0
double | validTime = 0
double | decimationTime = 0
Learn::LearningAgent & | learningAgent
| LearningAgent logged by the LALogger.

## Detailed Description

Basic logger that will display some useful information.

The information logged by this LALogger are generation number, nb of vertices, min, mean, avg score of this generation and to finish some timing. Everything is logged like a tab with regularly spaced columns.

## Constructor & Destructor Documentation

## ◆ LABasicLogger()

Log::LABasicLogger::LABasicLogger | ( | Learn::LearningAgent & | la,
|  | std::ostream & | out = std::cout )
| inline explicit

Same constructor as LaLogger. Default output is cout.

Parameters

  [in] | la | LearningAgent whose information will be logged by the LABasicLogger.
  [in] | out | The output stream the logger will send elements to.

## Member Function Documentation

## ◆ logAfterDecimate()

void Log::LABasicLogger::logAfterDecimate | ( |  | ) |
| override virtual

Does nothing in this logger.

Inherited via LaLogger.

Implements Log::LALogger.

## ◆ logAfterEvaluate()

void Log::LABasicLogger::logAfterEvaluate | ( | std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > & | results | ) |
| override virtual

Logs the min, avg and max score of the generation.

Inherited via LaLogger.

If doValidation is true, it only updates eval time. The method logResults will be called in order to log statistics about results (method shared with logAfterValidate).

Parameters

  [in] | results | scores of the evaluation.

Implements Log::LALogger.

## ◆ logAfterPopulateTPG()

void Log::LABasicLogger::logAfterPopulateTPG | ( |  | ) |
| override virtual

Logs the vertices nb of the tpg.

Inherited via LALogger.

Implements Log::LALogger.

## ◆ logAfterValidate()

void Log::LABasicLogger::logAfterValidate | ( | std::multimap< std::shared_ptr< Learn::EvaluationResult >, const TPG::TPGVertex * > & | results | ) |
| override virtual

Logs the min, avg and max score of the generation.

Inherited via LaLogger.

If doValidation is true, no eval results are logged so that the logger can only show validation results.

Parameters

  [in] | results | scores of the validation.

Implements Log::LALogger.

## ◆ logEndOfTraining()

void Log::LABasicLogger::logEndOfTraining | ( |  | ) |
| override virtual

Logs the eval, valid (if doValidation is true) and total running time.

Inherited via LaLogger

Implements Log::LALogger.

## ◆ logHeader()

void Log::LABasicLogger::logHeader | ( |  | ) |
| override virtual

Logs the header (column names) of the tab that will be logged.

Inherited via LaLogger

Implements Log::LALogger.

## ◆ logNewGeneration()

void Log::LABasicLogger::logNewGeneration | ( | uint64_t & | generationNumber | ) |
| override virtual

Logs the generation of training.

Inherited via LALogger.

Parameters

  [in] | generationNumber | The number of the current generation.

Implements Log::LALogger.

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

- D:/a/gegelati/gegelati/gegelatilib/include/log/laBasicLogger.h
- D:/a/gegelati/gegelati/gegelatilib/src/log/laBasicLogger.cpp