pub struct ConsensusParams<F: BixverseFloat> {
pub target: ConsensusTarget,
pub n_neighbours: Option<usize>,
pub density_threshold: Option<F>,
pub kmeans_iters: usize,
pub kmeans_n_init: usize,
pub seed: u64,
}Expand description
Options for the consensus step.
Fields§
§target: ConsensusTargetWhich factor to cluster.
n_neighbours: Option<usize>Neighbours used by the local-density filter. None or Some(0) resolve
to LOCAL_NEIGHBOURHOOD_FRACTION * n_runs; both spellings mean “pick for
me”, so that a zero arriving from R behaves the same way.
density_threshold: Option<F>Mean cosine distance to those neighbours above which a component is
dropped. None disables filtering entirely.
kmeans_iters: usizeLloyd iterations per k-means restart.
kmeans_n_init: usizeNumber of k-means restarts; the lowest-inertia labelling wins.
seed: u64Seed for the k-means restarts.
Implementations§
Source§impl<F: BixverseFloat> ConsensusParams<F>
impl<F: BixverseFloat> ConsensusParams<F>
Sourcepub fn new(
target: ConsensusTarget,
n_neighbours: Option<usize>,
density_threshold: Option<F>,
kmeans_iters: usize,
kmeans_n_init: usize,
seed: u64,
) -> Self
pub fn new( target: ConsensusTarget, n_neighbours: Option<usize>, density_threshold: Option<F>, kmeans_iters: usize, kmeans_n_init: usize, seed: u64, ) -> Self
Generate a new instance of ConsensusParams
§Params
target- Which factor to cluster, see ConsensusTarget.n_neighbours- Neighbours for the density filter.NoneorSome(0)for the0.3 * n_runsheuristic.density_threshold- Mean cosine distance cutoff.Nonedisables the filter.kmeans_iters- Lloyd iterations per k-means restart.kmeans_n_init- Number of k-means restarts.seed- Seed for the k-means restarts.
§Returns
The initialised ConsensusParams.
Trait Implementations§
Source§impl<F: Clone + BixverseFloat> Clone for ConsensusParams<F>
impl<F: Clone + BixverseFloat> Clone for ConsensusParams<F>
impl<F: Copy + BixverseFloat> Copy for ConsensusParams<F>
Source§impl<F: Debug + BixverseFloat> Debug for ConsensusParams<F>
impl<F: Debug + BixverseFloat> Debug for ConsensusParams<F>
Source§impl<F: BixverseFloat> Default for ConsensusParams<F>
impl<F: BixverseFloat> Default for ConsensusParams<F>
Auto Trait Implementations§
impl<F> Freeze for ConsensusParams<F>
impl<F> RefUnwindSafe for ConsensusParams<F>where
Option<F>: RefUnwindSafe,
impl<F> Send for ConsensusParams<F>
impl<F> Sync for ConsensusParams<F>
impl<F> Unpin for ConsensusParams<F>
impl<F> UnsafeUnpin for ConsensusParams<F>where
Option<F>: UnsafeUnpin,
impl<F> UnwindSafe for ConsensusParams<F>where
Option<F>: 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
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.