Prior functions

GPLinearODEMaker.bvnormal_covarianceMethod
bvnormal_covariance(σ11, σ22, ρ)

Converting 2 standard deviations and their correlation into a bivariate covariance matrix and Cholesky factorizing the result.

source
GPLinearODEMaker.gamma_mode_std_to_α_θMethod
gamma_mode_std_to_α_θ(m, σ)

Convert a gamma distribution's mode and standard deviation into it's shape and scale parameters

Arguments

  • m::Real: Desired mode of gamma distribution
  • σ::Real: Desired standard deviation of gamma distribution
source
GPLinearODEMaker.log_RayleighMethod
log_Rayleigh(x, σ; d=0, cutoff=Inf)

Log of the Rayleigh PDF. https://en.wikipedia.org/wiki/Rayleigh_distribution

Arguments

  • x::Real: Input
  • σ::Real: The mode
  • d::Integer=0: How many derivatives to take
  • cutoff::Real=Inf: Where to cutoff the tail of the distribution
source
GPLinearODEMaker.log_bvnormalMethod
log_bvnormal(xs, Σ; μ=zeros(T, 2), d=[0,0], lows=zeros(T, 2) .- Inf)

Log of the bivariate normal PDF NOTE THAT THAT WHEN USING lows!=[-∞,...], THIS IS NOT PROPERLY NORMALIZED

Arguments

  • xs::Real: Inputs
  • Σ::Colesky: The covariance matrix of the distribution
  • μ::Vector=zeros(T, 2): The mean of the distribution
  • d::Vector{<:Integer}=[0,0]: How many derivatives to take
  • lows::Vector=zeros(T, 2) .- Inf: The lower cutoffs of the distribution
source
GPLinearODEMaker.log_circleMethod
log_circle(xs, min_max_r; d=[0,0])

Log of the 2D circle PDF.

Arguments

  • xs::Real: Inputs
  • min_max_r::Vector{<:Real}: How far the inner and outer edge of the circle extends from the origin
  • d::Vector{<:Integer}=[0,0]: How many derivatives to take
source
GPLinearODEMaker.log_coneMethod
log_cone(xs; d=[0,0])

Log of the 2D unit cone PDF.

Arguments

  • xs::Real: Inputs
  • d::Vector{<:Integer}=[0,0]: How many derivatives to take
source
GPLinearODEMaker.log_cubic_coneMethod
log_cubic_cone(xs; d=[0,0])

Log of the 2D unit cubic cone PDF.

Arguments

  • xs::Real: Inputs
  • d::Vector{<:Integer}=[0,0]: How many derivatives to take
source
GPLinearODEMaker.log_gammaMethod
log_gamma(x, parameters; d=0, passed_mode_std=false)

Log of the Gamma PDF. Equivalent to using Distributions; logpdf(Gamma(α, θ), x) https://en.wikipedia.org/wiki/Gamma_distribution

Arguments

  • x::Real: Input
  • parameters::Vector: Either the shape and scale parameters (i.e. [α, θ]) or a mode and standard deviation
  • d::Integer=0: How many derivatives to take
  • passed_mode_std::Bool=false: Whether to the parameters need to be converted to shape and scale parameters
source
GPLinearODEMaker.log_gaussianMethod
log_gaussian(x, parameters; d=0, min=-Inf, max=Inf)

Log of the Gaussian PDF. Equivalent to using Distributions; logpdf(Gaussian(μ, σ), x)

Arguments

  • x::Real: Input
  • parameters::Vector: The mean and standard deviation parameters (i.e. [μ, σ])
  • d::Integer=0: How many derivatives to take
  • min::Real=-Inf: Where to minimally truncate the Gaussian
  • max::Real=Inf: Where to maximally truncate the Gaussian
source
GPLinearODEMaker.log_inverse_gammaMethod
log_inverse_gamma(x; α=1., β=1., d=0)

Log of the InverseGamma PDF. Equivalent to using Distributions; logpdf(InverseGamma(α, β), x) https://en.wikipedia.org/wiki/Inverse-gamma_distribution

Keyword Arguments

  • x::Real: Input
  • α::Real=1.: Shape parameter
  • β::Real=1.: Scale parameter
  • d::Integer=0: How many derivatives to take
source
GPLinearODEMaker.log_loguniformMethod
log_loguniform(x::Real, min_max::Vector{<:Real}; d::Integer=0, shift::Real=0)

Log of the log-Uniform PDF. Flattens out in log space starting at shift Also known as a (modified in shifted case) Jeffrey's prior

Arguments

  • x::Real: Input
  • min_max::Vector: Where to truncate the log-Uniform
  • d::Integer=0: How many derivatives to take
  • shift::Real=0: Where to shift the peak of the distribution
source
GPLinearODEMaker.log_quad_coneMethod
log_quad_cone(xs; d=[0,0])

Log of the 2D unit quadratic cone PDF.

Arguments

  • xs::Real: Inputs
  • d::Vector{<:Integer}=[0,0]: How many derivatives to take
source
GPLinearODEMaker.log_rot_RayleighMethod
log_rot_Rayleigh(xs; d=[0,0], σ=1/5, cutoff=Inf)

Log of the 2D rotated Rayleigh PDF

Arguments

  • xs::Real: Inputs
  • d::Vector{<:Integer}=[0,0]: How many derivatives to take
  • σ::Real=1/5: the radial mode of the distribution
  • cutoff::Real=Inf: Where to cutoff the tail of the distribution
source
GPLinearODEMaker.log_uniformMethod
log_uniform(x; d=0, min=0, max=1)

Log of the Uniform PDF.

Arguments

  • x::Real: Input
  • min_max::Vector=[0,1]: Where to truncate the Uniform
  • d::Integer=0: How many derivatives to take
source