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