From 0bf6c89541d107a8d5d2f84d677e301e66b4cc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Tue, 2 Jul 2024 14:17:02 +0300 Subject: [PATCH 01/12] make _plogpdf function 4 arguments to incorporate basemeasure --- src/exponential_family.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/exponential_family.jl b/src/exponential_family.jl index 63e18044..d423a8f9 100644 --- a/src/exponential_family.jl +++ b/src/exponential_family.jl @@ -577,7 +577,7 @@ end function _plogpdf(ef, x) @assert insupport(ef, x) lazy"Point $(x) does not belong to the support of $(ef)" - return _plogpdf(ef, x, logpartition(ef)) + return _plogpdf(ef, x, logpartition(ef), basemeasure(ef,x)) end _scalarproduct(::Type{T}, η, statistics) where {T} = _scalarproduct(variate_form(T), T, η, statistics) @@ -585,13 +585,13 @@ _scalarproduct(::Type{Univariate}, η, statistics) = dot(η, flatten_parameters( _scalarproduct(::Type{Univariate}, ::Type{T}, η, statistics) where {T} = dot(η, flatten_parameters(T, statistics)) _scalarproduct(_, ::Type{T}, η, statistics) where {T} = dot(η, pack_parameters(T, statistics)) -function _plogpdf(ef::ExponentialFamilyDistribution{T}, x, logpartition) where {T} + +function _plogpdf(ef::ExponentialFamilyDistribution{T}, x, logpartition, basemeasure) where {T} # TODO: Think of what to do with this assert @assert insupport(ef, x) lazy"Point $(x) does not belong to the support of $(ef)" η = getnaturalparameters(ef) _statistics = sufficientstatistics(ef, x) - _basemeasure = basemeasure(ef, x) - return log(_basemeasure) + _scalarproduct(T, η, _statistics) - logpartition + return log(basemeasure) + _scalarproduct(T, η, _statistics) - logpartition end """ From 3c6e4bf5947664a894f39e4fd2d95dd36db8b3de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Tue, 2 Jul 2024 14:37:40 +0300 Subject: [PATCH 02/12] adapt _vlogpdf function --- src/exponential_family.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exponential_family.jl b/src/exponential_family.jl index d423a8f9..64348c39 100644 --- a/src/exponential_family.jl +++ b/src/exponential_family.jl @@ -640,7 +640,7 @@ check_logpdf(::Type{Matrixvariate}, ::Type{<:AbstractMatrix}, ::Type{<:Number}, function _vlogpdf(ef, container) _logpartition = logpartition(ef) - return map(x -> _plogpdf(ef, x, _logpartition), container) + return map(x -> _plogpdf(ef, x, _logpartition, basemeasure(ef,x)), container) end check_logpdf(::Type{Univariate}, ::Type{<:AbstractVector}, ::Type{<:Number}, ef, container) = (MapBasedLogpdfCall(), container) From 0414bf3a1c731f9b17c0a6e7bf5432059fe1e7d0 Mon Sep 17 00:00:00 2001 From: Mykola Lukashchuk Date: Tue, 2 Jul 2024 14:30:15 +0200 Subject: [PATCH 03/12] test: add test _plogpdf return unnorm density correctly --- src/exponential_family.jl | 8 ++++---- test/distributions/distributions_setuptests.jl | 13 ++++++++++++- test/runtests.jl | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/exponential_family.jl b/src/exponential_family.jl index 64348c39..7771035f 100644 --- a/src/exponential_family.jl +++ b/src/exponential_family.jl @@ -577,7 +577,7 @@ end function _plogpdf(ef, x) @assert insupport(ef, x) lazy"Point $(x) does not belong to the support of $(ef)" - return _plogpdf(ef, x, logpartition(ef), basemeasure(ef,x)) + return _plogpdf(ef, x, logpartition(ef), log(basemeasure(ef,x))) end _scalarproduct(::Type{T}, η, statistics) where {T} = _scalarproduct(variate_form(T), T, η, statistics) @@ -586,12 +586,12 @@ _scalarproduct(::Type{Univariate}, ::Type{T}, η, statistics) where {T} = dot(η _scalarproduct(_, ::Type{T}, η, statistics) where {T} = dot(η, pack_parameters(T, statistics)) -function _plogpdf(ef::ExponentialFamilyDistribution{T}, x, logpartition, basemeasure) where {T} +function _plogpdf(ef::ExponentialFamilyDistribution{T}, x, logpartition, logbasemeasure) where {T} # TODO: Think of what to do with this assert @assert insupport(ef, x) lazy"Point $(x) does not belong to the support of $(ef)" η = getnaturalparameters(ef) _statistics = sufficientstatistics(ef, x) - return log(basemeasure) + _scalarproduct(T, η, _statistics) - logpartition + return logbasemeasure + _scalarproduct(T, η, _statistics) - logpartition end """ @@ -640,7 +640,7 @@ check_logpdf(::Type{Matrixvariate}, ::Type{<:AbstractMatrix}, ::Type{<:Number}, function _vlogpdf(ef, container) _logpartition = logpartition(ef) - return map(x -> _plogpdf(ef, x, _logpartition, basemeasure(ef,x)), container) + return map(x -> _plogpdf(ef, x, _logpartition, log(basemeasure(ef,x))), container) end check_logpdf(::Type{Univariate}, ::Type{<:AbstractVector}, ::Type{<:Number}, ef, container) = (MapBasedLogpdfCall(), container) diff --git a/test/distributions/distributions_setuptests.jl b/test/distributions/distributions_setuptests.jl index 1d010481..45afa79e 100644 --- a/test/distributions/distributions_setuptests.jl +++ b/test/distributions/distributions_setuptests.jl @@ -66,6 +66,7 @@ function test_exponentialfamily_interface(distribution; test_fisherinformation_properties = true, test_fisherinformation_against_hessian = true, test_fisherinformation_against_jacobian = true, + test_plogpdf_interface = true, option_assume_no_allocations = false ) T = ExponentialFamily.exponential_family_typetag(distribution) @@ -86,10 +87,20 @@ function test_exponentialfamily_interface(distribution; test_fisherinformation_properties && run_test_fisherinformation_properties(distribution) test_fisherinformation_against_hessian && run_test_fisherinformation_against_hessian(distribution; assume_no_allocations = option_assume_no_allocations) test_fisherinformation_against_jacobian && run_test_fisherinformation_against_jacobian(distribution; assume_no_allocations = option_assume_no_allocations) - + test_plogpdf_interface && run_test_plogpdf_interface(distribution) return ef end +function run_test_plogpdf_interface(distribution) + ef = convert(ExponentialFamily.ExponentialFamilyDistribution, distribution) + η = getnaturalparameters(ef) + samples = rand(StableRNG(42), distribution, 10) + _, _samples = ExponentialFamily.check_logpdf(variate_form(typeof(ef)), typeof(samples), eltype(samples), ef, samples) + ss_vectors = map(s -> ExponentialFamily.pack_parameters(ExponentialFamily.sufficientstatistics(ef, s)), _samples) + unnormalized_logpdfs = map(v -> dot(v, η), ss_vectors) + @test all(unnormalized_logpdfs ≈ map(x -> ExponentialFamily._plogpdf(ef, x, 0, 0), _samples)) +end + function run_test_parameters_conversion(distribution) T = ExponentialFamily.exponential_family_typetag(distribution) diff --git a/test/runtests.jl b/test/runtests.jl index 8776bbc9..bfa13a04 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,7 +2,7 @@ using Aqua, CpuId, ReTestItems, ExponentialFamily # `ambiguities = false` - there are quite some ambiguities, but these should be normal and should not be encountered under normal circumstances # `piracy = false` - we extend/add some of the methods to the objects defined in the Distributions.jl -Aqua.test_all(ExponentialFamily, ambiguities = false, deps_compat = (; check_extras = false, check_weakdeps = true), piracy = false) +Aqua.test_all(ExponentialFamily, ambiguities = false, deps_compat = (; check_extras = false, check_weakdeps = true), piracies = false) nthreads = max(cputhreads(), 1) ncores = max(cpucores(), 1) From 5783cf18478a2a613112c27e796d031baf417b74 Mon Sep 17 00:00:00 2001 From: Mykola Lukashchuk Date: Tue, 2 Jul 2024 14:36:54 +0200 Subject: [PATCH 04/12] ci(fix): different Aqua version --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index bfa13a04..8776bbc9 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,7 +2,7 @@ using Aqua, CpuId, ReTestItems, ExponentialFamily # `ambiguities = false` - there are quite some ambiguities, but these should be normal and should not be encountered under normal circumstances # `piracy = false` - we extend/add some of the methods to the objects defined in the Distributions.jl -Aqua.test_all(ExponentialFamily, ambiguities = false, deps_compat = (; check_extras = false, check_weakdeps = true), piracies = false) +Aqua.test_all(ExponentialFamily, ambiguities = false, deps_compat = (; check_extras = false, check_weakdeps = true), piracy = false) nthreads = max(cputhreads(), 1) ncores = max(cpucores(), 1) From c8ccd8ee0c6f79fae530e0c80b8b688300a677d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Thu, 4 Jul 2024 13:06:51 +0300 Subject: [PATCH 05/12] use logbasemeasure instead of log(basemeasure) --- src/exponential_family.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exponential_family.jl b/src/exponential_family.jl index 7e605b69..f635b826 100644 --- a/src/exponential_family.jl +++ b/src/exponential_family.jl @@ -620,7 +620,7 @@ end function _plogpdf(ef, x) @assert insupport(ef, x) lazy"Point $(x) does not belong to the support of $(ef)" - return _plogpdf(ef, x, logpartition(ef), log(basemeasure(ef,x))) + return _plogpdf(ef, x, logpartition(ef), logbasemeasure(ef,x)) end _scalarproduct(::Type{T}, η, statistics) where {T} = _scalarproduct(variate_form(T), T, η, statistics) @@ -683,7 +683,7 @@ check_logpdf(::Type{Matrixvariate}, ::Type{<:AbstractMatrix}, ::Type{<:Number}, function _vlogpdf(ef, container) _logpartition = logpartition(ef) - return map(x -> _plogpdf(ef, x, _logpartition, log(basemeasure(ef,x))), container) + return map(x -> _plogpdf(ef, x, _logpartition, logbasemeasure(ef,x)), container) end check_logpdf(::Type{Univariate}, ::Type{<:AbstractVector}, ::Type{<:Number}, ef, container) = (MapBasedLogpdfCall(), container) From 4bd6c704490bd77d818c94bc93416a8aff7a58e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Thu, 4 Jul 2024 13:45:41 +0300 Subject: [PATCH 06/12] fix failing exponential_family_tests and add more tests for logbasemeasure --- test/exponential_family_setuptests.jl | 6 ++++-- test/exponential_family_tests.jl | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/exponential_family_setuptests.jl b/test/exponential_family_setuptests.jl index 3955a818..ebf32e08 100644 --- a/test/exponential_family_setuptests.jl +++ b/test/exponential_family_setuptests.jl @@ -1,8 +1,8 @@ using ExponentialFamily, BayesBase, Distributions, Test, StatsFuns, BenchmarkTools, Random, FillArrays import Distributions: RealInterval, ContinuousUnivariateDistribution, Univariate -import ExponentialFamily: basemeasure, sufficientstatistics, logpartition, insupport, ConstantBaseMeasure -import ExponentialFamily: getnaturalparameters, getbasemeasure, getsufficientstatistics, getlogpartition, getsupport +import ExponentialFamily: basemeasure, logbasemeasure, sufficientstatistics, logpartition, insupport, ConstantBaseMeasure +import ExponentialFamily: getnaturalparameters, getbasemeasure, getlogbasemeasure, getsufficientstatistics, getlogpartition, getsupport import ExponentialFamily: ExponentialFamilyDistributionAttributes, NaturalParametersSpace # import ExponentialFamily: @@ -28,6 +28,7 @@ end ExponentialFamily.isproper(::NaturalParametersSpace, ::Type{ArbitraryDistributionFromExponentialFamily}, η, conditioner) = isnothing(conditioner) ExponentialFamily.isbasemeasureconstant(::Type{ArbitraryDistributionFromExponentialFamily}) = ConstantBaseMeasure() ExponentialFamily.getbasemeasure(::Type{ArbitraryDistributionFromExponentialFamily}) = (x) -> oneunit(x) +ExponentialFamily.getlogbasemeasure(::Type{ArbitraryDistributionFromExponentialFamily}) = (x) -> zero(x) ExponentialFamily.getsufficientstatistics(::Type{ArbitraryDistributionFromExponentialFamily}) = ((x) -> x, (x) -> log(x)) ExponentialFamily.getlogpartition(::NaturalParametersSpace, ::Type{ArbitraryDistributionFromExponentialFamily}) = (η) -> 1 / sum(η) @@ -52,6 +53,7 @@ end ExponentialFamily.isproper(::NaturalParametersSpace, ::Type{ArbitraryConditionedDistributionFromExponentialFamily}, η, conditioner) = isinteger(conditioner) ExponentialFamily.isbasemeasureconstant(::Type{ArbitraryConditionedDistributionFromExponentialFamily}) = NonConstantBaseMeasure() ExponentialFamily.getbasemeasure(::Type{ArbitraryConditionedDistributionFromExponentialFamily}, conditioner) = (x) -> x^conditioner +ExponentialFamily.getlogbasemeasure(::Type{ArbitraryConditionedDistributionFromExponentialFamily}, conditioner) = (x) -> conditioner*log(x) ExponentialFamily.getsufficientstatistics(::Type{ArbitraryConditionedDistributionFromExponentialFamily}, conditioner) = ((x) -> log(x - conditioner),) ExponentialFamily.getlogpartition(::NaturalParametersSpace, ::Type{ArbitraryConditionedDistributionFromExponentialFamily}, conditioner) = diff --git a/test/exponential_family_tests.jl b/test/exponential_family_tests.jl index 17c6f32c..b70f77c3 100644 --- a/test/exponential_family_tests.jl +++ b/test/exponential_family_tests.jl @@ -128,6 +128,10 @@ end @test @inferred(getbasemeasure(member)(2.0)) ≈ 1.0 @test @inferred(getbasemeasure(member)(4.0)) ≈ 1.0 + @test @inferred(logbasemeasure(member, 2.0)) ≈ log(1.0) + @test @inferred(getlogbasemeasure(member)(2.0)) ≈ log(1.0) + @test @inferred(getlogbasemeasure(member)(4.0)) ≈ log(1.0) + @test all(@inferred(sufficientstatistics(member, 2.0)) .≈ (2.0, log(2.0))) @test all(@inferred(map(f -> f(2.0), getsufficientstatistics(member))) .≈ (2.0, log(2.0))) @test all(@inferred(map(f -> f(4.0), getsufficientstatistics(member))) .≈ (4.0, log(4.0))) @@ -206,6 +210,10 @@ end @test @inferred(getbasemeasure(member)(2.0)) ≈ 2.0^-2 @test @inferred(getbasemeasure(member)(4.0)) ≈ 4.0^-2 + @test @inferred(logbasemeasure(member, 2.0)) ≈ -2*log(2.0) + @test @inferred(getlogbasemeasure(member)(2.0)) ≈ -2*log(2.0) + @test @inferred(getlogbasemeasure(member)(4.0)) ≈ -2*log(4.0) + @test all(@inferred(sufficientstatistics(member, 2.0)) .≈ (log(2.0 + 2),)) @test all(@inferred(map(f -> f(2.0), getsufficientstatistics(member))) .≈ (log(2.0 + 2),)) @test all(@inferred(map(f -> f(4.0), getsufficientstatistics(member))) .≈ (log(4.0 + 2),)) From cd1d71fe1b75ba182fba05eab1a8b44db38f6bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Thu, 4 Jul 2024 17:07:16 +0300 Subject: [PATCH 07/12] remove vector type from insupport of VMF --- src/distributions/von_mises_fisher.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/distributions/von_mises_fisher.jl b/src/distributions/von_mises_fisher.jl index c2f05445..7f4f71b7 100644 --- a/src/distributions/von_mises_fisher.jl +++ b/src/distributions/von_mises_fisher.jl @@ -37,7 +37,7 @@ end BayesBase.var(dist::VonMisesFisher) = diag(cov(dist)) BayesBase.std(dist::VonMisesFisher) = sqrt.(var(dist)) -function BayesBase.insupport(ef::ExponentialFamilyDistribution{VonMisesFisher}, x::Vector) +function BayesBase.insupport(ef::ExponentialFamilyDistribution{VonMisesFisher}, x) return length(getnaturalparameters(ef)) == length(x) && Distributions.isunitvec(x) end From e6892e3009a975c98d818ed3d936b0b1f6646f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Thu, 4 Jul 2024 18:00:16 +0300 Subject: [PATCH 08/12] remove logpdf check tests for mv_normal_wishart --- test/distributions/mv_normal_wishart_tests.jl | 3 ++- test/runtests.jl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/distributions/mv_normal_wishart_tests.jl b/test/distributions/mv_normal_wishart_tests.jl index 5fa03c57..f20a3b24 100644 --- a/test/distributions/mv_normal_wishart_tests.jl +++ b/test/distributions/mv_normal_wishart_tests.jl @@ -23,7 +23,8 @@ end test_basic_functions = false, test_fisherinformation_against_hessian = false, test_fisherinformation_against_jacobian = false, - test_gradlogpartition_properties = false + test_gradlogpartition_properties = false, + test_plogpdf_interface = false ) run_test_basic_functions(d; assume_no_allocations = false, test_samples_logpdf = false) diff --git a/test/runtests.jl b/test/runtests.jl index 8776bbc9..bfa13a04 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,7 +2,7 @@ using Aqua, CpuId, ReTestItems, ExponentialFamily # `ambiguities = false` - there are quite some ambiguities, but these should be normal and should not be encountered under normal circumstances # `piracy = false` - we extend/add some of the methods to the objects defined in the Distributions.jl -Aqua.test_all(ExponentialFamily, ambiguities = false, deps_compat = (; check_extras = false, check_weakdeps = true), piracy = false) +Aqua.test_all(ExponentialFamily, ambiguities = false, deps_compat = (; check_extras = false, check_weakdeps = true), piracies = false) nthreads = max(cputhreads(), 1) ncores = max(cpucores(), 1) From 37fc8607ff002b091edf3e12bc173fd3c497a7db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Thu, 4 Jul 2024 18:13:36 +0300 Subject: [PATCH 09/12] piracy to piracies --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index bfa13a04..db294694 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,7 @@ using Aqua, CpuId, ReTestItems, ExponentialFamily # `ambiguities = false` - there are quite some ambiguities, but these should be normal and should not be encountered under normal circumstances -# `piracy = false` - we extend/add some of the methods to the objects defined in the Distributions.jl +# `piracies = false` - we extend/add some of the methods to the objects defined in the Distributions.jl Aqua.test_all(ExponentialFamily, ambiguities = false, deps_compat = (; check_extras = false, check_weakdeps = true), piracies = false) nthreads = max(cputhreads(), 1) From e25c5e692faaef516475cbcd4360898023205d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Thu, 4 Jul 2024 18:20:57 +0300 Subject: [PATCH 10/12] bump Aqua version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 1d8d8950..9e8c19c2 100644 --- a/Project.toml +++ b/Project.toml @@ -27,7 +27,7 @@ StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c" TinyHugeNumbers = "783c9a47-75a3-44ac-a16b-f1ab7b3acf04" [compat] -Aqua = "0.7" +Aqua = "0.8.7" BayesBase = "1.2" Distributions = "0.25" DomainSets = "0.5.2, 0.6, 0.7" From 0414ed20544901b559777de202cf02f366c1193b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Fri, 5 Jul 2024 10:48:30 +0300 Subject: [PATCH 11/12] change basemeasure to use gamma function instead of factorial --- src/distributions/poisson.jl | 2 +- test/distributions/poisson_tests.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/distributions/poisson.jl b/src/distributions/poisson.jl index 34625973..af2cd398 100644 --- a/src/distributions/poisson.jl +++ b/src/distributions/poisson.jl @@ -52,7 +52,7 @@ unpack_parameters(::Type{Poisson}, packed) = (first(packed),) isbasemeasureconstant(::Type{Poisson}) = NonConstantBaseMeasure() -getbasemeasure(::Type{Poisson}) = (x) -> one(x) / factorial(x) +getbasemeasure(::Type{Poisson}) = (x) -> one(x) / gamma(x + one(x)) getlogbasemeasure(::Type{Poisson}) = (x) -> -loggamma(x + one(x)) getsufficientstatistics(::Type{Poisson}) = (identity,) diff --git a/test/distributions/poisson_tests.jl b/test/distributions/poisson_tests.jl index 78c06dc7..29b8fb6f 100644 --- a/test/distributions/poisson_tests.jl +++ b/test/distributions/poisson_tests.jl @@ -5,7 +5,7 @@ @testitem "Poisson: ExponentialFamilyDistribution" begin include("distributions_setuptests.jl") - @testset for i in 2:4 + @testset for i in 2:7 @testset let d = Poisson(2 * (i + 1)) ef = test_exponentialfamily_interface(d; option_assume_no_allocations = true) η1 = first(getnaturalparameters(ef)) @@ -40,7 +40,7 @@ end prod_dist = prod(PreserveTypeProd(ExponentialFamilyDistribution), left, right) sample_points = collect(1:5) for x in sample_points - @test basemeasure(prod_dist, x) == (1 / factorial(x)^2) + @test basemeasure(prod_dist, x) == (1 / gamma(x + one(x))^2) @test sufficientstatistics(prod_dist, x) == (x,) end sample_points = [-5, -2, 0, 2, 5] From dc65fcd1a26a8e081da96f2848db2b40ea16e980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C5=9Een=C3=B6z?= Date: Fri, 5 Jul 2024 10:58:23 +0300 Subject: [PATCH 12/12] add using SpecialFunctions --- test/distributions/distributions_setuptests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/distributions/distributions_setuptests.jl b/test/distributions/distributions_setuptests.jl index 3ee28a06..514cc099 100644 --- a/test/distributions/distributions_setuptests.jl +++ b/test/distributions/distributions_setuptests.jl @@ -1,5 +1,5 @@ using ExponentialFamily, BayesBase, FastCholesky, Distributions, LinearAlgebra, TinyHugeNumbers -using Test, ForwardDiff, Random, StatsFuns, StableRNGs, FillArrays, JET +using Test, ForwardDiff, Random, StatsFuns, StableRNGs, FillArrays, JET, SpecialFunctions import BayesBase: compute_logscale