File feature_matrix_csc.hpp¶
Functions
-
std::unique_ptr<ICscFeatureMatrix> createCscFeatureMatrix(const float32 *values, uint32 *indices, uint32 *indptr, uint32 numRows, uint32 numCols, float32 sparseValue = 0.0f)¶
Creates and returns a new object of the type
ICscFeatureMatrix
.- Parameters:
values – A pointer to an array of type
float32
, shape(numNonZeroValues)
, that stores all non-zero feature valuesindices – A pointer to an array of type
uint32
, shape(numNonZeroValues)
, that stores the row-indices, the values invalues
correspond toindptr – A pointer to an array of type
uint32
, shape(numCols + 1)
, that stores the indices of the first element invalues
andindices
that corresponds to a certain column. The index at the last position is equal tonumNonZeroValues
numRows – 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
ICscFeatureMatrix
that has been created
-
class ICscFeatureMatrix : public IColumnWiseFeatureMatrix¶
- #include <feature_matrix_csc.hpp>
Defines an interface for all feature matrices that provide column-wise access to the feature values of examples that are stored in a sparse matrix in the compressed sparse column (CSC) format.
Public Functions
-
inline virtual ~ICscFeatureMatrix() override¶
-
inline virtual ~ICscFeatureMatrix() override¶