bayhess package

Submodules

bayhess module

distributions module

class bayhess.distributions.Distribution(log_pdf, grad_log_pdf, hess_log_pdf_action, hess_log_pdf, secant_flag=False)

Bases: object

Base class of distributions. It implements the combination of distributions used to define prior and likelihood distributions.

Methods

update_curv_pairs

update_curv_pairs(sk, yk)
class bayhess.distributions.FrobeniusReg(mean, weights)

Bases: Distribution

Class of FrobeniusReg distribution for the prior of the Hessian

Methods

hess_log_pdf(hess)

grad_log_pdf

hess_log_pdf_action

log_pdf

update_curv_pairs

grad_log_pdf(hess)
hess_log_pdf(hess)
hess_log_pdf_action(hess, direc)
log_pdf(hess)
class bayhess.distributions.LogBarrier(lower, upper, penal)

Bases: Distribution

Distribution of the prior distribution of a Hessian given constraints on the eigenvalues, i.e., the probability of a Hessian goes to zero as its determinant approaches lower and upper bounds. It is supported on the space of matrices with eigenvalues between the given limits.

Methods

grad_log_pdf

hess_log_pdf

hess_log_pdf_action

log_pdf

update_curv_pairs

grad_log_pdf(hess)
hess_log_pdf(hess)
hess_log_pdf_action(hess, direc)
log_pdf(hess)
class bayhess.distributions.Secant(sk, yk, pk)

Bases: Distribution

Class of distributions of the likelihood of a Hessian given curvature pairs using the secant equations.

Methods

grad_log_pdf

hess_log_pdf

hess_log_pdf_action

log_pdf

update_curv_pairs

update_lkl_curv_pairs

variance_norm

grad_log_pdf(hess)
hess_log_pdf(hess)
hess_log_pdf_action(hess, direc)
log_pdf(hess)
update_lkl_curv_pairs(sk, yk)
variance_norm(hess)
class bayhess.distributions.SecantInverse(sk, yk, pk)

Bases: Distribution

Class of distributions of the likelihood of an inverse Hessian given curvature pairs using the secant equations.

Methods

grad_log_pdf

hess_log_pdf

hess_log_pdf_action

log_pdf

update_curv_pairs

update_lkl_curv_pairs

variance_norm

grad_log_pdf(hess_inv)
hess_log_pdf(hess)
hess_log_pdf_action(hess, direc)
log_pdf(hess_inv)
update_lkl_curv_pairs(sk, yk)
variance_norm(hess)
class bayhess.distributions.Wishart(scale, dof)

Bases: Distribution

Class of Wishart distribution for the prior of the Hessian

Methods

hess_log_pdf(hess)

grad_log_pdf

hess_log_pdf_action

log_pdf

update_curv_pairs

grad_log_pdf(hess)
hess_log_pdf(hess)
hess_log_pdf_action(hess, direc)
log_pdf(hess)
bayhess.distributions.test_derivatives(objf, grad, n_dim, n_out=1)
bayhess.distributions.test_hess(grad, hess, n_dim)
bayhess.distributions.test_hess_(hess, hess_act, n_dim)
bayhess.distributions.test_hess_act(grad, hess_act, n_dim)
bayhess.distributions.test_log_barrier()
bayhess.distributions.test_regularizer()
bayhess.distributions.test_secant()
bayhess.distributions.test_secant_inv()
bayhess.distributions.test_wishart()

newton module

cg contents