binarize#
- cuml.preprocessing.binarize(X, *, threshold=0.0, copy=True)[source]#
Boolean thresholding of array-like or sparse matrix
- Parameters:
- X{array-like, sparse matrix}, shape [n_samples, n_features]
The data to binarize, element by element.
- thresholdfloat, optional (0.0 by default)
Feature values below or equal to this are replaced by 0, above it by 1. Threshold may not be less than 0 for operations on sparse matrices.
- copyboolean, optional, default True
Whether a forced copy will be triggered. If copy=False, a copy might be triggered by a conversion.
See also
BinarizerPerforms binarization using the
TransformerAPI