Features.proportionZero

Features.proportionZero(groupByFeature=None)

Returns a nimble object representing the proportion of values that are equal to zero along the features axis.

Parameters:

groupByFeature (identifier, None) – An optional index or name of the feature that makes the result grouped by the point values along the chosen feature axis.

Examples

>>> lst = [[1, 2, 0], [0, 0, 5]]
>>> X = nimble.data(lst)
>>> X.features.proportionZero()
<Matrix 1pt x 3ft
                    0      1      2
                ┌────────────────────
 proportionzero │ 0.500  0.500  0.500
>