Struct linfa_reduction::DiffusionMapParams
source · pub struct DiffusionMapParams(/* private fields */);
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§
source§impl 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§
source§impl Clone for DiffusionMapParams
impl Clone for DiffusionMapParams
source§fn clone(&self) -> DiffusionMapParams
fn clone(&self) -> DiffusionMapParams
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DiffusionMapParams
impl Debug for DiffusionMapParams
source§impl Default for DiffusionMapParams
impl Default for DiffusionMapParams
source§impl ParamGuard for DiffusionMapParams
impl ParamGuard for DiffusionMapParams
§type Checked = DiffusionMapValidParams
type Checked = DiffusionMapValidParams
§type Error = ReductionError
type Error = ReductionError
source§fn check_ref(&self) -> Result<&Self::Checked, Self::Error>
fn check_ref(&self) -> Result<&Self::Checked, Self::Error>
source§fn check(self) -> Result<Self::Checked, Self::Error>
fn check(self) -> Result<Self::Checked, Self::Error>
source§fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
fn check_unwrap(self) -> Self::Checkedwhere Self: Sized,
check()
and unwraps the resultsource§impl PartialEq for DiffusionMapParams
impl PartialEq for DiffusionMapParams
source§fn eq(&self, other: &DiffusionMapParams) -> bool
fn eq(&self, other: &DiffusionMapParams) -> bool
self
and other
values to be equal, and is used
by ==
.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§
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.