File statistics_subset_weighted.hpp¶
-
class IWeightedStatisticsSubset : public virtual IStatisticsSubset¶
- #include <statistics_subset_weighted.hpp>
Defines an interface for all classes that provide access to a subset of the weighted statistics that are stored by an instance of the class
IWeightedStatisticsand allows to calculate the scores to be predicted by rules that cover such a subset.Public Functions
-
inline virtual ~IWeightedStatisticsSubset() override¶
-
virtual void addToMissing(uint32 statisticIndex) = 0¶
Marks the statistics at a specific index as missing, i.e., no condition that will be considered in the following for refining a rule will be able to cover it and consequently the function
addToSubsetwill never be called for the givenstatisticIndex.- Parameters:
statisticIndex – The index of the missing statistic
-
virtual void resetSubset() = 0¶
Resets the subset by removing all statistics that have been added via preceding calls to the function
addToSubset.This function is supposed to reset the internal state of the subset to the state when the subset was created via the function
IImmutableWeightedStatistics::createSubset. When calling this function, the current state must not be purged entirely, but it must be cached and made available for use by the functionsevaluateAccumulatedandevaluateUncoveredAccumulated.This function may be invoked multiple times with one or several calls to
addToSubsetin between, which is supposed to update the previously cached state by accumulating the current one, i.e., the accumulated cached state should be the same as ifresetSubsetwould not have been called at all.
-
virtual const IScoreVector &calculateScoresAccumulated() = 0¶
Calculates and returns the scores to be predicted by a rule that covers all statistics that have been added to the subset via the function
addToSubset, as well as a numerical score that assesses the quality of the predicted scores. All statistics that have been added since the subset was created via the functionIImmutableWeightedStatistics::createSubsetare taken into account even if the functionresetSubsetwas called since then.- Returns:
A reference to an object of type
IScoreVectorthat stores the scores to be predicted by the rule for each considered output, as well as a numerical score that assesses their overall quality
-
virtual const IScoreVector &calculateScoresUncovered() = 0¶
Calculates and returns the scores to be predicted by a rule that covers all statistics that correspond to the difference between the statistics that have been added to the subset via the function
addToSubsetand those that have been marked as covered via the functionIWeightedStatistics::addCoveredStatisticorIWeightedStatistics::removeCoveredStatistic, as well as a numerical score that assesses the quality of the predicted scores.- Returns:
A reference to an object of type
IScoreVectorthat stores the scores to be predicted by the rule for each considered output, as well as a numerical score that assesses their overall quality
-
virtual const IScoreVector &calculateScoresUncoveredAccumulated() = 0¶
Calculates and returns the scores to be predicted by a rule that covers all statistics that correspond to the difference between the statistics that have been added to the subset via the function
addToSubsetand those that have been marked as covered via the functionIWeightedStatistics::addCoveredStatisticorIWeightedStatistics::removeCoveredStatistic, as well as a numerical score that assesses the quality of the predicted scores. All statistics that have been added since the subset was created via the functionIImmutableWeightedStatistics::createSubsetare taken into account even if the functionresetSubsetwas called since then.- Returns:
A reference to an object of type
IScoreVectorthat stores the scores to be predicted by the rule for each considered output, as well as a numerical score that assesses their overall quality
-
inline virtual ~IWeightedStatisticsSubset() override¶