File statistics.hpp¶
-
class IStatistics¶
- #include <statistics.hpp>
Defines an interface for all classes that provide access to statistics about the quality of predictions for training examples, which serve as the basis for learning a new rule or refining an existing one.
Public Functions
-
inline virtual ~IStatistics()¶
-
virtual uint32 getNumStatistics() const = 0¶
Returns the number of available statistics.
- Returns:
The number of statistics
-
virtual uint32 getNumOutputs() const = 0¶
Returns the number of available outputs.
- Returns:
The number of outputs
-
virtual void applyPrediction(uint32 statisticIndex, const CompletePrediction &prediction) = 0¶
Updates a specific statistic based on the prediction of a rule that predicts for all available outputs.
This function must be called for each statistic that is covered by the new rule before learning the next rule.
- Parameters:
statisticIndex – The index of the statistic to be updated
prediction – A reference to an object of type
CompletePredictionthat stores the scores that are predicted by the rule
-
virtual void applyPrediction(uint32 statisticIndex, const PartialPrediction &prediction) = 0¶
Updates a specific statistic based on the prediction of a rule that predicts for a subset of the available outputs.
This function must be called for each statistic that is covered by the new rule before learning the next rule.
- Parameters:
statisticIndex – The index of the statistic to be updated
prediction – A reference to an object of type
PartialPredictionthat stores the scores that are predicted by the rule
-
virtual void revertPrediction(uint32 statisticIndex, const CompletePrediction &prediction) = 0¶
Reverts a specific statistic that has previously been updated via the function
applyPredictionbased on the prediction of a rule that predicts for all available outputs.- Parameters:
statisticIndex – The index of the statistic to be reverted
prediction – A reference to an object of type
CompletePredictionthat stores the scores that are predicted by the rule
-
virtual void revertPrediction(uint32 statisticIndex, const PartialPrediction &prediction) = 0¶
Reverts a specific statistic that has previously been updated via the function
applyPredictionbased on the prediction of a rule that predicts for a subset of the available outputs.- Parameters:
statisticIndex – The index of the statistic to be reverted
prediction – A reference to an object of type
PartialPredictionthat stores the scores that are predicted by the rule
-
virtual float64 evaluatePrediction(uint32 statisticIndex) const = 0¶
Calculates and returns a numerical score that assesses the quality of the current predictions for a specific statistic.
- Parameters:
statisticIndex – The index of the statistic for which the predictions should be evaluated
- Returns:
The numerical score that has been calculated
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const CompleteIndexVector &outputIndices, const EqualWeightVector &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificCompleteIndexVector.- Parameters:
outputIndices – A reference to an object of type
CompleteIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – A reference to an object of type
EqualWeightVectorthat provides access to the weights of individual training examples
- Returns:
An unique pointer to an object of type
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const PartialIndexVector &outputIndices, const EqualWeightVector &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificPartialIndexVector.- Parameters:
outputIndices – A reference to an object of type
PartialIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – A reference to an object of type
EqualWeightVectorthat provides access to the weights of individual training examples
- Returns:
An unique pointer to an object of type
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const CompleteIndexVector &outputIndices, const BitWeightVector &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificCompleteIndexVector.- Parameters:
outputIndices – A reference to an object of type
CompleteIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – A reference to an object of type
BitWeightVectorthat provides access to the weights of individual training examples
- Returns:
An unique pointer to an object of type
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const PartialIndexVector &outputIndices, const BitWeightVector &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificPartialIndexVector.- Parameters:
outputIndices – A reference to an object of type
PartialIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – A reference to an object of type
BitWeightVectorthat provides access to the weights of individual training examples
- Returns:
An unique pointer to an object of type
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const CompleteIndexVector &outputIndices, const DenseWeightVector<uint32> &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificCompleteIndexVector.- Parameters:
outputIndices – A reference to an object of type
CompleteIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – A reference to an object of type
DenseWeightVector<uint32>that provides access to the weights of individual training examples
- Returns:
An unique pointer to an object of type
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const PartialIndexVector &outputIndices, const DenseWeightVector<uint32> &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificPartialIndexVector.- Parameters:
outputIndices – A reference to an object of type
PartialIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – A reference to an object of type
DenseWeightVector<uint32>that provides access to the weights of individual training examples
- Returns:
An unique pointer to an object of type
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const CompleteIndexVector &outputIndices, const OutOfSampleWeightVector<EqualWeightVector> &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificCompleteIndexVector.- Parameters:
outputIndices – A reference to an object of type
CompleteIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – 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
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const PartialIndexVector &outputIndices, const OutOfSampleWeightVector<EqualWeightVector> &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificPartialIndexVector.- Parameters:
outputIndices – A reference to an object of type
PartialIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – 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
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const CompleteIndexVector &outputIndices, const OutOfSampleWeightVector<BitWeightVector> &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificCompleteIndexVector.- Parameters:
outputIndices – A reference to an object of type
CompleteIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – 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
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const PartialIndexVector &outputIndices, const OutOfSampleWeightVector<BitWeightVector> &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificPartialIndexVector.- Parameters:
outputIndices – A reference to an object of type
PartialIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – 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
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const CompleteIndexVector &outputIndices, const OutOfSampleWeightVector<DenseWeightVector<uint32>> &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificCompleteIndexVector.- Parameters:
outputIndices – A reference to an object of type
CompleteIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – A reference to an object of type
OutOfSampleWeightVector<DenseWeightVector<uint32>>that provides access to the weights of individual training examples
- Returns:
An unique pointer to an object of type
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IStatisticsSubset> createSubset(const PartialIndexVector &outputIndices, const OutOfSampleWeightVector<DenseWeightVector<uint32>> &weights) const = 0¶
Creates and returns a new object of type
IStatisticsSubsetthat includes only those outputs, whose indices are provided by a specificPartialIndexVector.- Parameters:
outputIndices – A reference to an object of type
PartialIndexVectorthat provides access to the indices of the outputs that should be included in the subsetweights – A reference to an object of type
OutOfSampleWeightVector<DenseWeightVector<uint32>>that provides access to the weights of individual training examples
- Returns:
An unique pointer to an object of type
IStatisticsSubsetthat has been created
-
virtual std::unique_ptr<IWeightedStatistics> createWeightedStatistics(const EqualWeightVector &weights) const = 0¶
Creates and returns a new object of type
IWeightedStatistics.- Parameters:
weights – A reference to an object of type
EqualWeightVectorthat provides access to the weights of individual training examples- Returns:
An unique pointer to an object of type
IWeightedStatisticsthat has been created
-
virtual std::unique_ptr<IWeightedStatistics> createWeightedStatistics(const BitWeightVector &weights) const = 0¶
Creates and returns a new object of type
IWeightedStatistics.- Parameters:
weights – A reference to an object of type
BitWeightVectorthat provides access to the weights of individual training examples- Returns:
An unique pointer to an object of type
IWeightedStatisticsthat has been created
-
virtual std::unique_ptr<IWeightedStatistics> createWeightedStatistics(const DenseWeightVector<uint32> &weights) const = 0¶
Creates and returns a new object of type
IWeightedStatistics.- Parameters:
weights – A reference to an object of type
DenseWeightVector<uint32>that provides access to the weights of individual training examples- Returns:
An unique pointer to an object of type
IWeightedStatisticsthat has been created
-
inline virtual ~IStatistics()¶