pub struct StreamingAnomalyConfig {
pub measurement: String,
pub field: Option<String>,
pub detector_type: DetectorType,
pub threshold: f64,
pub enabled: bool,
pub min_fit_points: usize,
pub max_buffer_size: usize,
pub refit_interval: usize,
}Expand description
Configuration for streaming anomaly detection on a measurement.
Fields§
§measurement: StringMeasurement to monitor.
field: Option<String>Which field to watch (default: first f64 field).
detector_type: DetectorTypeDetector type to use.
threshold: f64Anomaly threshold (meaning depends on detector type).
enabled: boolWhether streaming is enabled.
min_fit_points: usizeMinimum data points before detection starts.
max_buffer_size: usizeMaximum buffer size for training data per series (prevents unbounded growth).
refit_interval: usizeRe-fit the detector every N new observations for concept drift adaptation.
Set to 0 to disable periodic re-fit (only fit once).
Implementations§
Source§impl StreamingAnomalyConfig
impl StreamingAnomalyConfig
Sourcepub fn new(
measurement: impl Into<String>,
detector_type: DetectorType,
threshold: f64,
) -> Self
pub fn new( measurement: impl Into<String>, detector_type: DetectorType, threshold: f64, ) -> Self
Create a new config.
Sourcepub fn with_field(self, field: impl Into<String>) -> Self
pub fn with_field(self, field: impl Into<String>) -> Self
Set the field to monitor.
Sourcepub fn with_min_fit_points(self, n: usize) -> Self
pub fn with_min_fit_points(self, n: usize) -> Self
Set minimum fit points.
Sourcepub fn with_max_buffer_size(self, n: usize) -> Self
pub fn with_max_buffer_size(self, n: usize) -> Self
Set maximum buffer size per series.
Sourcepub fn with_refit_interval(self, n: usize) -> Self
pub fn with_refit_interval(self, n: usize) -> Self
Set re-fit interval (number of new observations between re-fits).
Set to 0 to disable periodic re-fit.
Trait Implementations§
Source§impl Clone for StreamingAnomalyConfig
impl Clone for StreamingAnomalyConfig
Source§fn clone(&self) -> StreamingAnomalyConfig
fn clone(&self) -> StreamingAnomalyConfig
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 moreAuto Trait Implementations§
impl Freeze for StreamingAnomalyConfig
impl RefUnwindSafe for StreamingAnomalyConfig
impl Send for StreamingAnomalyConfig
impl Sync for StreamingAnomalyConfig
impl Unpin for StreamingAnomalyConfig
impl UnsafeUnpin for StreamingAnomalyConfig
impl UnwindSafe for StreamingAnomalyConfig
Blanket Implementations§
impl<T> Allocation for T
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> 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