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
45namespace 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:
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
Class used to control the learning steps of a TPGGraph within a given LearningEnvironment.
Definition learningAgent.h:67
Basic logger that will display some useful information.
Definition laBasicLogger.h:55
virtual void logAfterDecimate() override
Does nothing in this logger.
Definition laBasicLogger.cpp:227
LABasicLogger(Learn::LearningAgent &la, std::ostream &out=std::cout)
Same constructor as LaLogger. Default output is cout.
Definition laBasicLogger.h:81
virtual void logEndOfTraining() override
Logs the eval, valid (if doValidation is true) and total running time.
Definition laBasicLogger.cpp:235
virtual void logAfterPopulateTPG() override
Logs the vertices nb of the tpg.
Definition laBasicLogger.cpp:189
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:196
virtual void logNewGeneration(uint64_t &generationNumber) override
Logs the generation of training.
Definition laBasicLogger.cpp:166
virtual void logHeader() override
Logs the header (column names) of the tab that will be logged.
Definition laBasicLogger.cpp:99
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:208
Learning Agent logger class that will be called during LearningAgent executions.
Definition laLogger.h:66
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Definition cycleDetectionLALogger.h:38