pub struct RandomProjection { /* private fields */ }Expand description
Fit-free projection via random matrix (Johnson-Lindenstrauss).
Generates a fixed 3×n random matrix at construction time. Preserves pairwise distances probabilistically without needing a training corpus. Less accurate than PCA for any specific dataset, but useful when no corpus is available or for quick prototyping.
Deterministic for a given seed.
Implementations§
Source§impl RandomProjection
impl RandomProjection
pub fn new(dim: usize, radial: RadialStrategy, seed: u64) -> Self
pub fn new_default(dim: usize) -> Self
Trait Implementations§
Source§impl Clone for RandomProjection
impl Clone for RandomProjection
Source§fn clone(&self) -> RandomProjection
fn clone(&self) -> RandomProjection
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 Projection for RandomProjection
impl Projection for RandomProjection
fn project(&self, embedding: &Embedding) -> SphericalPoint
fn dimensionality(&self) -> usize
Source§fn project_rich(&self, embedding: &Embedding) -> ProjectedPoint
fn project_rich(&self, embedding: &Embedding) -> ProjectedPoint
Project with rich metadata: certainty, intensity, projection magnitude.
Auto Trait Implementations§
impl Freeze for RandomProjection
impl !RefUnwindSafe for RandomProjection
impl Send for RandomProjection
impl Sync for RandomProjection
impl Unpin for RandomProjection
impl UnsafeUnpin for RandomProjection
impl !UnwindSafe for RandomProjection
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