Function rusty_machine::analysis::score::recall [] [src]

pub fn recall<'a, I, T>(outputs: I, targets: I) -> f64 where I: ExactSizeIterator<Item=&'a T>, T: 'a + PartialEq + Zero + One

Returns the recall score for 2 class classification.

Recall is calculated with true-positive / (true-positive + false-negative), see Precision and Recall for details.

Arguments

Examples

use rusty_machine::analysis::score::recall;
let outputs = [1, 1, 1, 0, 0, 0];
let targets = [1, 1, 0, 0, 1, 1];

assert_eq!(recall(outputs.iter(), targets.iter()), 0.5);

Panics