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 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
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more