Struct tangram_metrics::ClassMetrics[][src]

pub struct ClassMetrics {
    pub true_positives: u64,
    pub false_positives: u64,
    pub true_negatives: u64,
    pub false_negatives: u64,
    pub accuracy: f32,
    pub precision: f32,
    pub recall: f32,
    pub f1_score: f32,
}
Expand description

ClassMetrics are class specific metrics used to evaluate the model’s performance on each individual class.

Fields

true_positives: u64

This is the total number of examples whose label is equal to this class that the model predicted as belonging to this class.

false_positives: u64

This is the total number of examples whose label is not equal to this class that the model predicted as belonging to this class.

true_negatives: u64

This is the total number of examples whose label is not equal to this class that the model predicted as not belonging to this class.

false_negatives: u64

This is the total number of examples whose label is equal to this class that the model predicted as not belonging to this class.

accuracy: f32

The accuracy is the fraction of examples of this class that were correctly classified.

precision: f32

The precision is the fraction of examples the model predicted as belonging to this class whose label is actually equal to this class. precision = true_positives / (true_positives + false_positives). See Precision and Recall.

recall: f32

The recall is the fraction of examples in the dataset whose label is equal to this class that the model predicted as equal to this class. recall = true_positives / (true_positives + false_negatives).

f1_score: f32

The f1 score is the harmonic mean of the precision and the recall. See F1 Score.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.