IMP Reference Guide  develop.548de65454,2020/11/26 The Integrative Modeling Platform
IMP::isd::PenalizedComplexityPrior Class Reference

Penalized complexity prior. More...

#include <IMP/isd/PenalizedComplexityPrior.h>

Inheritance diagram for IMP::isd::PenalizedComplexityPrior:

## Detailed Description

Penalized complexity prior.

Given a parameter $$\xi$$ of a model (distribution) $$f(x \mid \xi)$$ with a simpler base model $$g(x)$$ ( $$f(x \mid \xi=0)$$ if $$\xi$$ is a flexibility parameter), the Penalized Complexity (PC) prior on $$\xi$$ minimizes the complexity introduced by deviation from the base model. It corresponds to an exponential distribution on the Kullback–Leibler divergence between the flexible and base models, in terms of $$\xi$$.

For ease of parameterization, a 'tail event' is defined as an upper bound on an interpretable transformation $$Q(\xi)$$ with tail density $$\alpha$$, such that $$P(Q(\xi) > U) = \alpha$$. With KL divergence defined as

$\mathrm{KLD}(f(x \mid \xi) || g(x)) = \int f(x \mid \xi) \log\left(\frac{f(x \mid \xi)}{g(x)}\right) dx,$

KL divergence at $$\xi$$ normalized by KL divergence at the tail

$D(\xi) = \frac{\mathrm{KLD}(f(x \mid \xi) || g(x))}{\mathrm{KLD}(f(x \mid \xi=Q^{-1}(U)) || g(x))} ,$

and

$J(\xi) = \frac{\partial D(\xi)}{\partial \xi} ,$

the density of the PC prior is

$p(\xi) = \frac{-\log\alpha}{2 \sqrt{D(\xi)}} \alpha^{\sqrt{D(\xi)}} |J(\xi)|.$

See Also
NormalSigmaPCRestraint
Note
For more details, see Simpson et al. Stat Sci. (2017) 32(1): 1. arXiv: 1403.4630
The log-density with this parameterization overflows when $$D(\xi)=0$$. The value of the PC prior at the base model is unique to each case and cannot be provided by this general implementation.

Definition at line 52 of file PenalizedComplexityPrior.h.

## Public Member Functions

PenalizedComplexityPrior (double Dxi, double Jxi, double alpha, std::string name="PenalizedComplexityPrior %1%")
Create from normalized KL divergence. More...

double evaluate_derivative_alpha () const
Evaluate derivative of negative log-density wrt alpha. More...

double evaluate_derivative_Dxi () const
Evaluate derivative of negative log-density wrt $$D(\xi)$$. More...

double evaluate_derivative_Jxi () const
Evaluate derivative of negative log-density wrt derivative of $$D(\xi)$$. More...

double evaluate_derivative_xi (double JJxi) const
Evaluate derivative of negative log-density wrt parameter $$\xi$$. More...

double get_alpha () const
Get density in tail. More...

double get_Dxi () const
Get normalized KL divergence $$D(\xi)$$. More...

double get_Jxi () const
Get derivative of normalized KL divergence $$D(\xi)$$ wrt $$\xi$$. More...

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_alpha (double v)
Set density in tail. More...

void set_Dxi (double v)
Set normalized KL divergence $$D(\xi)$$. More...

void set_Jxi (double v)
Set derivative of normalized KL divergence $$D(\xi)$$ wrt $$\xi$$. More...

void update_sufficient_statistics (Floats Dxis, Floats Jxis)
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 Dxis)

virtual void do_update_sufficient_statistics (Floats Dxis, Floats Jxis)

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::PenalizedComplexityPrior::PenalizedComplexityPrior ( double Dxi, double Jxi, double alpha, std::string name = "PenalizedComplexityPrior %1%" )

Create from normalized KL divergence.

Parameters
 [in] Dxi Normalized KL divergence $$D(\xi)$$. [in] Jxi Derivative $$J(\xi)$$ of normalized KL divergence. [in] alpha Density in tail. [in] name Name of prior.

## Member Function Documentation

 double IMP::isd::PenalizedComplexityPrior::evaluate_derivative_alpha ( ) const

Evaluate derivative of negative log-density wrt alpha.

 double IMP::isd::PenalizedComplexityPrior::evaluate_derivative_Dxi ( ) const

Evaluate derivative of negative log-density wrt $$D(\xi)$$.

 double IMP::isd::PenalizedComplexityPrior::evaluate_derivative_Jxi ( ) const

Evaluate derivative of negative log-density wrt derivative of $$D(\xi)$$.

 double IMP::isd::PenalizedComplexityPrior::evaluate_derivative_xi ( double JJxi ) const

Evaluate derivative of negative log-density wrt parameter $$\xi$$.

Parameters
 [in] JJxi Second derivative of normalized KL divergence wrt $$\xi$$.
 double IMP::isd::PenalizedComplexityPrior::get_alpha ( ) const

Get density in tail.

 double IMP::isd::PenalizedComplexityPrior::get_Dxi ( ) const

Get normalized KL divergence $$D(\xi)$$.

 double IMP::isd::PenalizedComplexityPrior::get_Jxi ( ) const

Get derivative of normalized KL divergence $$D(\xi)$$ wrt $$\xi$$.

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

Get information about the module and version of the object.

Reimplemented from IMP::isd::OneDimensionalSufficientDistribution.

Definition at line 106 of file PenalizedComplexityPrior.h.

 void IMP::isd::PenalizedComplexityPrior::set_alpha ( double v )

Set density in tail.

 void IMP::isd::PenalizedComplexityPrior::set_Dxi ( double v )

Set normalized KL divergence $$D(\xi)$$.

 void IMP::isd::PenalizedComplexityPrior::set_Jxi ( double v )

Set derivative of normalized KL divergence $$D(\xi)$$ wrt $$\xi$$.

 void IMP::isd::PenalizedComplexityPrior::update_sufficient_statistics ( Floats Dxis, Floats Jxis )

Update sufficient statistics with values and derivatives.

Definition at line 70 of file PenalizedComplexityPrior.h.

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