pub struct BetaConfig {
pub alpha: f64,
pub beta: f64,
pub lower_bound: f64,
pub upper_bound: f64,
pub decimal_places: u8,
}Expand description
Configuration for Beta distribution.
Fields§
§alpha: f64Alpha parameter (shape1) - controls skewness towards 1. Higher alpha = more mass towards 1.
beta: f64Beta parameter (shape2) - controls skewness towards 0. Higher beta = more mass towards 0.
lower_bound: f64Lower bound of the output range (default: 0.0).
upper_bound: f64Upper bound of the output range (default: 1.0).
decimal_places: u8Number of decimal places for rounding.
Implementations§
Source§impl BetaConfig
impl BetaConfig
Sourcepub fn percentage(alpha: f64, beta: f64) -> Self
pub fn percentage(alpha: f64, beta: f64) -> Self
Create a configuration scaled to a percentage range.
Sourcepub fn discount_rate() -> Self
pub fn discount_rate() -> Self
Create a configuration for discount percentages (typically 2-15%).
Sourcepub fn cash_discount() -> Self
pub fn cash_discount() -> Self
Create a configuration for cash discount rates (1-3%).
Sourcepub fn completion_rate() -> Self
pub fn completion_rate() -> Self
Create a configuration for completion rates (biased towards high).
Sourcepub fn match_rate() -> Self
pub fn match_rate() -> Self
Create a configuration for match rates (typically 85-99%).
Sourcepub fn quality_score() -> Self
pub fn quality_score() -> Self
Create a configuration for quality scores (0-100, slightly skewed high).
Sourcepub fn expected_value(&self) -> f64
pub fn expected_value(&self) -> f64
Get the expected value (mean) of the distribution.
Trait Implementations§
Source§impl Clone for BetaConfig
impl Clone for BetaConfig
Source§fn clone(&self) -> BetaConfig
fn clone(&self) -> BetaConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more