File transformation_binary_example_wise.hpp¶
-
namespace boosting
-
class ExampleWiseBinaryTransformation : public boosting::IBinaryTransformation¶
- #include <transformation_binary_example_wise.hpp>
An implementation of the class
IBinaryTransformation
that transforms regression scores into binary predictions by comparing the scores to the known label vectors according to a certain distance measure and picking the closest one.Public Functions
-
ExampleWiseBinaryTransformation(const LabelVectorSet &labelVectorSet, std::unique_ptr<IDistanceMeasure> distanceMeasurePtr)¶
- Parameters:
labelVectorSet – A reference to an object of type
LabelVectorSet
that stores all known label vectorsdistanceMeasurePtr – An unique pointer to an object of type
IDistanceMeasure
that implements the distance measure for comparing regression scores to known label vectors
-
virtual void apply(View<float64>::const_iterator scoresBegin, View<float64>::const_iterator scoresEnd, View<uint8>::iterator predictionBegin, View<uint8>::iterator predictionEnd) const override¶
Transforms regression scores into binary predictions.
- Parameters:
scoresBegin – An iterator to the beginning of the regression scores
scoresEnd – An iterator to the end of the regression scores
predictionBegin – An iterator to the beginning of the binary predictions
predictionEnd – An iterator to the end of the binary predictions
-
virtual void apply(View<float64>::const_iterator scoresBegin, View<float64>::const_iterator scoresEnd, BinaryLilMatrix::row predictionRow) const override¶
Transforms regression scores into sparse binary predictions.
- Parameters:
scoresBegin – An iterator to the beginning of the regression scores
scoresEnd – An iterator to the end of the regression scores
predictionRow – An object of type
BinaryLilMatrix::row
that should be used to store the binary predictions
Private Members
-
const LabelVectorSet &labelVectorSet_¶
-
const std::unique_ptr<IDistanceMeasure> distanceMeasurePtr_¶
-
ExampleWiseBinaryTransformation(const LabelVectorSet &labelVectorSet, std::unique_ptr<IDistanceMeasure> distanceMeasurePtr)¶
-
class ExampleWiseBinaryTransformation : public boosting::IBinaryTransformation¶