pub struct WeibullConfig {
pub shape: f64,
pub scale: f64,
pub min_value: f64,
pub max_value: Option<f64>,
pub round_to_integer: bool,
}Expand description
Configuration for Weibull distribution.
Fields§
§shape: f64Shape parameter (k) - controls the shape of the distribution. k < 1: decreasing failure rate (early failures more likely) k = 1: constant failure rate (exponential distribution) k > 1: increasing failure rate (wear-out failures)
scale: f64Scale parameter (lambda) - controls the characteristic life. 63.2% of values will be below this threshold.
min_value: f64Minimum value (shifts the distribution).
max_value: Option<f64>Maximum value (clamps output).
round_to_integer: boolWhether to round to integers (useful for days).
Implementations§
Source§impl WeibullConfig
impl WeibullConfig
Sourcepub fn days_to_payment() -> Self
pub fn days_to_payment() -> Self
Create a configuration for days-to-payment modeling.
Sourcepub fn early_payment() -> Self
pub fn early_payment() -> Self
Create a configuration for early payment behavior.
Sourcepub fn late_payment() -> Self
pub fn late_payment() -> Self
Create a configuration for late payment behavior.
Sourcepub fn processing_time() -> Self
pub fn processing_time() -> Self
Create a configuration for processing time.
Sourcepub fn asset_useful_life() -> Self
pub fn asset_useful_life() -> Self
Create a configuration for asset useful life (years).
Sourcepub fn expected_value(&self) -> f64
pub fn expected_value(&self) -> f64
Get the expected value (mean) of the distribution.
Source§impl WeibullConfig
impl WeibullConfig
Sourcepub fn survival_probability(&self, t: f64) -> f64
pub fn survival_probability(&self, t: f64) -> f64
Calculate survival probability at time t.
Sourcepub fn hazard_rate(&self, t: f64) -> f64
pub fn hazard_rate(&self, t: f64) -> f64
Calculate hazard rate at time t.
Sourcepub fn survival_analysis(
&self,
time_points: &[f64],
) -> Vec<WeibullSurvivalResult>
pub fn survival_analysis( &self, time_points: &[f64], ) -> Vec<WeibullSurvivalResult>
Generate survival analysis data.
Trait Implementations§
Source§impl Clone for WeibullConfig
impl Clone for WeibullConfig
Source§fn clone(&self) -> WeibullConfig
fn clone(&self) -> WeibullConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more