pub struct ThresholdChecker { /* private fields */ }Expand description
Checker for threshold validation.
Implementations§
Source§impl ThresholdChecker
impl ThresholdChecker
Sourcepub fn new(thresholds: EvaluationThresholds) -> Self
pub fn new(thresholds: EvaluationThresholds) -> Self
Create a new checker with the specified thresholds.
Sourcepub fn check_min(
&self,
name: &str,
actual: f64,
threshold: f64,
) -> ThresholdResult
pub fn check_min( &self, name: &str, actual: f64, threshold: f64, ) -> ThresholdResult
Check a single metric against a minimum threshold.
Sourcepub fn check_max(
&self,
name: &str,
actual: f64,
threshold: f64,
) -> ThresholdResult
pub fn check_max( &self, name: &str, actual: f64, threshold: f64, ) -> ThresholdResult
Check a single metric against a maximum threshold.
Sourcepub fn check_range(
&self,
name: &str,
actual: f64,
min: f64,
max: f64,
) -> ThresholdResult
pub fn check_range( &self, name: &str, actual: f64, min: f64, max: f64, ) -> ThresholdResult
Check a metric is within a range.
Sourcepub fn check_statistical(
&self,
benford_p: Option<f64>,
benford_mad: Option<f64>,
temporal_corr: Option<f64>,
) -> Vec<ThresholdResult>
pub fn check_statistical( &self, benford_p: Option<f64>, benford_mad: Option<f64>, temporal_corr: Option<f64>, ) -> Vec<ThresholdResult>
Check all statistical thresholds.
Sourcepub fn check_coherence(
&self,
balance_imbalance: Option<f64>,
subledger_rate: Option<f64>,
doc_chain_rate: Option<f64>,
ic_match_rate: Option<f64>,
) -> Vec<ThresholdResult>
pub fn check_coherence( &self, balance_imbalance: Option<f64>, subledger_rate: Option<f64>, doc_chain_rate: Option<f64>, ic_match_rate: Option<f64>, ) -> Vec<ThresholdResult>
Check all coherence thresholds.
Sourcepub fn check_quality(
&self,
duplicate_rate: Option<f64>,
completeness: Option<f64>,
format_consistency: Option<f64>,
) -> Vec<ThresholdResult>
pub fn check_quality( &self, duplicate_rate: Option<f64>, completeness: Option<f64>, format_consistency: Option<f64>, ) -> Vec<ThresholdResult>
Check all quality thresholds.
Sourcepub fn check_ml(
&self,
anomaly_rate: Option<f64>,
label_coverage: Option<f64>,
graph_connectivity: Option<f64>,
) -> Vec<ThresholdResult>
pub fn check_ml( &self, anomaly_rate: Option<f64>, label_coverage: Option<f64>, graph_connectivity: Option<f64>, ) -> Vec<ThresholdResult>
Check all ML thresholds.
Sourcepub fn check_all(
&self,
benford_p: Option<f64>,
benford_mad: Option<f64>,
temporal_corr: Option<f64>,
balance_imbalance: Option<f64>,
subledger_rate: Option<f64>,
doc_chain_rate: Option<f64>,
ic_match_rate: Option<f64>,
duplicate_rate: Option<f64>,
completeness: Option<f64>,
format_consistency: Option<f64>,
anomaly_rate: Option<f64>,
label_coverage: Option<f64>,
graph_connectivity: Option<f64>,
) -> Vec<ThresholdResult>
pub fn check_all( &self, benford_p: Option<f64>, benford_mad: Option<f64>, temporal_corr: Option<f64>, balance_imbalance: Option<f64>, subledger_rate: Option<f64>, doc_chain_rate: Option<f64>, ic_match_rate: Option<f64>, duplicate_rate: Option<f64>, completeness: Option<f64>, format_consistency: Option<f64>, anomaly_rate: Option<f64>, label_coverage: Option<f64>, graph_connectivity: Option<f64>, ) -> Vec<ThresholdResult>
Get all threshold results.
Sourcepub fn all_pass(results: &[ThresholdResult]) -> bool
pub fn all_pass(results: &[ThresholdResult]) -> bool
Check if all results pass.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThresholdChecker
impl RefUnwindSafe for ThresholdChecker
impl Send for ThresholdChecker
impl Sync for ThresholdChecker
impl Unpin for ThresholdChecker
impl UnwindSafe for ThresholdChecker
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.