pub struct RandomProjectionValidParams<Proj: ProjectionMethod, R: Rng + Clone> { /* private fields */ }
Expand description
Random projection hyperparameters
The main hyperparameter of random projections is
the dimension of the embedding.
This dimension is usually determined by the desired precision (or distortion) eps
,
using the Johnson-Lindenstrauss Lemma.
However, this lemma makes a very conservative estimate of the required dimension,
and does not leverage the structure of the data, therefore it is also possible
to manually specify the dimension of the embedding.
As this algorithm is randomized, it also accepts an Rng
as parameter,
to be used to sample coordinate of the projection matrix.
Implementations§
Trait Implementations§
Source§impl<Proj: Clone + ProjectionMethod, R: Clone + Rng + Clone> Clone for RandomProjectionValidParams<Proj, R>
impl<Proj: Clone + ProjectionMethod, R: Clone + Rng + Clone> Clone for RandomProjectionValidParams<Proj, R>
Source§fn clone(&self) -> RandomProjectionValidParams<Proj, R>
fn clone(&self) -> RandomProjectionValidParams<Proj, R>
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<Proj: Debug + ProjectionMethod, R: Debug + Rng + Clone> Debug for RandomProjectionValidParams<Proj, R>
impl<Proj: Debug + ProjectionMethod, R: Debug + Rng + Clone> Debug for RandomProjectionValidParams<Proj, R>
Source§impl<F, Proj, Rec, T, R> Fit<Rec, T, ReductionError> for RandomProjectionValidParams<Proj, R>where
F: Float,
Proj: ProjectionMethod,
Rec: Records<Elem = F>,
R: Rng + Clone,
Proj::RandomDistribution: Distribution<F>,
impl<F, Proj, Rec, T, R> Fit<Rec, T, ReductionError> for RandomProjectionValidParams<Proj, R>where
F: Float,
Proj: ProjectionMethod,
Rec: Records<Elem = F>,
R: Rng + Clone,
Proj::RandomDistribution: Distribution<F>,
type Object = RandomProjection<Proj, F>
fn fit( &self, dataset: &DatasetBase<Rec, T>, ) -> Result<Self::Object, ReductionError>
Source§impl<Proj: PartialEq + ProjectionMethod, R: PartialEq + Rng + Clone> PartialEq for RandomProjectionValidParams<Proj, R>
impl<Proj: PartialEq + ProjectionMethod, R: PartialEq + Rng + Clone> PartialEq for RandomProjectionValidParams<Proj, R>
Source§fn eq(&self, other: &RandomProjectionValidParams<Proj, R>) -> bool
fn eq(&self, other: &RandomProjectionValidParams<Proj, R>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<Proj: ProjectionMethod, R: Rng + Clone> StructuralPartialEq for RandomProjectionValidParams<Proj, R>
Auto Trait Implementations§
impl<Proj, R> Freeze for RandomProjectionValidParams<Proj, R>where
R: Freeze,
impl<Proj, R> RefUnwindSafe for RandomProjectionValidParams<Proj, R>where
R: RefUnwindSafe,
Proj: RefUnwindSafe,
impl<Proj, R> Send for RandomProjectionValidParams<Proj, R>
impl<Proj, R> Sync for RandomProjectionValidParams<Proj, R>
impl<Proj, R> Unpin for RandomProjectionValidParams<Proj, R>
impl<Proj, R> UnwindSafe for RandomProjectionValidParams<Proj, R>where
R: UnwindSafe,
Proj: UnwindSafe,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.