3#ifndef CLASSIFICATION_SELECTION_METRICS_H
4#define CLASSIFICATION_SELECTION_METRICS_H
8#include "selector/selectionMetrics.h"
56 throw std::runtime_error(
"Number of class missmatch.");
89 virtual void weightedSum(std::shared_ptr<SelectionMetrics> other,
91 size_t nbEvaluationOther)
override;
Interface for creating a Learning Environment.
Definition learningEnvironment.h:81
Class to extract metrics from either the agent or the environment.
Definition classificationSelectionMetrics.h:19
virtual const std::vector< size_t > & getNbEvalPerClassPerClass() const
Definition classificationSelectionMetrics.cpp:62
ClassificationSelectionMetrics(const std::vector< double > &scorePerClass, const std::vector< size_t > &nbEvalPerClass)
Constructor with score and utility initialization.
Definition classificationSelectionMetrics.h:47
void initMetrics(const TPG::TPGVertex *agent, const Learn::LearningEnvironment &learningEnvironment) override
Specialization of the initialisation of the metrics.
Definition classificationSelectionMetrics.cpp:8
std::vector< size_t > nbEvalPerClass
Vector storing a size_t value per class representing the number of evaluation per class.
Definition classificationSelectionMetrics.h:31
ClassificationSelectionMetrics()=default
Default constructor.
virtual const std::vector< double > & getScorePerClass() const
Definition classificationSelectionMetrics.cpp:56
void extractMetricsEpisode(const TPG::TPGVertex *agent, size_t nbStepsExecuted, const Learn::LearningEnvironment &learningEnvironment) override
Specialization of the extraction of the metrics at the end of an episode.
Definition classificationSelectionMetrics.cpp:16
std::vector< double > scorePerClass
Vector storing a double score per class (i.e. per Action) of a classification LearningEnvironment.
Definition classificationSelectionMetrics.h:25
virtual void weightedSum(std::shared_ptr< SelectionMetrics > other, size_t nbEvaluation, size_t nbEvaluationOther) override
Specialization of weightedSum method to add the score per class and nbEvalPerClass.
Definition classificationSelectionMetrics.cpp:67
Class to extract metrics from either the agent or the environment.
Definition selectionMetrics.h:18
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Definition mapElitesArchiveLogger.h:45