File prediction.hpp

class IPrediction : public IIndexVector, public IStatisticsUpdate
#include <prediction.hpp>

Defines an interface for all classes that store the scores that are predicted by a rule.

Subclassed by IEvaluatedPrediction

Public Functions

inline virtual ~IPrediction() override
virtual void sort() = 0

Sorts the scores that are stored by this prediction in increasing order by the indices of the outputs they correspond to.

virtual void postProcess(const IPostProcessor &postProcessor) = 0

Post-processes the scores that are stored by this prediction.

Parameters:

postProcessor – A reference to an object of type IPostProcessor that should be used for post-processing

virtual std::unique_ptr<IStatisticsSubset> createStatisticsSubset(const IStatistics &statistics, const EqualWeightVector &weights) const = 0

Creates and returns a new subset of the given statistics that only contains the outputs whose indices are stored in this vector.

Parameters:
  • statistics – A reference to an object of type IStatistics that should be used to create the subset

  • weights – A reference to an object of type EqualWeightVector that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IStatisticsSubset> createStatisticsSubset(const IStatistics &statistics, const BitWeightVector &weights) const = 0

Creates and returns a new subset of the given statistics that only contains the outputs whose indices are stored in this vector.

Parameters:
  • statistics – A reference to an object of type IStatistics that should be used to create the subset

  • weights – A reference to an object of type BitWeightVector that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IStatisticsSubset> createStatisticsSubset(const IStatistics &statistics, const DenseWeightVector<uint16> &weights) const = 0

Creates and returns a new subset of the given statistics that only contains the outputs whose indices are stored in this vector.

Parameters:
  • statistics – A reference to an object of type IStatistics that should be used to create the subset

  • weights – A reference to an object of type DenseWeightVector<uint16> that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IStatisticsSubset> createStatisticsSubset(const IStatistics &statistics, const DenseWeightVector<float32> &weights) const = 0

Creates and returns a new subset of the given statistics that only contains the outputs whose indices are stored in this vector.

Parameters:
  • statistics – A reference to an object of type IStatistics that should be used to create the subset

  • weights – A reference to an object of type DenseWeightVector<float32> that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IStatisticsSubset> createStatisticsSubset(const IStatistics &statistics, const OutOfSampleWeightVector<EqualWeightVector> &weights) const = 0

Creates and returns a new subset of the given statistics that only contains the outputs whose indices are stored in this vector.

Parameters:
  • statistics – A reference to an object of type IStatistics that should be used to create the subset

  • weights – A reference to an object of type OutOfSampleWeightVector<EqualWeightVector> that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IStatisticsSubset> createStatisticsSubset(const IStatistics &statistics, const OutOfSampleWeightVector<BitWeightVector> &weights) const = 0

Creates and returns a new subset of the given statistics that only contains the outputs whose indices are stored in this vector.

Parameters:
  • statistics – A reference to an object of type IStatistics that should be used to create the subset

  • weights – A reference to an object of type OutOfSampleWeightVector<BitWeightVector> that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IStatisticsSubset> createStatisticsSubset(const IStatistics &statistics, const OutOfSampleWeightVector<DenseWeightVector<uint16>> &weights) const = 0

Creates and returns a new subset of the given statistics that only contains the outputs whose indices are stored in this vector.

Parameters:
  • statistics – A reference to an object of type IStatistics that should be used to create the subset

  • weights – A reference to an object of type OutOfSampleWeightVector<DenseWeightVector<uint16>> that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IStatisticsSubset> createStatisticsSubset(const IStatistics &statistics, const OutOfSampleWeightVector<DenseWeightVector<float32>> &weights) const = 0

Creates and returns a new subset of the given statistics that only contains the outputs whose indices are stored in this vector.

Parameters:
  • statistics – A reference to an object of type IStatistics that should be used to create the subset

  • weights – A reference to an object of type OutOfSampleWeightVector<DenseWeightVector<float32>> that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IHead> createHead() const = 0

Creates and returns a head that contains the scores that are stored by this prediction.

Returns:

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