mlrl.common.cython.feature_matrix module

@author Michael Rapp (michael.rapp.ml@gmail.com)

class mlrl.common.cython.feature_matrix.CContiguousFeatureMatrix

Bases: RowWiseFeatureMatrix

A feature matrix that provides row-wise access to the feature values of examples that are stored in a C-contiguous array.

class mlrl.common.cython.feature_matrix.ColumnWiseFeatureMatrix

Bases: FeatureMatrix

A feature matrix that provides column-wise access to the feature values of examples.

class mlrl.common.cython.feature_matrix.CscFeatureMatrix

Bases: ColumnWiseFeatureMatrix

A feature matrix that provides column-wise access to the feature values of examples that are stored in a sparse matrix in the compressed sparse column (CSC) format.

class mlrl.common.cython.feature_matrix.CsrFeatureMatrix

Bases: RowWiseFeatureMatrix

A feature matrix that provides row-wise access to the feature values of examples that are stored in a sparse matrix in the compressed sparse row (CSR) format.

class mlrl.common.cython.feature_matrix.FeatureMatrix

Bases: object

A feature matrix.

get_num_examples() int

Returns the number of examples in the feature matrix.

:return The number of examples

get_num_features() int

Returns the number of features in the feature matrix.

:return The number of features

is_sparse() bool

Returns whether the feature matrix is sparse or not.

Returns:

True, if the feature matrix is sparse, False otherwise

class mlrl.common.cython.feature_matrix.FortranContiguousFeatureMatrix

Bases: ColumnWiseFeatureMatrix

A feature matrix that provides column-wise access to the feature values of examples that are stored in a Fortran-contiguous array.

class mlrl.common.cython.feature_matrix.RowWiseFeatureMatrix

Bases: FeatureMatrix

A feature matrix that provides row-wise access to the feature values of examples.