pub struct RobustGraphConstruction {
pub k_neighbors: usize,
pub robust_metric: String,
pub robustness_param: f64,
pub outlier_threshold: f64,
pub construction_method: String,
pub epsilon: f64,
pub random_state: Option<u64>,
}Expand description
Robust graph construction using M-estimators and outlier detection
Fields§
§k_neighbors: usizeNumber of neighbors for k-NN graph construction
robust_metric: StringRobust distance metric: “huber”, “tukey”, “cauchy”, “welsch”
robustness_param: f64Robustness parameter for M-estimators
outlier_threshold: f64Outlier detection threshold
construction_method: StringGraph construction method: “knn”, “epsilon”, “adaptive”
epsilon: f64Epsilon parameter for epsilon-neighborhood graphs
random_state: Option<u64>Random state for reproducibility
Implementations§
Source§impl RobustGraphConstruction
impl RobustGraphConstruction
Sourcepub fn k_neighbors(self, k: usize) -> Self
pub fn k_neighbors(self, k: usize) -> Self
Set the number of neighbors
Sourcepub fn robust_metric(self, metric: String) -> Self
pub fn robust_metric(self, metric: String) -> Self
Set the robust distance metric
Sourcepub fn robustness_param(self, param: f64) -> Self
pub fn robustness_param(self, param: f64) -> Self
Set the robustness parameter
Sourcepub fn outlier_threshold(self, threshold: f64) -> Self
pub fn outlier_threshold(self, threshold: f64) -> Self
Set the outlier detection threshold
Sourcepub fn construction_method(self, method: String) -> Self
pub fn construction_method(self, method: String) -> Self
Set the graph construction method
Sourcepub fn random_state(self, seed: u64) -> Self
pub fn random_state(self, seed: u64) -> Self
Set the random state
Sourcepub fn fit(&self, X: &ArrayView2<'_, f64>) -> Result<Array2<f64>, SklearsError>
pub fn fit(&self, X: &ArrayView2<'_, f64>) -> Result<Array2<f64>, SklearsError>
Construct a robust graph from data
Trait Implementations§
Source§impl Clone for RobustGraphConstruction
impl Clone for RobustGraphConstruction
Source§fn clone(&self) -> RobustGraphConstruction
fn clone(&self) -> RobustGraphConstruction
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 moreAuto Trait Implementations§
impl Freeze for RobustGraphConstruction
impl RefUnwindSafe for RobustGraphConstruction
impl Send for RobustGraphConstruction
impl Sync for RobustGraphConstruction
impl Unpin for RobustGraphConstruction
impl UnwindSafe for RobustGraphConstruction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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