File measure_evaluation.hpp

class IEvaluationMeasure
#include <measure_evaluation.hpp>

Defines an interface for all measures that may be used to assess the quality of predictions for certain examples by comparing them to the corresponding ground truth labels.

Public Functions

inline virtual ~IEvaluationMeasure()
virtual float64 evaluate(uint32 exampleIndex, const CContiguousView<const uint8> &labelMatrix, const CContiguousView<float64> &scoreMatrix) const = 0

Calculates and returns a numerical score that assesses the quality of predictions for the example at a specific index by comparing them to the corresponding ground truth labels, based on a label matrix that provides random access to the labels of the training examples.

Parameters:
  • exampleIndex – The index of the example for which the predictions should be evaluated

  • labelMatrix – A reference to an object of type CContiguousView that provides random access to the labels of the training examples

  • scoreMatrix – A reference to an object of type CContiguousView that stores the currently predicted scores

Returns:

The numerical score that has been calculated

virtual float64 evaluate(uint32 exampleIndex, const BinaryCsrView &labelMatrix, const CContiguousView<float64> &scoreMatrix) const = 0

Calculates and returns a numerical score that assesses the quality of predictions for the example at a specific index by comparing them to the corresponding ground truth labels, based on a label matrix that provides row-wise access to the labels of the training examples.

Parameters:
  • exampleIndex – The index of the example for which the predictions should be evaluated

  • labelMatrix – A reference to an object of type BinaryCsrView that provides row-wise access to the labels of the training examples

  • scoreMatrix – A reference to an object of type CContiguousView that stores the currently predicted scores

Returns:

The numerical score that has been calculated

class IEvaluationMeasureFactory
#include <measure_evaluation.hpp>

Defines an interface for all factories that allow to create instances of the type IEvaluationMeasure.

Public Functions

inline virtual ~IEvaluationMeasureFactory()
virtual std::unique_ptr<IEvaluationMeasure> createEvaluationMeasure() const = 0

Creates and returns a new object of type IEvaluationMeasure.

Returns:

An unique pointer to an object of type IEvaluationMeasure that has been created