File transformation_binary_example_wise.hpp¶
-
namespace boosting
-
class ExampleWiseBinaryTransformation : public boosting::IBinaryTransformation¶
- #include <transformation_binary_example_wise.hpp>
An implementation of the class
IBinaryTransformationthat transforms 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<float64>> distanceMeasurePtr)¶
- Parameters:
labelVectorSet – A reference to an object of type
LabelVectorSetthat stores all known label vectorsdistanceMeasurePtr – An unique pointer to an object of type
IDistanceMeasurethat implements the distance measure for comparing 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 scores into binary predictions.
- Parameters:
scoresBegin – An iterator to the beginning of the scores
scoresEnd – An iterator to the end of the 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 scores into sparse binary predictions.
- Parameters:
scoresBegin – An iterator to the beginning of the scores
scoresEnd – An iterator to the end of the scores
predictionRow – An object of type
BinaryLilMatrix::rowthat should be used to store the binary predictions
Private Members
-
const LabelVectorSet &labelVectorSet_¶
-
const std::unique_ptr<IDistanceMeasure<float64>> distanceMeasurePtr_¶
-
ExampleWiseBinaryTransformation(const LabelVectorSet &labelVectorSet, std::unique_ptr<IDistanceMeasure<float64>> distanceMeasurePtr)¶
-
class ExampleWiseBinaryTransformation : public boosting::IBinaryTransformation¶