pub struct MultiCcaParams<T> {
pub n_components: usize,
pub n_iter: usize,
pub tol: T,
pub penalties: Option<Vec<T>>,
pub standardise: bool,
}Expand description
Tuning knobs for multi_cca.
Fields§
§n_components: usizeNumber of components to extract.
n_iter: usizeMaximum block coordinate ascent sweeps per component.
tol: TRelative change in the criterion below which a component has converged.
penalties: Option<Vec<T>>L1 bound per block. None picks sqrt(p_1) / 2 for every block, which
is what DIALOGUE uses; a bound must lie in [1, sqrt(p_k)].
standardise: boolCentre and scale every column to unit variance first, with an n - 1
denominator. PMA does this unconditionally by default.
Implementations§
Source§impl<T: BixverseFloat> MultiCcaParams<T>
impl<T: BixverseFloat> MultiCcaParams<T>
Sourcepub fn new(
n_components: usize,
n_iter: usize,
tol: T,
penalties: Option<Vec<T>>,
standardise: bool,
) -> Self
pub fn new( n_components: usize, n_iter: usize, tol: T, penalties: Option<Vec<T>>, standardise: bool, ) -> Self
Builds a parameter set.
§Params
n_components- Number of components to extractn_iter- Maximum sweeps per componenttol- Relative convergence tolerance on the criterionpenalties- Per-block L1 bounds, orNoneto derive themstandardise- Centre and scale the columns first
§Returns
The parameter set. Nothing is validated here; multi_cca checks the values against the data it is given.
Trait Implementations§
Source§impl<T: Clone> Clone for MultiCcaParams<T>
impl<T: Clone> Clone for MultiCcaParams<T>
Source§impl<T: Debug> Debug for MultiCcaParams<T>
impl<T: Debug> Debug for MultiCcaParams<T>
Source§impl<T: BixverseFloat> Default for MultiCcaParams<T>
impl<T: BixverseFloat> Default for MultiCcaParams<T>
Auto Trait Implementations§
impl<T> Freeze for MultiCcaParams<T>
impl<T> RefUnwindSafe for MultiCcaParams<T>
impl<T> Send for MultiCcaParams<T>
impl<T> Sync for MultiCcaParams<T>
impl<T> Unpin for MultiCcaParams<T>
impl<T> UnsafeUnpin for MultiCcaParams<T>
impl<T> UnwindSafe for MultiCcaParams<T>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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§fn to_subset_unchecked(&self) -> SS
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.