GEGELATI

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Selector::ClassificationSelectionMetrics Class Reference

Class to extract metrics from either the agent or the environment. More...

`#include <classificationSelectionMetrics.h>`

Inheritance diagram for Selector::ClassificationSelectionMetrics:

## Public Member Functions
| ClassificationSelectionMetrics ()=default
| Default constructor.
| ClassificationSelectionMetrics (const std::vector< double > &scorePerClass, const std::vector< size_t > &nbEvalPerClass)
| Constructor with score and utility initialization.
virtual const std::vector< double > & | getScorePerClass () const
virtual const std::vector< size_t > & | getNbEvalPerClassPerClass () const
void | initMetrics (const TPG::TPGVertex *agent, const Learn::LearningEnvironment &learningEnvironment) override
| Specialization of the initialisation of the metrics.
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.
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.
Public Member Functions inherited from Selector::SelectionMetrics
| SelectionMetrics ()=default
| Default constructor.
| SelectionMetrics (double score, double utility=0)
| Constructor with score and utility initialization.
virtual double | getScore () const
virtual double | getUtility () const
virtual void | extractMetricsStep (const TPG::TPGVertex *agent, std::vector< double > actionValues, const Learn::LearningEnvironment &learningEnvironment)
| Extract metrics from the agent in the learning environment.

## Protected Attributes
std::vector< double > | scorePerClass
| Vector storing a double score per class (i.e. per Action) of a classification LearningEnvironment.
std::vector< size_t > | nbEvalPerClass
| Vector storing a size_t value per class representing the number of evaluation per class.
Protected Attributes inherited from Selector::SelectionMetrics
double | score = 0
double | utility = 0

## Detailed Description

Class to extract metrics from either the agent or the environment.

This metrics can be used to specify the selection of the selector. This class does not implement any metrics, it need to be override by the different selection methods.

## Constructor & Destructor Documentation

## ◆ ClassificationSelectionMetrics()

Selector::ClassificationSelectionMetrics::ClassificationSelectionMetrics | ( | const std::vector< double > & | scorePerClass,
|  | const std::vector< size_t > & | nbEvalPerClass )
| inline

Constructor with score and utility initialization.

Parameters

  [in] | scorePerClass | the vector of score obtained by the agent per class.
  [in] | nbEvalPerClass | the vector of number of evaluation per class.

## Member Function Documentation

## ◆ extractMetricsEpisode()

void Selector::ClassificationSelectionMetrics::extractMetricsEpisode | ( | const TPG::TPGVertex * | agent,
|  | size_t | nbStepsExecuted,
|  | const Learn::LearningEnvironment & | learningEnvironment )
| overridevirtual

Specialization of the extraction of the metrics at the end of an episode.

Reimplemented from Selector::SelectionMetrics.

## ◆ getNbEvalPerClassPerClass()

const std::vector< size_t > & Selector::ClassificationSelectionMetrics::getNbEvalPerClassPerClass | ( |  | ) | const
| virtual

Return the number of evaluation per class of the agent.

## ◆ getScorePerClass()

const std::vector< double > & Selector::ClassificationSelectionMetrics::getScorePerClass | ( |  | ) | const
| virtual

Return the score per class of the agent.

## ◆ initMetrics()

void Selector::ClassificationSelectionMetrics::initMetrics | ( | const TPG::TPGVertex * | agent,
|  | const Learn::LearningEnvironment & | learningEnvironment )
| overridevirtual

Specialization of the initialisation of the metrics.

Reimplemented from Selector::SelectionMetrics.

## ◆ weightedSum()

void Selector::ClassificationSelectionMetrics::weightedSum | ( | std::shared_ptr< SelectionMetrics > | other,
|  | size_t | nbEvaluation,
|  | size_t | nbEvaluationOther )
| overridevirtual

Specialization of weightedSum method to add the score per class and nbEvalPerClass.

Reimplemented from Selector::SelectionMetrics.

The documentation for this class was generated from the following files:

- D:/a/gegelati/gegelati/gegelatilib/include/selector/classificationSelectionMetrics.h
- D:/a/gegelati/gegelati/gegelatilib/src/selector/classificationSelectionMetrics.cpp