pub struct GpdParameters {
pub shape: f64,
pub scale: f64,
pub threshold: f64,
}Expand description
Parameters of the Generalized Pareto Distribution.
The GPD CDF is:
- F(x) = 1 - (1 + ξx/σ)^(-1/ξ) for ξ ≠ 0
- F(x) = 1 - exp(-x/σ) for ξ = 0 (exponential)
The shape parameter ξ (xi) determines tail behavior:
- ξ > 0: heavy-tailed (Pareto-type), infinite higher moments
- ξ = 0: exponential tails (light-tailed)
- ξ < 0: bounded support, finite endpoint at -σ/ξ
Fields§
§shape: f64Shape parameter (xi). Controls tail heaviness.
scale: f64Scale parameter (sigma). Must be positive.
threshold: f64Threshold above which GPD applies.
Implementations§
Source§impl GpdParameters
impl GpdParameters
Sourcepub fn quantile(&self, p: f64) -> f64
pub fn quantile(&self, p: f64) -> f64
Compute the quantile (inverse CDF) for probability p.
Returns the value x such that P(X <= x) = p for exceedances.
Sourcepub fn survival_probability(&self, x: f64) -> f64
pub fn survival_probability(&self, x: f64) -> f64
Compute the survival probability P(X > x) for exceedance x above threshold.
Trait Implementations§
Source§impl Clone for GpdParameters
impl Clone for GpdParameters
Source§fn clone(&self) -> GpdParameters
fn clone(&self) -> GpdParameters
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 moreimpl Copy for GpdParameters
Source§impl Debug for GpdParameters
impl Debug for GpdParameters
Source§impl PartialEq for GpdParameters
impl PartialEq for GpdParameters
Source§fn eq(&self, other: &GpdParameters) -> bool
fn eq(&self, other: &GpdParameters) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GpdParameters
Auto Trait Implementations§
impl Freeze for GpdParameters
impl RefUnwindSafe for GpdParameters
impl Send for GpdParameters
impl Sync for GpdParameters
impl Unpin for GpdParameters
impl UnsafeUnpin for GpdParameters
impl UnwindSafe for GpdParameters
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