#[non_exhaustive]pub struct Metrics {
pub precision: f32,
pub recall: f32,
pub f1_score: f32,
pub predicted_occurrences_count: i32,
pub ground_truth_occurrences_count: i32,
pub predicted_document_count: i32,
pub ground_truth_document_count: i32,
pub true_positives_count: i32,
pub false_positives_count: i32,
pub false_negatives_count: i32,
pub total_documents_count: i32,
/* private fields */
}Expand description
Evaluation metrics, either in aggregate or about a specific entity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.precision: f32The calculated precision.
recall: f32The calculated recall.
f1_score: f32The calculated f1 score.
predicted_occurrences_count: i32The amount of occurrences in predicted documents.
ground_truth_occurrences_count: i32The amount of occurrences in ground truth documents.
predicted_document_count: i32The amount of documents with a predicted occurrence.
ground_truth_document_count: i32The amount of documents with a ground truth occurrence.
true_positives_count: i32The amount of true positives.
false_positives_count: i32The amount of false positives.
false_negatives_count: i32The amount of false negatives.
total_documents_count: i32The amount of documents that had an occurrence of this label.
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn set_precision<T: Into<f32>>(self, v: T) -> Self
pub fn set_precision<T: Into<f32>>(self, v: T) -> Self
Sourcepub fn set_recall<T: Into<f32>>(self, v: T) -> Self
pub fn set_recall<T: Into<f32>>(self, v: T) -> Self
Sourcepub fn set_f1_score<T: Into<f32>>(self, v: T) -> Self
pub fn set_f1_score<T: Into<f32>>(self, v: T) -> Self
Sourcepub fn set_predicted_occurrences_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_predicted_occurrences_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of predicted_occurrences_count.
§Example
let x = Metrics::new().set_predicted_occurrences_count(42);Sourcepub fn set_ground_truth_occurrences_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_ground_truth_occurrences_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of ground_truth_occurrences_count.
§Example
let x = Metrics::new().set_ground_truth_occurrences_count(42);Sourcepub fn set_predicted_document_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_predicted_document_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of predicted_document_count.
§Example
let x = Metrics::new().set_predicted_document_count(42);Sourcepub fn set_ground_truth_document_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_ground_truth_document_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of ground_truth_document_count.
§Example
let x = Metrics::new().set_ground_truth_document_count(42);Sourcepub fn set_true_positives_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_true_positives_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of true_positives_count.
§Example
let x = Metrics::new().set_true_positives_count(42);Sourcepub fn set_false_positives_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_false_positives_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of false_positives_count.
§Example
let x = Metrics::new().set_false_positives_count(42);Sourcepub fn set_false_negatives_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_false_negatives_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of false_negatives_count.
§Example
let x = Metrics::new().set_false_negatives_count(42);Sourcepub fn set_total_documents_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_total_documents_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of total_documents_count.
§Example
let x = Metrics::new().set_total_documents_count(42);Trait Implementations§
impl StructuralPartialEq for Metrics
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request