pub struct Tail { /* private fields */ }Expand description
Structure that embeds GPD parameters (GPD tail actually)
§Serialization
When the serde feature is enabled, this struct can be serialized and deserialized.
This allows saving and restoring the GPD tail model parameters.
Implementations§
Source§impl Tail
impl Tail
Sourcepub fn new(size: usize) -> SpotResult<Self>
pub fn new(size: usize) -> SpotResult<Self>
Initialize a new Tail structure with the given size
Sourcepub fn fit(&mut self) -> f64
pub fn fit(&mut self) -> f64
Fit the GPD parameters using the available estimators Returns the log-likelihood of the best fit
Sourcepub fn probability(&self, s: f64, d: f64) -> f64
pub fn probability(&self, s: f64, d: f64) -> f64
Compute the probability P(X > z) = p given the tail threshold difference d = z - t
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tail
impl<'de> Deserialize<'de> for Tail
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 Tail
impl RefUnwindSafe for Tail
impl Send for Tail
impl Sync for Tail
impl Unpin for Tail
impl UnwindSafe for Tail
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