pub struct WassersteinConfig {
pub num_projections: usize,
pub regularization: f64,
pub max_iterations: usize,
pub threshold: f64,
pub p: f64,
pub seed: Option<u64>,
}Expand description
Configuration for Wasserstein distance computation
Fields§
§num_projections: usizeNumber of random projections for Sliced Wasserstein
regularization: f64Regularization parameter for Sinkhorn (epsilon)
max_iterations: usizeMaximum iterations for Sinkhorn
threshold: f64Convergence threshold for Sinkhorn
p: f64Power p for Wasserstein-p distance
seed: Option<u64>Random seed for reproducibility
Implementations§
Source§impl WassersteinConfig
impl WassersteinConfig
Sourcepub fn with_projections(self, n: usize) -> Self
pub fn with_projections(self, n: usize) -> Self
Set the number of random projections
Sourcepub fn with_regularization(self, eps: f64) -> Self
pub fn with_regularization(self, eps: f64) -> Self
Set the regularization parameter
Sourcepub fn with_max_iterations(self, max_iter: usize) -> Self
pub fn with_max_iterations(self, max_iter: usize) -> Self
Set the maximum iterations
Sourcepub fn with_threshold(self, threshold: f64) -> Self
pub fn with_threshold(self, threshold: f64) -> Self
Set the convergence threshold
Sourcepub fn with_power(self, p: f64) -> Self
pub fn with_power(self, p: f64) -> Self
Set the Wasserstein power
Trait Implementations§
Source§impl Clone for WassersteinConfig
impl Clone for WassersteinConfig
Source§fn clone(&self) -> WassersteinConfig
fn clone(&self) -> WassersteinConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 WassersteinConfig
impl Debug for WassersteinConfig
Auto Trait Implementations§
impl Freeze for WassersteinConfig
impl RefUnwindSafe for WassersteinConfig
impl Send for WassersteinConfig
impl Sync for WassersteinConfig
impl Unpin for WassersteinConfig
impl UnwindSafe for WassersteinConfig
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