KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
kjb::Abstract_dynamics Class Referenceabstract

#include <abstract_dynamics.h>

Inheritance diagram for kjb::Abstract_dynamics:
kjb::Likelihood_dynamics kjb::Discrete_change_size kjb::Focal_scale_dynamics kjb::Parapiped_camera_dynamics kjb::Parapiped_stretch_dynamics

Public Member Functions

 Abstract_dynamics (double ialpha=0.99, unsigned int ikick=0)
 
 Abstract_dynamics (kjb::Vector iparameters, kjb::Vector ideltas, double ialpha=0.99, unsigned int ikick=0)
 
 Abstract_dynamics (const Abstract_dynamics &src)
 
Abstract_dynamicsoperator= (const Abstract_dynamics &src)
 
virtual ~Abstract_dynamics ()
 
void set_num_parameters (unsigned int num_params)
 Sets the number of parameters we will be sampling over. More...
 

Protected Member Functions

void run (unsigned int iterations)
 Implements stochastic dynamics sampling on a set of parameters. This implementation follows the algorithm described in the 1993 Neal Paper, with leapfrog discretization and stochastic transitions weighted by the stochastic alpha parameter. This function MUST be kept protected so that only classes that inherit from this class can use it. Each of this derived class will have to provide its own public interface to this method. More...
 
virtual void compute_energy_gradient ()=0
 
virtual void log_sample ()
 

Protected Attributes

kjb::Vector parameters
 The parameters to sample over. More...
 
kjb::Vector deltas
 The size of the step to take in the gradient direction. This step size is different for each parameter we are sampling over. More...
 
kjb::Vector gradients
 
kjb::Vector stochastic_momenta
 
kjb::Vector momenta
 
kjb::Vector temp_momenta
 
kjb::Vector stochastic_transition
 
kjb::MV_gaussian_distributionmv_gauss
 
double alpha
 
double st_alpha
 
unsigned int kick
 

Detailed Description

dynamics sampling on a set of parameters.This implementation follows the algorithm described in the 1993 Neal Paper, with leapfrog discretization and stochastic transitions weighted by the stochastic alpha parameter.

Constructor & Destructor Documentation

kjb::Abstract_dynamics::Abstract_dynamics ( double  ialpha = 0.99,
unsigned int  ikick = 0 
)
inline
Parameters
ialphaThis parameter tweaks the contribution of the stochastic transition. If it is close to one, the random transition has little weight, and the dynamics mostly follow the momenta. The closer it gets to zero, the more the stochastic transitions will influence the selected trajectory.
ikickThis parameters is used to reset the momenta to the correct trajectory, thus eliminating the effect of the stochastic transitions. It specifies after how many transitions the momenta are to be reset. This was not fully tested
kjb::Abstract_dynamics::Abstract_dynamics ( kjb::Vector  iparameters,
kjb::Vector  ideltas,
double  ialpha = 0.99,
unsigned int  ikick = 0 
)
inline
Parameters
iparametersThe initial values of the parameters to sample over
ideltasThe size of the step to take in the gradient direction. This step size is different for each parameter we are sampling over
ialphaThis parameter tweaks the contribution of the stochastic transition. If it is close to one, the random transition has little weight, and the dynamics mostly follow the momenta. The closer it gets to zero, the more the stochastic transitions will influence the selected trajectory.
ikickthis parameters is used to reset the momenta to the correct trajectory, thus eliminating the effect of the stochastic transitions. It specifies after how many transitions the momenta are to be reset. This was not fully tested
Abstract_dynamics::Abstract_dynamics ( const Abstract_dynamics src)
Parameters
srcThe Abstract_dynamics to copy into this one
virtual kjb::Abstract_dynamics::~Abstract_dynamics ( )
inlinevirtual

Member Function Documentation

virtual void kjb::Abstract_dynamics::compute_energy_gradient ( )
protectedpure virtual

Implemented in kjb::Likelihood_dynamics.

virtual void kjb::Abstract_dynamics::log_sample ( )
inlineprotectedvirtual

Reimplemented in kjb::Likelihood_dynamics.

Abstract_dynamics & Abstract_dynamics::operator= ( const Abstract_dynamics src)
Parameters
srcThe Abstract_dynamics to assign to this one
void Abstract_dynamics::run ( unsigned int  iterations)
protected

Implements stochastic dynamics sampling on a set of parameters. This implementation follows the algorithm described in the 1993 Neal Paper, with leapfrog discretization and stochastic transitions weighted by the stochastic alpha parameter. This function MUST be kept protected so that only classes that inherit from this class can use it. Each of this derived class will have to provide its own public interface to this method.

Implements stochastic dynamics sampling on a set of parameters. This implementation follows the algorithm described in the 1993 Neal Paper, with leapfrog discretization and stochastic transitions weighted by the stochastic alpha parameter.

Parameters
iterationsThe number of iterations
void Abstract_dynamics::set_num_parameters ( unsigned int  num_params)

Sets the number of parameters we will be sampling over.

Sets the number of parameters we are sampling over and prepares the data structures needed for the computation accordingly

Parameters
num_paramsthe number of parameters

Member Data Documentation

double kjb::Abstract_dynamics::alpha
protected
kjb::Vector kjb::Abstract_dynamics::deltas
protected

The size of the step to take in the gradient direction. This step size is different for each parameter we are sampling over.

kjb::Vector kjb::Abstract_dynamics::gradients
protected
unsigned int kjb::Abstract_dynamics::kick
protected
kjb::Vector kjb::Abstract_dynamics::momenta
protected
kjb::MV_gaussian_distribution* kjb::Abstract_dynamics::mv_gauss
protected
kjb::Vector kjb::Abstract_dynamics::parameters
protected

The parameters to sample over.

double kjb::Abstract_dynamics::st_alpha
protected
kjb::Vector kjb::Abstract_dynamics::stochastic_momenta
protected
kjb::Vector kjb::Abstract_dynamics::stochastic_transition
protected
kjb::Vector kjb::Abstract_dynamics::temp_momenta
protected

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