IMP logo
IMP Reference Guide  develop.731656d855,2020/02/17
The Integrative Modeling Platform
IMP::isd::FStudentT Class Reference

Joint Student's t-distribution of Function. More...

#include <IMP/isd/FStudentT.h>

+ Inheritance diagram for IMP::isd::FStudentT:

Detailed Description

Joint Student's t-distribution of Function.

If a vector of values \(F(X)\) is jointly distributed according to the t distribution with shared center \(F(M)\), scale \(\sigma\), and degrees of freedom \(\nu\), then the vector \(X\) is distributed according to the F-t distribution, where \(F\) is a one-to-one (strictly monotonic) function.

For a vector \(X=\{x_1,...,x_N\}\) containing \(N\) observations, the joint F-t density is given by

\[ p(X \mid M, \sigma, \nu) = \frac{ \Gamma[(N + \nu) / 2]}{\Gamma[\nu / 2]} (\pi \nu)^{-N / 2} \sigma^{-N} J(X) \left[1 + \frac{t(X, M, \sigma)^2}{\nu} \right]^{-(N + \nu)/2}, \]

where

\[ J(X) = \left| \prod_{i=1}^N F'(x_i) \right|, \]

is a normalization factor according to the change of variables technique.

\[ t(X, M, \sigma)^2 = \frac{S_2(X) - 2 F(M) S_1(X) + N F(M)^2}{\sigma^2}, \]

and the minimally sufficient statistics are

\begin{align*} S_1(X) &= \sum_{i=1}^N F(x_i) \ S_2(X) &= \sum_{i=1}^N F(x_i)^2. \end{align*}

The degrees of freedom \(\nu\) controls the heaviness of the tails. When \(\nu = 1\), the F-t distribution becomes the F-Cauchy distribution. For very large \(\nu\), the F-t distribution approaches the F-Normal distribution. Set \(J(X)\) values to 1 for the joint t distribution.

Note
The joint t distribution is derived by marginalizing a joint normal distribution with the scaled inverse chi-square distribution as a prior on the variance. The same distribution is not produced by multiplying t distributions. For more details, see Gelmen et al. Bayesian Data Analaysis. 3rd edition.
See Also
FNormal

Definition at line 61 of file FStudentT.h.

Public Member Functions

 FStudentT (Floats FXs, Floats JXs, double FM, double sigma, double nu, std::string name="FStudentT %1%")
 Create from observations vectors. More...
 
 FStudentT (double sumFX, double sumFX2, unsigned N, double LogJX, double FM, double sigma, double nu, std::string name="FStudentT %1%")
 Create from sufficient statistics. More...
 
virtual double evaluate_derivative_FM () const
 Evaluate derivative of negative log-density wrt \(F(M)\). More...
 
virtual double evaluate_derivative_Fx (double Fx) const
 Evaluate derivative of negative log-density wrt single \(F(x_i)\). More...
 
Floats evaluate_derivative_FX (const Floats FXs) const
 Evaluate derivative of negative log-density wrt elements of \(F(X)\). More...
 
virtual double evaluate_derivative_LogJX () const
 Evaluate derivative of negative log-density wrt \(\log J(X)\). More...
 
virtual double evaluate_derivative_nu () const
 Evaluate derivative of negative log-density wrt \(\nu\). More...
 
virtual double evaluate_derivative_sigma () const
 Evaluate derivative of negative log-density wrt \(\sigma\). More...
 
double get_FM ()
 
double get_LogJX ()
 
unsigned get_N ()
 
double get_nu ()
 
double get_sigma ()
 
double get_sumFX ()
 Get sufficient statistic for passed \(J(X)\) values. More...
 
double get_sumFX2 ()
 
virtual std::string get_type_name () const
 
virtual ::IMP::VersionInfo get_version_info () const
 Get information about the module and version of the object. More...
 
void set_FM (double v)
 
void set_LogJX (double v)
 
void set_N (unsigned v)
 
void set_nu (double v)
 
void set_sigma (double v)
 
void set_sumFX (double v)
 
void set_sumFX2 (double v)
 
void update_cached_values () const
 Update cached intermediate values. More...
 
void update_sufficient_statistics (Floats FXs, Floats JXs)
 Update sufficient statistics with values and derivatives. More...
 
- Public Member Functions inherited from IMP::isd::OneDimensionalSufficientDistribution
 OneDimensionalSufficientDistribution (std::string name="OneDimensionalSufficientDistribution %1%")
 Constructor. More...
 
double evaluate () const
 Get negative log-density using cached sufficient statistics. More...
 
double get_density () const
 Get probability density using cached sufficient statistics. More...
 
Floats get_sufficient_statistics () const
 
void update_sufficient_statistics (Floats vs)
 Update cached sufficient statistics from data. More...
 
- Public Member Functions inherited from IMP::isd::Distribution
 Distribution (std::string name="Distribution %1%")
 
- Public Member Functions inherited from IMP::Object
virtual void clear_caches ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Protected Member Functions

virtual double do_evaluate () const
 
virtual Floats do_get_sufficient_statistics () const
 
virtual void do_update_sufficient_statistics (Floats FXs)
 
virtual void do_update_sufficient_statistics (Floats FXs, Floats JXs)
 
- Protected Member Functions inherited from IMP::isd::OneDimensionalSufficientDistribution
virtual double do_get_density () const
 
- Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
virtual void do_destroy ()
 

Constructor & Destructor Documentation

IMP::isd::FStudentT::FStudentT ( Floats  FXs,
Floats  JXs,
double  FM,
double  sigma,
double  nu,
std::string  name = "FStudentT %1%" 
)

Create from observations vectors.

Parameters
[in]FXsVector of N \(F(x)\) observations drawn independently from the same F-t distribution.
[in]JXsVector of N derivatives of \(F(x)\) with respect to \(X\) vector.
[in]FMCenter of F-Student t with respect to \(F(x)\).
[in]sigmaScale of F-Student t with respect to \(F(x)\).
[in]nuDegrees of freedom of Student t distribution.
[in]nameName.
IMP::isd::FStudentT::FStudentT ( double  sumFX,
double  sumFX2,
unsigned  N,
double  LogJX,
double  FM,
double  sigma,
double  nu,
std::string  name = "FStudentT %1%" 
)

Create from sufficient statistics.

Parameters
[in]sumFXSum of observations of \(F(x)\).
[in]sumFX2Sum of observations of \(F(x)^2\).
[in]NNumber of observations.
[in]LogJXLog of \(J(X)\).
[in]FMCenter of F-t with respect to \(F(x)\).
[in]sigmaScale of F-t with respect to \(F(x)\).
[in]nuDegrees of freedom of Student t distribution.
[in]nameName.

Member Function Documentation

virtual double IMP::isd::FStudentT::evaluate_derivative_FM ( ) const
virtual

Evaluate derivative of negative log-density wrt \(F(M)\).

virtual double IMP::isd::FStudentT::evaluate_derivative_Fx ( double  Fx) const
virtual

Evaluate derivative of negative log-density wrt single \(F(x_i)\).

\(F(x_i)\) represents an element of \(F(X)\). Since only the sufficient statistics are stored, this value must be provided.

Floats IMP::isd::FStudentT::evaluate_derivative_FX ( const Floats  FXs) const

Evaluate derivative of negative log-density wrt elements of \(F(X)\).

This is equivalent to though faster than running evaluate_derivative_Fx() on every element of \(F(X)\).

virtual double IMP::isd::FStudentT::evaluate_derivative_LogJX ( ) const
virtual

Evaluate derivative of negative log-density wrt \(\log J(X)\).

virtual double IMP::isd::FStudentT::evaluate_derivative_nu ( ) const
virtual

Evaluate derivative of negative log-density wrt \(\nu\).

virtual double IMP::isd::FStudentT::evaluate_derivative_sigma ( ) const
virtual

Evaluate derivative of negative log-density wrt \(\sigma\).

double IMP::isd::FStudentT::get_sumFX ( )

Get sufficient statistic for passed \(J(X)\) values.

Definition at line 141 of file FStudentT.h.

virtual ::IMP::VersionInfo IMP::isd::FStudentT::get_version_info ( ) const
virtual

Get information about the module and version of the object.

Reimplemented from IMP::isd::OneDimensionalSufficientDistribution.

Definition at line 149 of file FStudentT.h.

void IMP::isd::FStudentT::update_cached_values ( ) const

Update cached intermediate values.

This method is automatically called during evaluation. If evaluating derivatives after modifying parameters but before evaluation, this method must be manually called.

void IMP::isd::FStudentT::update_sufficient_statistics ( Floats  FXs,
Floats  JXs 
)

Update sufficient statistics with values and derivatives.

Definition at line 97 of file FStudentT.h.


The documentation for this class was generated from the following file: