pub struct ModelMetrics {
pub true_positives: usize,
pub true_negatives: usize,
pub false_positives: usize,
pub false_negatives: usize,
pub precision: f64,
pub recall: f64,
pub f1_score: f64,
pub accuracy: f64,
pub auc: f64,
}Expand description
Metrics from model evaluation
Fields§
§true_positives: usizeTrue positives
true_negatives: usizeTrue negatives
false_positives: usizeFalse positives
false_negatives: usizeFalse negatives
precision: f64Precision = TP / (TP + FP)
recall: f64Recall = TP / (TP + FN)
f1_score: f64F1 score = 2 * (precision * recall) / (precision + recall)
accuracy: f64Accuracy = (TP + TN) / total
auc: f64Area under ROC curve (approximated)
Implementations§
Source§impl ModelMetrics
impl ModelMetrics
Trait Implementations§
Source§impl Clone for ModelMetrics
impl Clone for ModelMetrics
Source§fn clone(&self) -> ModelMetrics
fn clone(&self) -> ModelMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelMetrics
impl Debug for ModelMetrics
Source§impl Default for ModelMetrics
impl Default for ModelMetrics
Source§fn default() -> ModelMetrics
fn default() -> ModelMetrics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelMetrics
impl<'de> Deserialize<'de> for ModelMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelMetrics
impl RefUnwindSafe for ModelMetrics
impl Send for ModelMetrics
impl Sync for ModelMetrics
impl Unpin for ModelMetrics
impl UnsafeUnpin for ModelMetrics
impl UnwindSafe for ModelMetrics
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 more