File view_statistic_non_decomposable_dense.hpp¶
-
namespace boosting
-
template<typename StatisticType>
class DenseNonDecomposableStatisticView : public CompositeMatrix<AllocatedCContiguousView<StatisticType>, AllocatedCContiguousView<StatisticType>>¶ - #include <view_statistic_non_decomposable_dense.hpp>
Implements row-wise read and write access to the gradients and Hessians that have been calculated using a non-decomposable loss function and are stored in pre-allocated C-contiguous arrays.
- Template Parameters:
StatisticType – The type of the gradients and Hessians
Public Types
-
using gradient_const_iterator = AllocatedCContiguousView<StatisticType>::value_const_iterator¶
An iterator that provides read-only access to the gradients.
-
using gradient_iterator = AllocatedCContiguousView<StatisticType>::value_iterator¶
An iterator that provides access to the gradients and allows to modify them.
-
using hessian_const_iterator = AllocatedCContiguousView<StatisticType>::value_const_iterator¶
An iterator that provides read-only access to the Hessians.
-
using hessian_iterator = AllocatedCContiguousView<StatisticType>::value_iterator¶
An iterator that provides access to the Hessians and allows to modify them.
-
using hessian_diagonal_const_iterator = DiagonalIterator<const StatisticType>¶
An iterator that provides read-only access to the Hessians that correspond to the diagonal of the matrix.
Public Functions
-
DenseNonDecomposableStatisticView(uint32 numRows, uint32 numCols)¶
- Parameters:
numRows – The number of rows in the view
numCols – The number of columns in the view
-
DenseNonDecomposableStatisticView(DenseNonDecomposableStatisticView<StatisticType> &&other)¶
- Parameters:
other – A reference to an object of type
DenseNonDecomposableStatisticViewthat should be copied
-
inline virtual ~DenseNonDecomposableStatisticView() override¶
-
gradient_const_iterator gradients_cbegin(uint32 row) const¶
Returns a
gradient_const_iteratorto the beginning of the gradients at a specific row.- Parameters:
row – The row
- Returns:
A
gradient_const_iteratorto the beginning of the given row
-
gradient_const_iterator gradients_cend(uint32 row) const¶
Returns a
gradient_const_iteratorto the end of the gradients at a specific row.- Parameters:
row – The row
- Returns:
A
gradient_const_iteratorto the end of the given row
-
gradient_iterator gradients_begin(uint32 row)¶
Returns a
gradient_iteratorto the beginning of the gradients at a specific row.- Parameters:
row – The row
- Returns:
A
gradient_iteratorto the beginning of the given row
-
gradient_iterator gradients_end(uint32 row)¶
Returns a
gradient_iteratorto the end of the gradients at a specific row.- Parameters:
row – The row
- Returns:
A
gradient_iteratorto the end of the given row
-
hessian_const_iterator hessians_cbegin(uint32 row) const¶
Returns a
hessian_const_iteratorto the beginning of the Hessians at a specific row.- Parameters:
row – The row
- Returns:
A
hessian_const_iteratorto the beginning of the given row
-
hessian_const_iterator hessians_cend(uint32 row) const¶
Returns a
hessian_const_iteratorto the end of the Hessians at a specific row.- Parameters:
row – The row
- Returns:
A
hessian_const_iteratorto the end of the given row
-
hessian_diagonal_const_iterator hessians_diagonal_cbegin(uint32 row) const¶
Returns a
hessian_diagonal_const_iteratorto the beginning of the Hessians that correspond to the diagonal of the Hessian matrix at a specific row.- Parameters:
row – The row
- Returns:
A
hessian_diagonal_const_iteratorto the beginning
-
hessian_diagonal_const_iterator hessians_diagonal_cend(uint32 row) const¶
Returns a
hessian_diagonal_const_iteratorto the end of the Hessians that correspond to the diagonal of the Hessian matrix at a specific row.- Parameters:
row – The row
- Returns:
A
hessian_diagonal_const_iteratorto the end
-
hessian_iterator hessians_begin(uint32 row)¶
Returns a
hessian_iteratorto the beginning of the Hessians at a specific row.- Parameters:
row – The row
- Returns:
A
hessian_iteratorto the beginning of the given row
-
hessian_iterator hessians_end(uint32 row)¶
Returns a
hessian_iteratorto the end of the Hessians at a specific row.- Parameters:
row – The row
- Returns:
A
hessian_iteratorto the end of the given row
-
template<typename StatisticType>