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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WeibullConfig
impl Debug for WeibullConfig
Source§impl Default for WeibullConfig
impl Default for WeibullConfig
Source§impl<'de> Deserialize<'de> for WeibullConfig
impl<'de> Deserialize<'de> for WeibullConfig
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>,
Auto Trait Implementations§
impl Freeze for WeibullConfig
impl RefUnwindSafe for WeibullConfig
impl Send for WeibullConfig
impl Sync for WeibullConfig
impl Unpin for WeibullConfig
impl UnsafeUnpin for WeibullConfig
impl UnwindSafe for WeibullConfig
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> 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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.