File measure_evaluation_sparse.hpp¶
-
class ISparseEvaluationMeasure¶
- #include <measure_evaluation_sparse.hpp>
Defines an interface for all measures that may be used to assess the quality of predictions for certain examples, which are stored using sparse data structures, by comparing them to the corresponding ground truth labels.
Public Functions
-
inline virtual ~ISparseEvaluationMeasure()¶
-
virtual float64 evaluate(uint32 exampleIndex, const CContiguousView<const uint8> &labelMatrix, const SparseSetView<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 examplesscoreMatrix – A reference to an object of type
SparseSetView
that stores the currently predicted scores
- Returns:
The numerical score that has been calculated
-
virtual float64 evaluate(uint32 exampleIndex, const BinaryCsrView &labelMatrix, const SparseSetView<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 examplesscoreMatrix – A reference to an object of type
SparseSetView
that stores the currently predicted scores
- Returns:
The numerical score that has been calculated
-
inline virtual ~ISparseEvaluationMeasure()¶
-
class ISparseEvaluationMeasureFactory¶
- #include <measure_evaluation_sparse.hpp>
Defines an interface for all factories that allow to create instances of the type
ISparseEvaluationMeasure
.Public Functions
-
inline virtual ~ISparseEvaluationMeasureFactory()¶
-
virtual std::unique_ptr<ISparseEvaluationMeasure> createSparseEvaluationMeasure() const = 0¶
Creates and returns a new object of type
ISparseEvaluationMeasure
.- Returns:
An unique pointer to an object of type
ISparseEvaluationMeasure
that has been created
-
inline virtual ~ISparseEvaluationMeasureFactory()¶