File transformation_binary_label_wise.hpp

namespace boosting
class LabelWiseBinaryTransformation : public boosting::IBinaryTransformation
#include <transformation_binary_label_wise.hpp>

An implementation of the class IBinaryTransformation that transforms regression scores that are predicted for individual labels into binary predictions via element-wise application of an IDiscretizationFunction.

Public Functions

LabelWiseBinaryTransformation(std::unique_ptr<IDiscretizationFunction> discretizationFunctionPtr)
Parameters:

discretizationFunctionPtr – An unique pointer to an object of type IDiscretizationFunction that should be used to discretize regression scores

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

std::unique_ptr<IDiscretizationFunction> discretizationFunctionPtr_