mlrl.testbed_sklearn.experiments.output.characteristics.data.matrix_output module¶
Author: Michael Rapp (michael.rapp.ml@gmail.com)
Provides classes that provide access to characteristics of values, associated with one or several outputs.
- class mlrl.testbed_sklearn.experiments.output.characteristics.data.matrix_output.OutputMatrix(values)¶
Bases:
objectProvides access to characteristics of values, associated with one or several outputs, that are stored in a numpy.ndarray, scipy.sparse.spmatrix or scipy.sparse.sparray.
- mlrl.testbed_sklearn.experiments.output.characteristics.data.matrix_output.density(array) float¶
Calculates and returns the density of a two-dimensional array.
- Parameters:
array – A numpy.ndarray or scipy.sparse.spmatrix or scipy.sparse.sparray, shape (num_rows, num_cols)
- Returns:
The fraction of dense elements explicitly stored in the given array