liana.utils.neg_to_zero¶
- liana.utils.neg_to_zero(X, cutoff=0)¶
Set negative values to 0.
- Parameters:
- Xarray-like
Data to be transformed.
- cutofffloat
Cutoff value for zero-inflation - values less than this are set to 0. Default is 0.
- Returns:
- A csr_matrix.