pub struct RawProjection {
pub scores: Vec<f32>,
pub order: RawScoreOrder,
}Expand description
Uncalibrated one-hop scores for (anchor, relation, ?).
Query evaluation consumes calibrated degrees from
AtomicScorer::project. This raw form is for calibrators and diagnostics
that need the model’s native score scale before it is mapped to [0, 1].
Fields§
§scores: Vec<f32>Raw score per entity.
order: RawScoreOrderWhether larger or smaller scores are better in scores.
Implementations§
Source§impl RawProjection
impl RawProjection
Sourcepub fn new(scores: Vec<f32>, order: RawScoreOrder) -> Self
pub fn new(scores: Vec<f32>, order: RawScoreOrder) -> Self
Create a raw projection with an explicit score order.
Sourcepub fn oriented_score(&self, score: f32) -> f32
pub fn oriented_score(&self, score: f32) -> f32
Return a score where larger means stronger membership.
Sourcepub fn oriented_scores(&self) -> Vec<f32>
pub fn oriented_scores(&self) -> Vec<f32>
Return all scores oriented so larger means stronger membership.
Trait Implementations§
Source§impl Clone for RawProjection
impl Clone for RawProjection
Source§fn clone(&self) -> RawProjection
fn clone(&self) -> RawProjection
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 RawProjection
impl Debug for RawProjection
Source§impl PartialEq for RawProjection
impl PartialEq for RawProjection
Source§fn eq(&self, other: &RawProjection) -> bool
fn eq(&self, other: &RawProjection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RawProjection
Auto Trait Implementations§
impl Freeze for RawProjection
impl RefUnwindSafe for RawProjection
impl Send for RawProjection
impl Sync for RawProjection
impl Unpin for RawProjection
impl UnsafeUnpin for RawProjection
impl UnwindSafe for RawProjection
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