File statistics_non_decomposable.hpp

namespace boosting
template<typename NonDecomposableRuleEvaluationFactory, typename DecomposableRuleEvaluationFactory>
class INonDecomposableStatistics : public virtual boosting::IBoostingStatistics
#include <statistics_non_decomposable.hpp>

Defines an interface for all classes that store gradients and Hessians that have been calculated according to a non-decomposable loss function.

Template Parameters:
  • NonDecomposableRuleEvaluationFactory – The type of the classes that may be used for calculating the predictions of rules, as well as their overall quality, based on gradients and Hessians that have been calculated according to a non-decomposable loss function

  • DecomposableRuleEvaluationFactory – The type of the classes that may be used for calculating the predictions of rules, as well as their overall quality, based on gradients and Hessians that have been calculated according to a decomposable loss function

Public Functions

inline virtual ~INonDecomposableStatistics() override
virtual void setRuleEvaluationFactory(const NonDecomposableRuleEvaluationFactory &ruleEvaluationFactory) = 0

Sets the factory that allows to create instances of the class that is used for calculating the predictions of rules, as well as their overall quality.

Parameters:

ruleEvaluationFactory – A reference to an object of template type NonDecomposableRuleEvaluationFactory to be set

virtual std::unique_ptr<IDecomposableStatistics<DecomposableRuleEvaluationFactory>> toDecomposableStatistics(const DecomposableRuleEvaluationFactory &ruleEvaluationFactory, uint32 numThreads) = 0

Creates and returns an instance of type IDecomposableStatistics from the gradients and Hessians that are stored by this object.

Parameters:
  • ruleEvaluationFactory – A reference to an object of template type DecomposableRuleEvaluationFactory that allows to create instances of the class that is used for calculating the predictions of rules, as well as their overall quality

  • numThreads – The number of threads that should be used to convert the statistics for individual examples in parallel

Returns:

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