File matrix_coverage_dense.hpp¶
-
namespace seco
-
class DenseCoverageMatrix : public DenseMatrixDecorator<AllocatedCContiguousView<uint32>>¶
- #include <matrix_coverage_dense.hpp>
A two-dimensional matrix that stores how often individual examples and labels have been covered in a C-contiguous array.
Public Functions
-
DenseCoverageMatrix(uint32 numRows, uint32 numCols, float64 sumOfUncoveredWeights)¶
- Parameters:
numRows – The number of rows in the matrix
numCols – The number of columns in the matrix
sumOfUncoveredWeights – The sum of the weights of all examples and labels that have not been covered yet
-
float64 getSumOfUncoveredWeights() const¶
Returns the sum of the weights of all examples and labels that have not been covered yet.
- Returns:
The sum of the weights of all examples and labels that have not been covered yet
-
void increaseCoverage(uint32 row, View<uint32>::const_iterator majorityLabelIndicesBegin, View<uint32>::const_iterator majorityLabelIndicesEnd, View<float64>::const_iterator predictionBegin, View<float64>::const_iterator predictionEnd, CompleteIndexVector::const_iterator indicesBegin, CompleteIndexVector::const_iterator indicesEnd)¶
Increases the number of times the elements at a specific row of this matrix are covered, given the predictions of a rule that predicts for all available labels.
- Parameters:
row – The row
majorityLabelIndicesBegin – An iterator to the beginning of the indices of the labels that are relevant to the majority of the training examples
majorityLabelIndicesEnd – An iterator to the end of the indices of the labels that are relevant to the majority of the training examples
predictionBegin – An iterator to the beginning of the predictions
predictionEnd – An iterator to the end of the predictions
indicesBegin – An iterator to the beginning of the label indices
indicesEnd – An iterator to the end of the label indices
-
void increaseCoverage(uint32 row, View<uint32>::const_iterator majorityLabelIndicesBegin, View<uint32>::const_iterator majorityLabelIndicesEnd, View<float64>::const_iterator predictionBegin, View<float64>::const_iterator predictionEnd, PartialIndexVector::const_iterator indicesBegin, PartialIndexVector::const_iterator indicesEnd)¶
Increases the number of times the elements at a specific row of this matrix are covered, given the predictions of a rule that predicts for a subset of the available labels.
- Parameters:
row – The row
majorityLabelIndicesBegin – An iterator to the beginning of the indices of the labels that are relevant to the majority of the training examples
majorityLabelIndicesEnd – An iterator to the end of the indices of the labels that are relevant to the majority of the training examples
predictionBegin – An iterator to the beginning of the predictions
predictionEnd – An iterator to the end of the predictions
indicesBegin – An iterator to the beginning of the label indices
indicesEnd – An iterator to the end of the label indices
-
void decreaseCoverage(uint32 row, View<uint32>::const_iterator majorityLabelIndicesBegin, View<uint32>::const_iterator majorityLabelIndicesEnd, View<float64>::const_iterator predictionBegin, View<float64>::const_iterator predictionEnd, CompleteIndexVector::const_iterator indicesBegin, CompleteIndexVector::const_iterator indicesEnd)¶
Decreases the number of times the elements at a specific row of this matrix are covered, given the predictions of a rule that predicts for all available labels.
- Parameters:
row – The row
majorityLabelIndicesBegin – An iterator to the beginning of the indices of the labels that are relevant to the majority of the training examples
majorityLabelIndicesEnd – An iterator to the end of the indices of the labels that are relevant to the majority of the training examples
predictionBegin – An iterator to the beginning of the predictions
predictionEnd – An iterator to the end of the predictions
indicesBegin – An iterator to the beginning of the label indices
indicesEnd – An iterator to the end of the label indices
-
void decreaseCoverage(uint32 row, View<uint32>::const_iterator majorityLabelIndicesBegin, View<uint32>::const_iterator majorityLabelIndicesEnd, View<float64>::const_iterator predictionBegin, View<float64>::const_iterator predictionEnd, PartialIndexVector::const_iterator indicesBegin, PartialIndexVector::const_iterator indicesEnd)¶
Decreases the number of times the elements at a specific row of this matrix are covered, given the predictions of a rule that predicts for a subset of the available labels.
- Parameters:
row – The row
majorityLabelIndicesBegin – An iterator to the beginning of the indices of the labels that are relevant to the majority of the training examples
majorityLabelIndicesEnd – An iterator to the end of the indices of the labels that are relevant to the majority of the training examples
predictionBegin – An iterator to the beginning of the predictions
predictionEnd – An iterator to the end of the predictions
indicesBegin – An iterator to the beginning of the label indices
indicesEnd – An iterator to the end of the label indices
-
DenseCoverageMatrix(uint32 numRows, uint32 numCols, float64 sumOfUncoveredWeights)¶
-
class DenseCoverageMatrix : public DenseMatrixDecorator<AllocatedCContiguousView<uint32>>¶