Function parsnip::fbeta_score [−][src]
pub fn fbeta_score(
pred: &[u64],
actual: &[u64],
beta: f32,
average: Option<String>
) -> f32
The recall of a dataset
Returns the fbeta score [0, 1]
Supports macro and weighted averages
use parsnip::fbeta_score; let actual = vec![0, 1, 2, 0, 1, 2]; let pred = vec![0, 2, 1, 0, 0, 1]; assert_eq!(fbeta_score(&pred, &actual, 0.5, Some("macro".to_string())), 0.23809524); assert_eq!(fbeta_score(&pred, &actual, 0.5, Some("weighted".to_string())), 0.23809527);