pub struct CluStreamConfig {
pub max_micro_clusters: usize,
pub max_radius_factor: f64,
pub n_features: usize,
}Expand description
Configuration for the CluStream algorithm.
Use CluStreamConfig::builder for ergonomic construction with
validation.
Fields§
§max_micro_clusters: usizeMaximum number of micro-clusters to maintain in the online phase.
max_radius_factor: f64Maximum radius factor: a point is absorbed into a micro-cluster if
its distance to the MC center is less than
max_radius_factor * MC.radius(). Default: 2.0.
n_features: usizeNumber of features (dimensionality). Set to 0 for lazy initialization from the first sample.
Implementations§
Source§impl CluStreamConfig
impl CluStreamConfig
Sourcepub fn builder(max_micro_clusters: usize) -> CluStreamConfigBuilder
pub fn builder(max_micro_clusters: usize) -> CluStreamConfigBuilder
Create a builder with the required max_micro_clusters parameter.
§Example
use irithyll::clustering::clustream::CluStreamConfig;
let config = CluStreamConfig::builder(10)
.max_radius_factor(2.5)
.build()
.unwrap();
assert_eq!(config.max_micro_clusters, 10);Trait Implementations§
Source§impl Clone for CluStreamConfig
impl Clone for CluStreamConfig
Source§fn clone(&self) -> CluStreamConfig
fn clone(&self) -> CluStreamConfig
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 CluStreamConfig
impl RefUnwindSafe for CluStreamConfig
impl Send for CluStreamConfig
impl Sync for CluStreamConfig
impl Unpin for CluStreamConfig
impl UnsafeUnpin for CluStreamConfig
impl UnwindSafe for CluStreamConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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