pub struct RecallReport {
pub k: usize,
pub query_count: usize,
pub mean_recall: f64,
pub min_recall: f64,
pub max_recall: f64,
}Expand description
Summary of a recall@k measurement against a known or computed ground-truth set.
mean_recall, min_recall, and max_recall are aggregated across the
query set; each per-query recall is |retrieved_topk ∩ true_topk| / k
and lies in [0.0, 1.0]. Per-query values are not retained because
they grow O(n_queries) and the use cases at this version only need the
summary.
§Examples
use iqdb_eval::RecallReport;
let r = RecallReport {
k: 10,
query_count: 100,
mean_recall: 0.97,
min_recall: 0.80,
max_recall: 1.00,
};
assert!(r.min_recall <= r.mean_recall && r.mean_recall <= r.max_recall);Fields§
§k: usizeThe k used for the top-k queries that produced this report.
query_count: usizeThe number of queries the report was aggregated over.
mean_recall: f64Arithmetic mean of per-query recall across the query set.
min_recall: f64Smallest per-query recall observed in the query set.
max_recall: f64Largest per-query recall observed in the query set.
Trait Implementations§
Source§impl Clone for RecallReport
impl Clone for RecallReport
Source§fn clone(&self) -> RecallReport
fn clone(&self) -> RecallReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RecallReport
impl Debug for RecallReport
Source§impl<'de> Deserialize<'de> for RecallReport
impl<'de> Deserialize<'de> for RecallReport
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
Source§impl PartialEq for RecallReport
impl PartialEq for RecallReport
Source§fn eq(&self, other: &RecallReport) -> bool
fn eq(&self, other: &RecallReport) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RecallReport
impl Serialize for RecallReport
impl StructuralPartialEq for RecallReport
Auto Trait Implementations§
impl Freeze for RecallReport
impl RefUnwindSafe for RecallReport
impl Send for RecallReport
impl Sync for RecallReport
impl Unpin for RecallReport
impl UnsafeUnpin for RecallReport
impl UnwindSafe for RecallReport
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