pub struct AnomalyGridConfig {
pub max_order: usize,
pub smoothing_alpha: f64,
pub memory_limit: Option<usize>,
pub min_probability: f64,
pub likelihood_weight: f64,
pub information_weight: f64,
pub normalization_factor: f64,
pub min_sequence_length: usize,
}Expand description
Configuration parameters for Anomaly Grid components
Fields§
§max_order: usizeMaximum context order for Markov model
smoothing_alpha: f64Laplace smoothing parameter (alpha)
memory_limit: Option<usize>Maximum number of contexts to store (None = unlimited)
min_probability: f64Minimum probability for numerical stability
likelihood_weight: f64Weight for likelihood component in anomaly strength calculation
information_weight: f64Weight for information component in anomaly strength calculation
normalization_factor: f64Normalization factor for tanh scaling in anomaly strength
min_sequence_length: usizeMinimum sequence length for training
Implementations§
Source§impl AnomalyGridConfig
impl AnomalyGridConfig
Sourcepub fn for_small_alphabet() -> Self
pub fn for_small_alphabet() -> Self
Create a configuration optimized for small alphabets (≤ 10 states)
Sourcepub fn for_large_alphabet() -> Self
pub fn for_large_alphabet() -> Self
Create a configuration optimized for large alphabets (> 20 states)
Sourcepub fn for_low_memory() -> Self
pub fn for_low_memory() -> Self
Create a configuration optimized for memory-constrained environments
Sourcepub fn for_high_accuracy() -> Self
pub fn for_high_accuracy() -> Self
Create a configuration optimized for high accuracy
Sourcepub fn validate(&self) -> AnomalyGridResult<()>
pub fn validate(&self) -> AnomalyGridResult<()>
Validate the configuration parameters
Sourcepub fn with_max_order(self, max_order: usize) -> AnomalyGridResult<Self>
pub fn with_max_order(self, max_order: usize) -> AnomalyGridResult<Self>
Set max_order with validation
Sourcepub fn with_smoothing_alpha(self, alpha: f64) -> AnomalyGridResult<Self>
pub fn with_smoothing_alpha(self, alpha: f64) -> AnomalyGridResult<Self>
Set smoothing_alpha with validation
Sourcepub fn with_memory_limit(self, limit: Option<usize>) -> AnomalyGridResult<Self>
pub fn with_memory_limit(self, limit: Option<usize>) -> AnomalyGridResult<Self>
Set memory_limit with validation
Sourcepub fn with_weights(
self,
likelihood_weight: f64,
information_weight: f64,
) -> AnomalyGridResult<Self>
pub fn with_weights( self, likelihood_weight: f64, information_weight: f64, ) -> AnomalyGridResult<Self>
Set anomaly strength weights with validation
Sourcepub fn estimate_memory_usage(&self, alphabet_size: usize) -> usize
pub fn estimate_memory_usage(&self, alphabet_size: usize) -> usize
Get estimated memory usage for given alphabet size
Sourcepub fn is_suitable_for_alphabet(&self, alphabet_size: usize) -> bool
pub fn is_suitable_for_alphabet(&self, alphabet_size: usize) -> bool
Check if configuration is suitable for given alphabet size
Trait Implementations§
Source§impl Clone for AnomalyGridConfig
impl Clone for AnomalyGridConfig
Source§fn clone(&self) -> AnomalyGridConfig
fn clone(&self) -> AnomalyGridConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnomalyGridConfig
impl Debug for AnomalyGridConfig
Source§impl Default for AnomalyGridConfig
impl Default for AnomalyGridConfig
Source§impl PartialEq for AnomalyGridConfig
impl PartialEq for AnomalyGridConfig
impl StructuralPartialEq for AnomalyGridConfig
Auto Trait Implementations§
impl Freeze for AnomalyGridConfig
impl RefUnwindSafe for AnomalyGridConfig
impl Send for AnomalyGridConfig
impl Sync for AnomalyGridConfig
impl Unpin for AnomalyGridConfig
impl UnwindSafe for AnomalyGridConfig
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
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>
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>
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