Prior functions
GPLinearODEMaker.bvnormal_covariance
— Methodbvnormal_covariance(σ11, σ22, ρ)
Converting 2 standard deviations and their correlation into a bivariate covariance matrix and Cholesky factorizing the result.
GPLinearODEMaker.gamma_mode_std_to_α_θ
— Methodgamma_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
GPLinearODEMaker.gauss_cdf
— Methodgauss_cdf(x)
The CDF of a Gaussian (i.e. (1 + erf(x))/2)
GPLinearODEMaker.log_Rayleigh
— Methodlog_Rayleigh(x, σ; d=0, cutoff=Inf)
Log of the Rayleigh PDF. https://en.wikipedia.org/wiki/Rayleigh_distribution
Arguments
x::Real
: Inputσ::Real
: The moded::Integer=0
: How many derivatives to takecutoff::Real=Inf
: Where to cutoff the tail of the distribution
GPLinearODEMaker.log_bvnormal
— Methodlog_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 distributiond::Vector{<:Integer}=[0,0]
: How many derivatives to takelows::Vector=zeros(T, 2) .- Inf
: The lower cutoffs of the distribution
GPLinearODEMaker.log_circle
— Methodlog_circle(xs, min_max_r; d=[0,0])
Log of the 2D circle PDF.
Arguments
xs::Real
: Inputsmin_max_r::Vector{<:Real}
: How far the inner and outer edge of the circle extends from the origind::Vector{<:Integer}=[0,0]
: How many derivatives to take
GPLinearODEMaker.log_cone
— Methodlog_cone(xs; d=[0,0])
Log of the 2D unit cone PDF.
Arguments
xs::Real
: Inputsd::Vector{<:Integer}=[0,0]
: How many derivatives to take
GPLinearODEMaker.log_cubic_cone
— Methodlog_cubic_cone(xs; d=[0,0])
Log of the 2D unit cubic cone PDF.
Arguments
xs::Real
: Inputsd::Vector{<:Integer}=[0,0]
: How many derivatives to take
GPLinearODEMaker.log_gamma
— Methodlog_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
: Inputparameters::Vector
: Either the shape and scale parameters (i.e. [α, θ]) or a mode and standard deviationd::Integer=0
: How many derivatives to takepassed_mode_std::Bool=false
: Whether to theparameters
need to be converted to shape and scale parameters
GPLinearODEMaker.log_gaussian
— Methodlog_gaussian(x, parameters; d=0, min=-Inf, max=Inf)
Log of the Gaussian PDF. Equivalent to using Distributions; logpdf(Gaussian(μ, σ), x)
Arguments
x::Real
: Inputparameters::Vector
: The mean and standard deviation parameters (i.e. [μ, σ])d::Integer=0
: How many derivatives to takemin::Real=-Inf
: Where to minimally truncate the Gaussianmax::Real=Inf
: Where to maximally truncate the Gaussian
GPLinearODEMaker.log_inverse_gamma
— Methodlog_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 parameterd::Integer=0
: How many derivatives to take
GPLinearODEMaker.log_loguniform
— Methodlog_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
: Inputmin_max::Vector
: Where to truncate the log-Uniformd::Integer=0
: How many derivatives to takeshift::Real=0
: Where to shift the peak of the distribution
GPLinearODEMaker.log_quad_cone
— Methodlog_quad_cone(xs; d=[0,0])
Log of the 2D unit quadratic cone PDF.
Arguments
xs::Real
: Inputsd::Vector{<:Integer}=[0,0]
: How many derivatives to take
GPLinearODEMaker.log_rot_Rayleigh
— Methodlog_rot_Rayleigh(xs; d=[0,0], σ=1/5, cutoff=Inf)
Log of the 2D rotated Rayleigh PDF
Arguments
xs::Real
: Inputsd::Vector{<:Integer}=[0,0]
: How many derivatives to takeσ::Real=1/5
: the radial mode of the distributioncutoff::Real=Inf
: Where to cutoff the tail of the distribution
GPLinearODEMaker.log_uniform
— Methodlog_uniform(x; d=0, min=0, max=1)
Log of the Uniform PDF.
Arguments
x::Real
: Inputmin_max::Vector=[0,1]
: Where to truncate the Uniformd::Integer=0
: How many derivatives to take