GEGELATI

Loading...
Searching...
No Matches
laBasicLogger.h
1
38#ifndef LA_BASIC_LOGGER_H
39#define LA_BASIC_LOGGER_H
40
41#include <iomanip>
42
43#include "log/laLogger.h"
44
45 namespace Log {
46
54 class LABasicLogger : public LALogger
55 {
56 private:
60 int colWidth = 9;
61
69 void logResults(std::multimap<std::shared_ptr<Learn::EvaluationResult>,
70 const TPG::TPGVertex*>& results);
71
72 public:
81 explicit LABasicLogger(Learn::LearningAgent& la,
82 std::ostream& out = std::cout)
83 : LALogger(la, out)
84 {
85 // fixing float precision
86 *this << std::setprecision(2) << std::fixed << std::right;
87 this->logHeader();
88 }
89
95 virtual void logHeader() override;
96
105 virtual void logNewGeneration(uint64_t& generationNumber) override;
106
112 virtual void logAfterPopulateTPG() override;
113
125 virtual void logAfterEvaluate(
126 std::multimap<std::shared_ptr<Learn::EvaluationResult>,
127 const TPG::TPGVertex*>& results) override;
128
134 virtual void logAfterDecimate() override;
135
146 virtual void logAfterValidate(
147 std::multimap<std::shared_ptr<Learn::EvaluationResult>,
148 const TPG::TPGVertex*>& results) override;
149
156 virtual void logEndOfTraining() override;
157 };
158
159} // namespace Log
160
161#endif
Learn::LearningAgent
Class used to control the learning steps of a TPGGraph within a given LearningEnvironment.
Definition learningAgent.h:64
Log::LABasicLogger
Basic logger that will display some useful information.
Definition laBasicLogger.h:55
Log::LABasicLogger::logAfterDecimate
virtual void logAfterDecimate() override
Does nothing in this logger.
Definition laBasicLogger.cpp:190
Log::LABasicLogger::LABasicLogger
LABasicLogger(Learn::LearningAgent &la, std::ostream &out=std::cout)
Same constructor as LaLogger. Default output is cout.
Definition laBasicLogger.h:81
Log::LABasicLogger::logEndOfTraining
virtual void logEndOfTraining() override
Logs the eval, valid (if doValidation is true) and total running time.
Definition laBasicLogger.cpp:198
Log::LABasicLogger::logAfterPopulateTPG
virtual void logAfterPopulateTPG() override
Logs the vertices nb of the tpg.
Definition laBasicLogger.cpp:137
Log::LABasicLogger::logAfterEvaluate
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.
Definition laBasicLogger.cpp:159
Log::LABasicLogger::logNewGeneration
virtual void logNewGeneration(uint64_t &generationNumber) override
Logs the generation of training.
Definition laBasicLogger.cpp:130
Log::LABasicLogger::logHeader
virtual void logHeader() override
Logs the header (column names) of the tab that will be logged.
Definition laBasicLogger.cpp:74
Log::LABasicLogger::logAfterValidate
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.
Definition laBasicLogger.cpp:171
Log::LALogger
Learning Agent logger class that will be called during LearningAgent executions.
Definition laLogger.h:65
TPG::TPGVertex
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Log
Definition cycleDetectionLALogger.h:38