binarize

Function binarize 

Source
pub fn binarize(x: &Array2<Float>, threshold: Float) -> Result<Array2<Float>>
Expand description

Boolean thresholding of array-like or scipy.sparse matrix

§Arguments

  • x - The data to binarize
  • threshold - Feature values below or equal to this are replaced by 0, above it by 1

§Returns

Binarized data