pub struct ConfusionMatrix { /* private fields */ }
Expand description
(Binary) Confusion Matrix.
Implementations§
Source§impl ConfusionMatrix
impl ConfusionMatrix
Sourcepub fn true_negative(&self) -> f64
pub fn true_negative(&self) -> f64
True negative (TN).
Sourcepub fn false_negative(&self) -> f64
pub fn false_negative(&self) -> f64
False negative (FN).
Sourcepub fn true_negative_rate(&self) -> f64
pub fn true_negative_rate(&self) -> f64
True negative rate, i.e. specificity (TNR = TN / N).
Sourcepub fn false_negative_rate(&self) -> f64
pub fn false_negative_rate(&self) -> f64
False negative rate, i.e. miss-rate (FNR = FN / P).
Sourcepub fn negative_predictive_value(&self) -> f64
pub fn negative_predictive_value(&self) -> f64
Negative predictive values (NPV = TN / (TN + FN)).
Sourcepub fn false_omission_rate(&self) -> f64
pub fn false_omission_rate(&self) -> f64
False omission rate (FOR = FN / (FN + TN)).
Sourcepub fn true_positive(&self) -> f64
pub fn true_positive(&self) -> f64
True positive (TP).
Sourcepub fn false_positive(&self) -> f64
pub fn false_positive(&self) -> f64
False positive (FP).
Sourcepub fn true_positive_rate(&self) -> f64
pub fn true_positive_rate(&self) -> f64
True positive rate, i.e. sensitivity, recall, hit-rate (TPR = TP / P).
Sourcepub fn false_positive_rate(&self) -> f64
pub fn false_positive_rate(&self) -> f64
False positive rate, i.e. fall-out (FPR = FN / N).
Sourcepub fn positive_predictive_value(&self) -> f64
pub fn positive_predictive_value(&self) -> f64
Positive predictive value, i.e. precision (PPV = TP / (TP + FP)).
Sourcepub fn false_discovery_rate(&self) -> f64
pub fn false_discovery_rate(&self) -> f64
False discovery rate (FDR = FP / (FP + TP)).
Sourcepub fn balanced_accuracy(&self) -> f64
pub fn balanced_accuracy(&self) -> f64
Balanced accuracy (BA = (TPR + TNR) / 2).
Trait Implementations§
Source§impl Clone for ConfusionMatrix
impl Clone for ConfusionMatrix
Source§fn clone(&self) -> ConfusionMatrix
fn clone(&self) -> ConfusionMatrix
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConfusionMatrix
impl Debug for ConfusionMatrix
Source§impl Default for ConfusionMatrix
impl Default for ConfusionMatrix
Source§fn default() -> ConfusionMatrix
fn default() -> ConfusionMatrix
Returns the “default value” for a type. Read more
Source§impl Deref for ConfusionMatrix
impl Deref for ConfusionMatrix
Source§impl From<(DirectedDenseAdjacencyMatrixGraph, DirectedDenseAdjacencyMatrixGraph)> for ConfusionMatrix
impl From<(DirectedDenseAdjacencyMatrixGraph, DirectedDenseAdjacencyMatrixGraph)> for ConfusionMatrix
Source§impl<I, J> From<(I, J)> for ConfusionMatrix
impl<I, J> From<(I, J)> for ConfusionMatrix
Source§impl From<(UndirectedDenseAdjacencyMatrixGraph, UndirectedDenseAdjacencyMatrixGraph)> for ConfusionMatrix
impl From<(UndirectedDenseAdjacencyMatrixGraph, UndirectedDenseAdjacencyMatrixGraph)> for ConfusionMatrix
Source§impl From<ConfusionMatrix> for [f64; 4]
impl From<ConfusionMatrix> for [f64; 4]
Source§fn from(other: ConfusionMatrix) -> Self
fn from(other: ConfusionMatrix) -> Self
Converts to this type from the input type.
impl Copy for ConfusionMatrix
Auto Trait Implementations§
impl Freeze for ConfusionMatrix
impl RefUnwindSafe for ConfusionMatrix
impl Send for ConfusionMatrix
impl Sync for ConfusionMatrix
impl Unpin for ConfusionMatrix
impl UnwindSafe for ConfusionMatrix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.