File transformation_binary_output_wise.hpp

namespace boosting
class OutputWiseBinaryTransformation : public boosting::IBinaryTransformation
#include <transformation_binary_output_wise.hpp>

An implementation of the class IBinaryTransformation that transforms the individual scores or probability estimates that are predicted for each label into binary predictions via element-wise application of an IDiscretizationFunction.

Public Functions

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

discretizationFunctionPtr – An unique pointer to an object of type IDiscretizationFunction that should be used to discretize 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 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::row that should be used to store the binary predictions

Private Members

std::unique_ptr<IDiscretizationFunction> discretizationFunctionPtr_