pub struct MultivariateT {
pub loc: Vec<f64>,
pub shape: Vec<Vec<f64>>,
pub df: f64,
/* private fields */
}Expand description
The multivariate Student t distribution with location μ, shape Σ and ν degrees of
freedom (SciPy’s multivariate_t): X = μ + Z/√(W/ν), Z ~ N(0, Σ), W ~ χ²_ν.
Fields§
§loc: Vec<f64>§shape: Vec<Vec<f64>>§df: f64Implementations§
Source§impl MultivariateT
impl MultivariateT
pub fn new( loc: Vec<f64>, shape: Vec<Vec<f64>>, df: f64, ) -> Result<Self, ErrorsJSL>
Sourcepub fn logpdf(&self, x: &[f64]) -> f64
pub fn logpdf(&self, x: &[f64]) -> f64
log Γ((ν+d)/2) − log Γ(ν/2) − (d/2) log(νπ) − ½ log|Σ| − ((ν+d)/2) log(1 + δ²/ν).
pub fn pdf(&self, x: &[f64]) -> f64
pub fn entropy(&self) -> f64
pub fn sample<U: UniformGenerator>(&self, rng: &mut U) -> Vec<f64>
Source§impl MultivariateT
impl MultivariateT
Sourcepub fn cdf_between<U: UniformGenerator>(
&self,
lower: Option<&[f64]>,
upper: &[f64],
options: MvCdfOptions,
rng: &mut U,
) -> Result<(f64, f64), ErrorsJSL>
pub fn cdf_between<U: UniformGenerator>( &self, lower: Option<&[f64]>, upper: &[f64], options: MvCdfOptions, rng: &mut U, ) -> Result<(f64, f64), ErrorsJSL>
P(lower < X ≤ upper) (SciPy’s multivariate_t.cdf), by Genz’s method with a leading
χ variable: X = μ + Z/√(W/ν), so the probability is the normal one with limits scaled
by √(W/ν), averaged over W ~ χ²_ν through its inverse distribution function. SciPy
uses one lattice estimate of 1000 d points.
Trait Implementations§
Source§impl Clone for MultivariateT
impl Clone for MultivariateT
Auto Trait Implementations§
impl Freeze for MultivariateT
impl RefUnwindSafe for MultivariateT
impl Send for MultivariateT
impl Sync for MultivariateT
impl Unpin for MultivariateT
impl UnsafeUnpin for MultivariateT
impl UnwindSafe for MultivariateT
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