File statistics_update.hpp¶
-
class IStatisticsUpdate¶
- #include <statistics_update.hpp>
Defines an interface for all classes that allow updating statistics.
Subclassed by AbstractStatisticsUpdateCandidate::StatisticsUpdate< State, IndexVector >, IPrediction
Public Functions
-
inline virtual ~IStatisticsUpdate()¶
-
virtual void applyPrediction(uint32 statisticIndex) = 0¶
Updates a specific statistic.
This function must be called for each statistic that is covered by a new rule before learning the next rule.
- Parameters:
statisticIndex – The index of the statistic that should be updated
-
virtual void revertPrediction(uint32 statisticIndex) = 0¶
Reverts a specific statistic that has previously been updated via the function
applyPrediction.- Parameters:
statisticIndex – The index of the statistic that should be updated
-
inline virtual ~IStatisticsUpdate()¶
-
template<typename ScoreType>
class IStatisticsUpdateFactory¶ - #include <statistics_update.hpp>
Defines an interface for all factories that allow to create instances of the type
IStatisticsUpdate.- Template Parameters:
ScoreType – The type of the scores that are used for updating statistics
Public Functions
-
inline virtual ~IStatisticsUpdateFactory()¶
-
virtual std::unique_ptr<IStatisticsUpdate> create(CompleteIndexVector::const_iterator indicesBegin, CompleteIndexVector::const_iterator indicesEnd, typename View<ScoreType>::const_iterator scoresBegin, typename View<ScoreType>::const_iterator scoresEnd) = 0¶
Creates and returns a new instance of type
IStatisticsUpdatefor updating statistics for all of the available outputs.- Parameters:
indicesBegin – An iterator to the beginning of the output indices for which statistics should be updated
indicesEnd – An iterator to the end of the output indices for which statistics should be updated
scoresBegin – An iterator to the beginning of the predicted scores, corresponding to the given output indices, that should be used for updating the statistics
scoresEnd – An iterator to the end of the predicted scores, corresponding to the given output indices, that should be used for updating the statistics
- Returns:
An unique pointer to an object of type
IStatisticsUpdatethat has been created
-
virtual std::unique_ptr<IStatisticsUpdate> create(PartialIndexVector::const_iterator indicesBegin, PartialIndexVector::const_iterator indicesEnd, typename View<ScoreType>::const_iterator scoresBegin, typename View<ScoreType>::const_iterator scoresEnd) = 0¶
Creates and returns a new instance of type
IStatisticsUpdatefor updating statistics for a subset of the available outputs.- Parameters:
indicesBegin – An iterator to the beginning of the output indices for which statistics should be updated
indicesEnd – An iterator to the end of the output indices for which statistics should be updated
scoresBegin – An iterator to the beginning of the predicted scores, corresponding to the given output indices, that should be used for updating the statistics
scoresEnd – An iterator to the end of the predicted scores, corresponding to the given output indices, that should be used for updating the statistics
- Returns:
An unique pointer to an object of type
IStatisticsUpdatethat has been created