Skip to content

Commit

Permalink
Merge pull request #32 from ReactiveBayes/inverse-gamma-tests
Browse files Browse the repository at this point in the history
test: add InverseGamma tests
  • Loading branch information
bvdmitri authored Nov 6, 2024
2 parents 4d8623a + 65caac7 commit a90c772
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions test/projection/projected_to_inverse_gamma_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@testitem "Simple projection to `InverseGamma`" begin
using BayesBase, ExponentialFamily, Distributions, JET
using ExponentialFamilyProjection

include("./projected_to_setuptests.jl")

@testset let distribution = InverseGamma(1, 0.05)
@test test_projection_convergence(distribution)
end

@testset let distribution = InverseGamma(1, 0.1)
@test test_projection_convergence(distribution)
end

@testset let distribution = InverseGamma(1, 0.5)
@test test_projection_convergence(distribution, nsamples_range=100:200:2000)
end
end

@testitem "MLE" begin
using BayesBase, ExponentialFamily, Distributions, JET
using ExponentialFamilyProjection

include("./projected_to_setuptests.jl")

@testset let distribution = InverseGamma(1, 0.1)
@test test_projection_mle(distribution)
end

@testset let distribution = InverseGamma(1, 1)
@test test_projection_mle(distribution)
end

@testset let distribution = InverseGamma(1, 10)
@test test_projection_mle(distribution)
end
end

2 comments on commit a90c772

@Nimrais
Copy link
Member

@Nimrais Nimrais commented on a90c772 Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/118806

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.2.0 -m "<description of version>" a90c772c0e99eae74f28751f3ea726f0d913ea3b
git push origin v1.2.0

Please sign in to comment.