File statistics.hpp

namespace boosting
class IBoostingStatistics : public virtual IStatistics
#include <statistics.hpp>

Defines an interface for all classes that provide access to gradients and Hessians which serve as the basis for learning a new boosted rule or refining an existing one.

Subclassed by boosting::IDecomposableStatistics< RuleEvaluationFactory >, boosting::INonDecomposableStatistics< NonDecomposableRuleEvaluationFactory, DecomposableRuleEvaluationFactory >

Public Types

template<typename ScoreType>
using DenseScoreMatrixVisitor = std::function<void(const CContiguousView<ScoreType>&)>

A visitor function for handling score matrices of the type CContiguousView.

template<typename ScoreType>
using SparseScoreMatrixVisitor = std::function<void(const SparseSetView<ScoreType>&)>

A visitor function for handling score matrices of the type SparseSetView.

Public Functions

inline virtual ~IBoostingStatistics()
virtual void visitScoreMatrix(DenseScoreMatrixVisitor<float32> dense32BitVisitor, DenseScoreMatrixVisitor<float64> dense64BitVisitor, SparseScoreMatrixVisitor<float32> sparse32BitVisitor, SparseScoreMatrixVisitor<float64> sparse64BitVisitor) const = 0

Invokes one of the given visitor functions, depending on which one is able to handle the type of matrix that is used to store the currently predicted scores.

Parameters:
  • dense32BitVisitor – The visitor function for handling objects of the type CContiguousView<float32>

  • dense64BitVisitor – The visitor function for handling objects of the type CContiguousView<float64>

  • sparse32BitVisitor – The visitor function for handling objects of the type SparseSetView<float32>

  • sparse64BitVisitor – The visitor function for handling objects of the type SparseSetView<float64>