Struct linfa_reduction::DiffusionMapParams
source · [−]pub struct DiffusionMapParams(_);
Expand description
Diffusion map hyperparameters
The diffusion map algorithms has only two explicit hyperparameter. The first is the stepsize. As the algorithm calculates the closeness of points after a number of steps taken in the diffusion graph, a larger step size introduces a more global behaviour of the projection while a smaller one (especially one) just projects close obserations closely together. The second parameter is the embedding size and defines the target dimensionality.
Implementations
sourceimpl DiffusionMapParams
impl DiffusionMapParams
sourcepub fn steps(self, steps: usize) -> Self
pub fn steps(self, steps: usize) -> Self
Set the number of steps in the diffusion operator
The diffusion map algorithm expresses the transition probability with a kernel matrix and then takes multiple steps along the diffusion operator. In practice scales the eigenvalues of the decomposition exponentially with the number of steps.
pub fn embedding_size(self, embedding_size: usize) -> Self
sourcepub fn new(embedding_size: usize) -> DiffusionMapParams
pub fn new(embedding_size: usize) -> DiffusionMapParams
Creates the set of default parameters
Parameters
embedding_size
: the number of dimensions in the projection
Returns
Parameter set with number of steps = 1
Trait Implementations
sourceimpl Clone for DiffusionMapParams
impl Clone for DiffusionMapParams
sourcefn clone(&self) -> DiffusionMapParams
fn clone(&self) -> DiffusionMapParams
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DiffusionMapParams
impl Debug for DiffusionMapParams
sourceimpl Default for DiffusionMapParams
impl Default for DiffusionMapParams
sourceimpl ParamGuard for DiffusionMapParams
impl ParamGuard for DiffusionMapParams
type Checked = DiffusionMapValidParams
type Checked = DiffusionMapValidParams
The checked hyperparameters
type Error = ReductionError
type Error = ReductionError
Error type resulting from failed hyperparameter checking
sourcefn check_ref(&self) -> Result<&Self::Checked, Self::Error>
fn check_ref(&self) -> Result<&Self::Checked, Self::Error>
Checks the hyperparameters and returns a reference to the checked hyperparameters if successful Read more
sourcefn check(self) -> Result<Self::Checked, Self::Error>
fn check(self) -> Result<Self::Checked, Self::Error>
Checks the hyperparameters and returns the checked hyperparameters if successful
sourcefn check_unwrap(self) -> Self::Checked
fn check_unwrap(self) -> Self::Checked
Calls check()
and unwraps the result
sourceimpl PartialEq<DiffusionMapParams> for DiffusionMapParams
impl PartialEq<DiffusionMapParams> for DiffusionMapParams
sourcefn eq(&self, other: &DiffusionMapParams) -> bool
fn eq(&self, other: &DiffusionMapParams) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DiffusionMapParams) -> bool
fn ne(&self, other: &DiffusionMapParams) -> bool
This method tests for !=
.
impl Eq for DiffusionMapParams
impl StructuralEq for DiffusionMapParams
impl StructuralPartialEq for DiffusionMapParams
impl TransformGuard for DiffusionMapParams
Auto Trait Implementations
impl RefUnwindSafe for DiffusionMapParams
impl Send for DiffusionMapParams
impl Sync for DiffusionMapParams
impl Unpin for DiffusionMapParams
impl UnwindSafe for DiffusionMapParams
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.