pub struct PaCMAPConfig {
pub n_neighbors: usize,
pub mn_ratio: f32,
pub fp_ratio: f32,
pub phase_iters: [usize; 3],
pub learning_rate: f32,
pub init: Init,
pub seed: Option<u64>,
pub knn_method: KnnMethod,
pub distance_metric: DistanceMetric,
pub optimize_backend: OptimizeBackend,
}Expand description
Full configuration for a fit_transform call.
Fields§
§n_neighbors: usizeNumber of near-neighbour pairs per point. Default 10.
mn_ratio: f32Ratio nMN / n_neighbors. Default 0.5.
fp_ratio: f32Ratio nFP / n_neighbors. Default 2.0.
phase_iters: [usize; 3]Iteration counts for phases [1, 2, 3]. Sum = total iterations. Default [100, 100, 250].
learning_rate: f32Adam learning rate. Default 1.0.
init: InitEmbedding initialisation. Default Init::Pca.
seed: Option<u64>Random seed for reproducible runs.
knn_method: KnnMethodKNN method. Default HNSW when the hnsw feature is enabled.
distance_metric: DistanceMetricDistance metric. Default Euclidean.
optimize_backend: OptimizeBackendOptimize backend. Default OptimizeBackend::Cpu.
Implementations§
Source§impl PaCMAPConfig
impl PaCMAPConfig
Sourcepub fn n_mn(&self) -> usize
pub fn n_mn(&self) -> usize
Derived: number of mid-near pairs per point = floor(n_neighbors * mn_ratio).
Sourcepub fn n_fp(&self) -> usize
pub fn n_fp(&self) -> usize
Derived: number of further pairs per point = floor(n_neighbors * fp_ratio).
Sourcepub fn total_iters(&self) -> usize
pub fn total_iters(&self) -> usize
Total optimization iterations across all phases.
Trait Implementations§
Source§impl Clone for PaCMAPConfig
impl Clone for PaCMAPConfig
Source§fn clone(&self) -> PaCMAPConfig
fn clone(&self) -> PaCMAPConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PaCMAPConfig
impl Debug for PaCMAPConfig
Auto Trait Implementations§
impl Freeze for PaCMAPConfig
impl RefUnwindSafe for PaCMAPConfig
impl Send for PaCMAPConfig
impl Sync for PaCMAPConfig
impl Unpin for PaCMAPConfig
impl UnsafeUnpin for PaCMAPConfig
impl UnwindSafe for PaCMAPConfig
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 more