Skip to content

Commit

Permalink
First steps toward factoring out TransformVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
cscherrer committed Sep 12, 2022
1 parent 9960e9b commit c78c166
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
TransformVariables = "84d833dd-6860-57f9-a1a7-6da5db126cff"
Tricks = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775"

[compat]
Expand Down Expand Up @@ -70,7 +69,6 @@ Static = "0.5, 0.6"
StaticArraysCore = "1"
StatsBase = "0.32, 0.33"
StatsFuns = "0.9, 1"
TransformVariables = "0.5, 0.6, 0.7"
Tricks = "0.1"
julia = "1.6"

Expand Down
17 changes: 7 additions & 10 deletions src/MeasureTheory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ using Random

using MeasureBase
using MLStyle
import TransformVariables
const TV = TransformVariables

using DistributionMeasures
using TransformVariables: asℝ₊, as𝕀, asℝ, transform
# using TransformVariables: asℝ₊, as𝕀, asℝ, transform

import Base
import Distributions
const Dists = Distributions

export TV
export transform
export
export gentype
Expand Down Expand Up @@ -120,7 +117,7 @@ xlog1py(x, y) = x * log(1 + y)
as(args...; kwargs...) = TV.as(args...; kwargs...)

include("utils.jl")
include("const.jl")
# include("const.jl")
include("combinators/for.jl")
# include("traits.jl")
include("parameterized.jl")
Expand All @@ -129,13 +126,13 @@ include("macros.jl")
include("combinators/affine.jl")
include("combinators/weighted.jl")
include("combinators/product.jl")
include("combinators/transforms.jl")
# include("combinators/transforms.jl")
include("combinators/exponential-families.jl")
include("resettable-rng.jl")
include("realized.jl")
include("combinators/chain.jl")

include("distributions.jl")
# include("distributions.jl")
include("smart-constructors.jl")

include("parameterized/normal.jl")
Expand All @@ -153,7 +150,7 @@ include("parameterized/bernoulli.jl")
include("parameterized/poisson.jl")
include("parameterized/binomial.jl")
include("parameterized/multinomial.jl")
include("parameterized/lkj-cholesky.jl")
# include("parameterized/lkj-cholesky.jl")
include("parameterized/negativebinomial.jl")
include("parameterized/betabinomial.jl")
include("parameterized/gamma.jl")
Expand All @@ -162,8 +159,8 @@ include("parameterized/inverse-gaussian.jl")

include("combinators/ifelse.jl")

include("transforms/corrcholesky.jl")
include("transforms/ordered.jl")
# include("transforms/corrcholesky.jl")
# include("transforms/ordered.jl")

include("distproxy.jl")
end # module
2 changes: 2 additions & 0 deletions src/combinators/affine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ function Pretty.tile(d::AffinePushfwd)
Pretty.list_layout([pars, Pretty.tile(d.parent)]; prefix = :AffinePushfwd)
end



@inline function testvalue(d::AffinePushfwd)
f = getfield(d, :f)
z = testvalue(parent(d))
Expand Down

0 comments on commit c78c166

Please sign in to comment.