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