File feature_matrix_csr.hpp¶
Functions
-
std::unique_ptr<ICsrFeatureMatrix> createCsrFeatureMatrix(const float32 *values, uint32 *indices, uint32 *indptr, uint32 numRows, uint32 numCols, float32 sparseValue = 0.0f)¶
Creates and returns a new object of the type
ICsrFeatureMatrix.- Parameters:
values – A pointer to an array of type
float32, shape(numDenseElements), that stores the values of all dense elements explicitly stored in the matrixindices – A pointer to an array of type
uint32, shape(numDenseElements), that stores the column-indices, the values invaluescorrespond toindptr – A pointer to an array of type
uint32, shape(numRows + 1), that stores the indices of first element invaluesandindicesthat corresponds to a certain row. The index at the last position is equal tonumDenseElementsnumRows – The number of rows in the feature matrix
numCols – The number of columns in the feature matrix
sparseValue – The value that should be used for sparse elements in the feature matrix
- Returns:
An unique pointer to an object of type
ICsrFeatureMatrixthat has been created
-
class ICsrFeatureMatrix : public IRowWiseFeatureMatrix¶
- #include <feature_matrix_csr.hpp>
Defines an interface for all feature matrices that provide row-wise access to the feature values of examples that are stored in a sparse matrix in the compressed sparse row (CSR) format.
Public Functions
-
inline virtual ~ICsrFeatureMatrix() override¶
-
inline virtual ~ICsrFeatureMatrix() override¶