File measure_evaluation.hpp

class IClassificationEvaluationMeasure
#include <measure_evaluation.hpp>

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

Public Functions

inline virtual ~IClassificationEvaluationMeasure()
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 according to a regression 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 according to 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 IRegressionEvaluationMeasure
#include <measure_evaluation.hpp>

Defines an interface for all measures that can be used in regression problems to assess the quality of predictions for certain examples by comparing them to the corresponding ground truth regression scores.

Public Functions

inline virtual ~IRegressionEvaluationMeasure()
virtual float64 evaluate(uint32 exampleIndex, const CContiguousView<const float32> &regressionMatrix, 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 according to a regression matrix that provides random access to the regression scores of the training examples.

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

  • regressionMatrix – A reference to an object of type CContiguousView that provides random access to the regression scores 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 CsrView<const float32> &regressionMatrix, 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 according to a regression matrix that provides row-wise access to the regression scores of the training examples.

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

  • regressionMatrix – A reference to an object of type CsrView that provides row-wise access to the regression scores 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 IClassificationEvaluationMeasureFactory
#include <measure_evaluation.hpp>

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

Public Functions

inline virtual ~IClassificationEvaluationMeasureFactory()
virtual std::unique_ptr<IClassificationEvaluationMeasure> createClassificationEvaluationMeasure() const = 0

Creates and returns a new object of type IClassificationEvaluationMeasure.

Returns:

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

class IRegressionEvaluationMeasureFactory
#include <measure_evaluation.hpp>

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

Public Functions

inline virtual ~IRegressionEvaluationMeasureFactory()
virtual std::unique_ptr<IRegressionEvaluationMeasure> createRegressionEvaluationMeasure() const = 0

Creates and returns a new object of type IRegressionEvaluationMeasure.

Returns:

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