File statistics_provider.hpp

class IStatisticsProvider
#include <statistics_provider.hpp>

Provides access to an object of type IStatistics.

Public Functions

inline virtual ~IStatisticsProvider()
virtual IStatistics &get() const = 0

Returns an object of type IStatistics.

Returns:

A reference to an object of type IStatistics

virtual void switchToRegularRuleEvaluation() = 0

Switches the implementation that is used for calculating the predictions of rules, as well their overall quality, to the one that should be used for learning regular rules.

virtual void switchToPruningRuleEvaluation() = 0

Switches the implementation that is used for calculating the predictions of rules, as well as their overall quality, to the one that should be used for pruning rules.

class IStatisticsProviderFactory
#include <statistics_provider.hpp>

Defines an interface for all classes that allow to create instances of the class IStatisticsProvider.

Public Functions

inline virtual ~IStatisticsProviderFactory()
virtual std::unique_ptr<IStatisticsProvider> create(const CContiguousView<const uint8> &labelMatrix) const = 0

Creates and returns a new instance of the class IStatisticsProvider, based on a label matrix that provides random access to the labels of the training examples.

Parameters:

labelMatrix – A reference to an object of type CContiguousView that provides random access to the labels of the training examples

Returns:

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

virtual std::unique_ptr<IStatisticsProvider> create(const BinaryCsrView &labelMatrix) const = 0

Creates and returns a new instance of the class IStatisticsProvider, based on a sparse label matrix that provides row-wise access to the labels of the training examples.

Parameters:

labelMatrix – A reference to an object of type BinaryCsrView that provides row-wise access to the labels of the training examples

Returns:

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