pub struct EvalResult {
pub scored: usize,
pub rank1: usize,
pub rr_sum: f64,
pub tp: usize,
pub fp: usize,
pub fn_: usize,
pub ranks: Vec<usize>,
pub abstained: usize,
}Fields§
§scored: usizefunctions in A that we scored (had signal and a same-named twin in B)
rank1: usizetop-1 ranked match in B is the same-named function
rr_sum: f64sum of 1/rank of the correct match, for mean reciprocal rank
tp: usizeat SAME_THRESH: predicted-same that are actually same-named
fp: usize§fn_: usizesame-named pairs we failed to call same
ranks: Vec<usize>1-based rank of the correct match for each scored function. lets us ask “does reviewing the top k candidates find it”, not just the top-1 number.
abstained: usizescored functions where the top-1 similarity was below SAME_THRESH, i.e. the tool would decline to make a confident call rather than guess.
Implementations§
Source§impl EvalResult
impl EvalResult
pub fn rank1_acc(&self) -> f64
pub fn mrr(&self) -> f64
pub fn precision(&self) -> f64
pub fn recall(&self) -> f64
Sourcepub fn recall_at(&self, k: usize) -> f64
pub fn recall_at(&self, k: usize) -> f64
fraction of scored functions whose correct match lands in the top k. recall@5 answers “if an analyst looks at 5 candidates, do they find it”.
Sourcepub fn abstain_rate(&self) -> f64
pub fn abstain_rate(&self) -> f64
how often the tool declined a confident top-1 call. high abstention with high precision is the honest tradeoff: quiet when it isn’t sure.
Auto Trait Implementations§
impl Freeze for EvalResult
impl RefUnwindSafe for EvalResult
impl Send for EvalResult
impl Sync for EvalResult
impl Unpin for EvalResult
impl UnsafeUnpin for EvalResult
impl UnwindSafe for EvalResult
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> 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> ⓘ
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> ⓘ
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