label_binarize

Function label_binarize 

Source
pub fn label_binarize<T>(
    y: &Array1<T>,
    neg_label: i32,
    pos_label: i32,
) -> Result<Array2<Float>>
where T: Hash + Eq + Clone + Debug + Ord + Send + Sync,
Expand description

Binarize labels in a one-vs-all fashion

§Arguments

  • y - Target values (labels)
  • neg_label - Value for negative labels
  • pos_label - Value for positive labels

§Returns

Binarized labels