Let
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adapted from https://github.com/JuliaLang/juliaup/issues/96#issuecomment-1480110471 | |
# Set variables for directories and files | |
JULIA_DIR="$HOME/.julia/juliaup/julia-nightly" | |
TMP_FILE="/tmp/julia-nightly.tar.gz" | |
JULIA_NIGHTLY_URL="https://julialangnightlies-s3.julialang.org/bin/linux/x86_64/julia-latest-linux-x86_64.tar.gz" | |
# Download the nightly Julia build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Bijectors, ChangesOfVariables, LinearAlgebra | |
""" | |
QRReflectorBijector(n, k; special::Bool=false, fullR::Bool=false) | |
A bijector that maps parameters of elementary LAPACK-style reflectors to a QR factorization | |
with size `(n, k)`. | |
The `R` factor of the element has a positive real diagonal. | |
If `fullR=false`, then the `R` factor is diagonal, which reduces the number of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Distributions, Bijectors, Random, FillArrays, LogExpFunctions | |
struct DistributionWithTransform{D<:ContinuousDistribution,B,V<:VariateForm} <: Distribution{V,Continuous} | |
dist::D | |
transform::B | |
function DistributionWithTransform(d::ContinuousDistribution, b) | |
F = Distributions.variate_form(typeof(d)) | |
return new{typeof(d),typeof(b),F}(d, b) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Bijectors, ChangesOfVariables, LinearAlgebra | |
struct VecCholeskyCorrBijectorWithZeros{Z<:AbstractVector{Tuple{Int,Int}}} <: Bijectors.Bijector | |
zero_inds::Z | |
function VecCholeskyCorrBijectorWithZeros(zero_inds::Z) where Z<:AbstractVector{Tuple{Int,Int}} | |
new{Z}(unique!(sort(map(sort, zero_inds); by=reverse))) | |
end | |
end | |
function Bijectors.output_size(b::VecCholeskyCorrBijectorWithZeros, sz::Tuple{Int,Int}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Bijectors, Distributions, LinearAlgebra, PDMats | |
""" | |
DirichletMvLogitNormal(α::AbstractVector, J::AbstractMatrix; check=false) | |
A distribution that contains `MvLogitNormal` and `Dirichlet` as special cases.[^Aitchison1985] | |
Let ``x \\sim \\mathrm{DirichletMvLogitNormal}(α, J)`` be a length ``N`` probability vector, | |
where ``α`` is a length ``N`` vector, and ``J`` is a size ``(N-1,N-1)`` positive | |
semi-definite matrix. Given ``z_i = \\log(x_i)``, the density function of the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Distributions | |
using IrrationalConstants | |
using LogExpFunctions | |
using Random | |
abstract type WrappedNormalDensityMethod end | |
struct WrappedMethod <: WrappedNormalDensityMethod end | |
struct JacobiMethod <: WrappedNormalDensityMethod end | |
""" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder