pub struct RadialContext {
pub embedding_magnitude: f64,
pub projection_magnitude: f64,
pub certainty: f64,
}Expand description
Per-point information available when resolving the radial coordinate.
Modern L2-normalized embeddings make embedding_magnitude a constant
1.0, wasting the radial axis. This struct exposes the additional
signals the projection naturally produces (post-projection magnitude,
per-point certainty) so a RadialStrategy can encode something
useful in r instead.
Fields§
§embedding_magnitude: f64L2 norm of the raw input embedding (pre-normalization).
projection_magnitude: f64L2 norm of the (x, y, z) projected vector before re-scaling. High values mean the 3 components captured most of the input’s variance; low values mean the input fell mostly into the residual.
certainty: f64Fraction of input variance retained by the projection, in [0, 1].
Source depends on the projection family — PCA uses captured-variance
ratio; KPCA uses Hoffmann’s reconstruction-error formula;
Laplacian uses tanh(projection_magnitude); Random reports 1.0.
Implementations§
Source§impl RadialContext
impl RadialContext
Sourcepub fn from_magnitude(embedding_magnitude: f64) -> Self
pub fn from_magnitude(embedding_magnitude: f64) -> Self
Construct from just the embedding magnitude. Other fields default
to neutral values; use Self::full when projection-side
information is available.
Trait Implementations§
Source§impl Clone for RadialContext
impl Clone for RadialContext
Source§fn clone(&self) -> RadialContext
fn clone(&self) -> RadialContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RadialContext
Auto Trait Implementations§
impl Freeze for RadialContext
impl RefUnwindSafe for RadialContext
impl Send for RadialContext
impl Sync for RadialContext
impl Unpin for RadialContext
impl UnsafeUnpin for RadialContext
impl UnwindSafe for RadialContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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