pub enum ConfiguredProjection {
Pca(PcaProjection),
KernelPca(KernelPcaProjection),
Laplacian(LaplacianEigenmapProjection),
}Expand description
A projection chosen at pipeline build time.
Implements Projection directly so EmbeddingIndex<ConfiguredProjection>,
CategoryLayer::build_with_config, and every other Projection-generic
API continues to work without changes.
Variants§
Implementations§
Source§impl ConfiguredProjection
impl ConfiguredProjection
Sourcepub fn kind(&self) -> ProjectionKind
pub fn kind(&self) -> ProjectionKind
Which projection family is active.
Sourcepub fn explained_variance_ratio(&self) -> f64
pub fn explained_variance_ratio(&self) -> f64
Scalar projection-quality proxy, analogous to PCA’s explained
variance ratio. For non-PCA variants this returns the kind’s
native quality metric (Kernel PCA EVR, Laplacian connectivity
ratio) — all bounded in [0, 1] so downstream EVR-adaptive
thresholds stay well-defined.
Sourcepub fn as_pca(&self) -> Option<&PcaProjection>
pub fn as_pca(&self) -> Option<&PcaProjection>
Borrow the inner PcaProjection if that is the active variant.
Sourcepub fn as_kernel_pca(&self) -> Option<&KernelPcaProjection>
pub fn as_kernel_pca(&self) -> Option<&KernelPcaProjection>
Borrow the inner KernelPcaProjection if that is the active variant.
Sourcepub fn as_laplacian(&self) -> Option<&LaplacianEigenmapProjection>
pub fn as_laplacian(&self) -> Option<&LaplacianEigenmapProjection>
Borrow the inner LaplacianEigenmapProjection if that is the
active variant.
Trait Implementations§
Source§impl Clone for ConfiguredProjection
impl Clone for ConfiguredProjection
Source§fn clone(&self) -> ConfiguredProjection
fn clone(&self) -> ConfiguredProjection
Returns a duplicate of the value. Read more
1.0.0 · 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 ConfiguredProjection
impl Debug for ConfiguredProjection
Source§impl From<KernelPcaProjection> for ConfiguredProjection
impl From<KernelPcaProjection> for ConfiguredProjection
Source§fn from(p: KernelPcaProjection) -> Self
fn from(p: KernelPcaProjection) -> Self
Converts to this type from the input type.
Source§impl From<LaplacianEigenmapProjection> for ConfiguredProjection
impl From<LaplacianEigenmapProjection> for ConfiguredProjection
Source§fn from(p: LaplacianEigenmapProjection) -> Self
fn from(p: LaplacianEigenmapProjection) -> Self
Converts to this type from the input type.
Source§impl From<PcaProjection> for ConfiguredProjection
impl From<PcaProjection> for ConfiguredProjection
Source§fn from(p: PcaProjection) -> Self
fn from(p: PcaProjection) -> Self
Converts to this type from the input type.
Source§impl Projection for ConfiguredProjection
impl Projection for ConfiguredProjection
fn project(&self, embedding: &Embedding) -> SphericalPoint
Source§fn project_rich(&self, embedding: &Embedding) -> ProjectedPoint
fn project_rich(&self, embedding: &Embedding) -> ProjectedPoint
Project with rich metadata: certainty, intensity, projection magnitude.
fn dimensionality(&self) -> usize
Auto Trait Implementations§
impl Freeze for ConfiguredProjection
impl !RefUnwindSafe for ConfiguredProjection
impl Send for ConfiguredProjection
impl Sync for ConfiguredProjection
impl Unpin for ConfiguredProjection
impl UnsafeUnpin for ConfiguredProjection
impl !UnwindSafe for ConfiguredProjection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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