File transformation_binary.hpp

namespace boosting
class IBinaryTransformation
#include <transformation_binary.hpp>

Defines an interface for all classes that allow to transform regression scores into binary predictions.

Subclassed by boosting::ExampleWiseBinaryTransformation, boosting::GfmBinaryTransformation, boosting::LabelWiseBinaryTransformation

Public Functions

inline virtual ~IBinaryTransformation()
virtual void apply(View<float64>::const_iterator scoresBegin, View<float64>::const_iterator scoresEnd, View<uint8>::iterator predictionBegin, View<uint8>::iterator predictionEnd) const = 0

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 = 0

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