pub struct ParetoSchemaConfig {
pub enabled: bool,
pub alpha: f64,
pub x_min: f64,
pub max_value: Option<f64>,
pub decimal_places: u8,
}Expand description
Schema-level Pareto distribution configuration (v3.4.4+).
Thin wrapper around datasynth_core::distributions::ParetoConfig that
adds an enabled gate and serde-friendly field names.
Fields§
§enabled: boolEnable Pareto sampling. When true, replaces the amounts mixture
model for the non-fraud amount-sampling path.
alpha: f64Shape parameter (tail heaviness). Lower values → heavier tail. Typical range: 1.5-3.0. Default: 2.0.
x_min: f64Scale / minimum value. All samples are >= x_min. Typical: 1000 (for capex) to 100,000 (for large contracts). Default: 100.
max_value: Option<f64>Optional upper clamp. None = unbounded (recommended for realistic
heavy tails).
decimal_places: u8Decimal places for rounding. Default: 2.
Implementations§
Source§impl ParetoSchemaConfig
impl ParetoSchemaConfig
Sourcepub fn to_core_config(&self) -> ParetoConfig
pub fn to_core_config(&self) -> ParetoConfig
Convert this schema config into a datasynth_core::distributions::ParetoConfig.
Trait Implementations§
Source§impl Clone for ParetoSchemaConfig
impl Clone for ParetoSchemaConfig
Source§fn clone(&self) -> ParetoSchemaConfig
fn clone(&self) -> ParetoSchemaConfig
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 moreSource§impl Debug for ParetoSchemaConfig
impl Debug for ParetoSchemaConfig
Source§impl Default for ParetoSchemaConfig
impl Default for ParetoSchemaConfig
Source§impl<'de> Deserialize<'de> for ParetoSchemaConfig
impl<'de> Deserialize<'de> for ParetoSchemaConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ParetoSchemaConfig
impl RefUnwindSafe for ParetoSchemaConfig
impl Send for ParetoSchemaConfig
impl Sync for ParetoSchemaConfig
impl Unpin for ParetoSchemaConfig
impl UnsafeUnpin for ParetoSchemaConfig
impl UnwindSafe for ParetoSchemaConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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<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.