36#ifndef CLASSIFICATION_SELECTION_METRICS_H
37#define CLASSIFICATION_SELECTION_METRICS_H
41#include "selector/selectionMetrics.h"
89 throw std::runtime_error(
"Number of class missmatch.");
122 virtual void weightedSum(std::shared_ptr<SelectionMetrics> other,
124 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:52
virtual const std::vector< size_t > & getNbEvalPerClassPerClass() const
Definition classificationSelectionMetrics.cpp:95
ClassificationSelectionMetrics(const std::vector< double > &scorePerClass, const std::vector< size_t > &nbEvalPerClass)
Constructor with score and utility initialization.
Definition classificationSelectionMetrics.h:80
void initMetrics(const TPG::TPGVertex *agent, const Learn::LearningEnvironment &learningEnvironment) override
Specialization of the initialisation of the metrics.
Definition classificationSelectionMetrics.cpp:41
std::vector< size_t > nbEvalPerClass
Vector storing a size_t value per class representing the number of evaluation per class.
Definition classificationSelectionMetrics.h:64
ClassificationSelectionMetrics()=default
Default constructor.
virtual const std::vector< double > & getScorePerClass() const
Definition classificationSelectionMetrics.cpp:89
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:49
std::vector< double > scorePerClass
Vector storing a double score per class (i.e. per Action) of a classification LearningEnvironment.
Definition classificationSelectionMetrics.h:58
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:100
Class to extract metrics from either the agent or the environment.
Definition selectionMetrics.h:52
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Definition mapElitesArchiveLogger.h:45