File predictor_binary.hpp

class IBinaryPredictor : public virtual IPredictor<DensePredictionMatrix<uint8>>
#include <predictor_binary.hpp>

Defines an interface for all classes that allow to predict binary labels for given query examples.

Public Functions

inline virtual ~IBinaryPredictor() override
class IBinaryPredictorFactory
#include <predictor_binary.hpp>

Defines an interface for all classes that allow to create instances of the type IBinaryPredictor.

Public Functions

inline virtual ~IBinaryPredictorFactory()
virtual std::unique_ptr<IBinaryPredictor> create(const CContiguousView<const float32> &featureMatrix, const RuleList &model, const LabelVectorSet *labelVectorSet, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const = 0

Creates and returns a new object of the type IBinaryPredictor.

Parameters:
  • featureMatrix – A reference to an object of type CContiguousView that stores the feature values of the query examples to predict for

  • model – A reference to an object of type RuleList that should be used to obtain predictions

  • labelVectorSet – A pointer to an object of type LabelVectorSet that stores all known label vectors or a null pointer, if no such set is available

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IBinaryPredictor that has been created

virtual std::unique_ptr<IBinaryPredictor> create(const CsrView<const float32> &featureMatrix, const RuleList &model, const LabelVectorSet *labelVectorSet, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const = 0

Creates and returns a new object of the type IBinaryPredictor.

Parameters:
  • featureMatrix – A reference to an object of type CsrView that stores the feature values of the query examples to predict for

  • model – A reference to an object of type RuleList that should be used to obtain predictions

  • labelVectorSet – A pointer to an object of type LabelVectorSet that stores all known label vectors or a null pointer, if no such set is available

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IBinaryPredictor that has been created

class ISparseBinaryPredictor : public IPredictor<BinarySparsePredictionMatrix>
#include <predictor_binary.hpp>

Defines an interface for all classes that allow to predict sparse binary labels for given query examples.

Public Functions

inline virtual ~ISparseBinaryPredictor() override
class ISparseBinaryPredictorFactory
#include <predictor_binary.hpp>

Defines an interface for all classes that allow to create instances of the type ISparseBinaryPredictor.

Public Functions

inline virtual ~ISparseBinaryPredictorFactory()
virtual std::unique_ptr<ISparseBinaryPredictor> create(const CContiguousView<const float32> &featureMatrix, const RuleList &model, const LabelVectorSet *labelVectorSet, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const = 0

Creates and returns a new object of the type ISparseBinaryPredictor.

Parameters:
  • featureMatrix – A reference to an object of type CContiguousView that stores the feature values of the query examples to predict for

  • model – A reference to an object of type RuleList that should be used to obtain predictions

  • labelVectorSet – A pointer to an object of type LabelVectorSet that stores all known label vectors or a null pointer, if no such set is available

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type ISparseBinaryPredictor that has been created

virtual std::unique_ptr<ISparseBinaryPredictor> create(const CsrView<const float32> &featureMatrix, const RuleList &model, const LabelVectorSet *labelVectorSet, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const = 0

Creates and returns a new object of the type ISparseBinaryPredictor.

Parameters:
  • featureMatrix – A reference to an object of type CsrView that stores the feature values of the query examples to predict for

  • model – A reference to an object of type RuleList that should be used to obtain predictions

  • labelVectorSet – A pointer to an object of type LabelVectorSet that stores all known label vectors or a null pointer, if no such set is available

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type ISparseBinaryPredictor that has been created

class IBinaryPredictorConfig : public IPredictorConfig<IBinaryPredictorFactory>
#include <predictor_binary.hpp>

Defines an interface for all classes that allow to configure an IBinaryPredictor or ISparseBinaryPredictor.

Public Functions

inline virtual ~IBinaryPredictorConfig() override
virtual std::unique_ptr<ISparseBinaryPredictorFactory> createSparsePredictorFactory(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const = 0

Creates and returns a new object of type ISparseBinaryPredictorFactory according to the specified configuration.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples to predict for

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type ISparseBinaryPredictorFactory that has been created