pub struct TrainingMetrics {
pub accuracy: f64,
pub precision: f64,
pub recall: f64,
pub f1_score: f64,
pub auc_roc: f64,
pub train_size: usize,
pub test_size: usize,
}Expand description
Training metrics
Fields§
§accuracy: f64Accuracy (correct / total)
precision: f64Precision (TP / (TP + FP))
recall: f64Recall (TP / (TP + FN))
f1_score: f64F1 score (harmonic mean of precision and recall)
auc_roc: f64Area under ROC curve
train_size: usizeNumber of training examples
test_size: usizeNumber of test examples
Implementations§
Source§impl TrainingMetrics
impl TrainingMetrics
Sourcepub fn calculate_f1(precision: f64, recall: f64) -> f64
pub fn calculate_f1(precision: f64, recall: f64) -> f64
Calculate F1 from precision and recall
Trait Implementations§
Source§impl Clone for TrainingMetrics
impl Clone for TrainingMetrics
Source§fn clone(&self) -> TrainingMetrics
fn clone(&self) -> TrainingMetrics
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 TrainingMetrics
impl Debug for TrainingMetrics
Source§impl Default for TrainingMetrics
impl Default for TrainingMetrics
Source§fn default() -> TrainingMetrics
fn default() -> TrainingMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TrainingMetrics
impl RefUnwindSafe for TrainingMetrics
impl Send for TrainingMetrics
impl Sync for TrainingMetrics
impl Unpin for TrainingMetrics
impl UnsafeUnpin for TrainingMetrics
impl UnwindSafe for TrainingMetrics
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