Skip to content

Commit 9f86903

Browse files
committed
Move AHMIntegration and PartitionedSampling separate packages
1 parent 5577335 commit 9f86903

37 files changed

+15
-3379
lines changed

CITATION.bib

-25
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
% primary paper on BAT.jl as a whole
21
@article{Schulz:2021BAT,
32
author = {Schulz, Oliver and Beaujean, Frederik and Caldwell, Allen and Grunwald, Cornelius and Hafych, Vasyl and Kr{\"o}ninger, Kevin and Cagnina, Salvatore La and R{\"o}hrig, Lars and Shtembari, Lolian},
43
journal = {SN Computer Science},
@@ -13,27 +12,3 @@ @article{Schulz:2021BAT
1312
doi = {10.1007/s42979-021-00626-4},
1413
url = {https://doi.org/10.1007/s42979-021-00626-4},
1514
}
16-
17-
% specific paper on the algorithm behind BAT.AHMIntegration
18-
@article{Caldwell:2020AHMI,
19-
author = {Caldwell, Allen and Eller, Philipp and Hafych, Vasyl and Schick, Rafael and Schulz, Oliver and Szalay, Marco},
20-
journal = {International Journal of Modern Physics A},
21-
title = {Integration with an adaptive harmonic mean algorithm},
22-
year = {2020},
23-
number = {24},
24-
pages = {2050142},
25-
volume = {35},
26-
doi = {10.1142/S0217751X20501420},
27-
publisher = {World Scientific},
28-
}
29-
30-
% specific paper on the algorithm behind BAT.PartitionedSampling
31-
@article{Hafych:2008.03098,
32-
author = {Hafych, Vasyl and Eller, Philipp and Caldwell, Allen and Schulz, Oliver},
33-
title = {Parallelizing MCMC Sampling via Space Partitioning},
34-
year = {2018},
35-
month = {8},
36-
archiveprefix = {arXiv},
37-
eprint = {2008.03098},
38-
primaryclass = {stat.CO},
39-
}

Project.toml

-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ AdaptiveRejectionSampling = "c75e803d-635f-53bd-ab7d-544e482d8c75"
77
AdvancedHMC = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d"
88
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
99
ArraysOfArrays = "65a8f2f4-9b39-5baf-92e2-a9cc46fdf018"
10-
CPUTime = "a9c8d775-2e2e-55fc-8582-045d282d599e"
1110
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
1211
ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0"
1312
Clustering = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5"
1413
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
15-
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
1614
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
1715
DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d"
1816
DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
@@ -45,7 +43,6 @@ Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
4543
PositiveFactorizations = "85a6dd25-e78a-55b7-8502-1745935b8125"
4644
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
4745
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
48-
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
4946
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
5047
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
5148
Random123 = "74087812-796a-5b5d-8853-05524746bad3"
@@ -69,12 +66,10 @@ AdaptiveRejectionSampling = "0.1.1"
6966
AdvancedHMC = "0.3"
7067
ArgCheck = "1, 2.0"
7168
ArraysOfArrays = "0.4, 0.5"
72-
CPUTime = "1.0"
7369
ChainRulesCore = "0.9.44, 0.10, 1"
7470
ChangesOfVariables = "0.1.1"
7571
Clustering = "0.13, 0.14"
7672
Colors = "0.9,0.10,0.11, 0.12"
77-
DataStructures = "0.17, 0.18"
7873
DensityInterface = "0.4"
7974
DiffResults = "1"
8075
Distributions = "0.21.10, 0.22, 0.23, 0.24, 0.25"
@@ -102,7 +97,6 @@ ParallelProcessingTools = "0.4"
10297
Parameters = "0.12"
10398
PositiveFactorizations = "0.2"
10499
PrettyTables = "1"
105-
ProgressMeter = "1"
106100
QuadGK = "2"
107101
Random123 = "1.2"
108102
RecipesBase = "0.7, 0.8, 1.0"

docs/src/experimental_api.md

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ EllipsoidalNestedSampling
2929
ForwardDiffAD
3030
GridSampler
3131
HierarchicalDistribution
32-
PartitionedSampling
3332
PriorImportanceSampler
3433
ReactiveNestedSampling
3534
renormalize_density

docs/src/index.md

-32
Original file line numberDiff line numberDiff line change
@@ -56,38 +56,6 @@ When using BAT.jl for research, teaching or similar, please cite
5656
}
5757
```
5858

59-
If you use [`BAT.AHMIntegration`](@ref) as an important part of your work, please also cite
60-
*Caldwell et al. "Integration with an Adaptive Harmonic Mean Algorithm", [IJMPA (2020)](http://doi.org/10.1142/S0217751X20501420).*
61-
62-
```
63-
@article{Caldwell:2020AHMI,
64-
author = {Caldwell, Allen and Eller, Philipp and Hafych, Vasyl and Schick, Rafael and Schulz, Oliver and Szalay, Marco},
65-
journal = {International Journal of Modern Physics A},
66-
title = {Integration with an adaptive harmonic mean algorithm},
67-
year = {2020},
68-
number = {24},
69-
pages = {2050142},
70-
volume = {35},
71-
doi = {10.1142/S0217751X20501420},
72-
publisher = {World Scientific},
73-
}
74-
```
75-
76-
If you use [`BAT.PartitionedSampling`](@ref) (experimental feature) as an important part of your work, please also cite
77-
*Hafych et al. "Parallelizing MCMC Sampling via Space Partitioning", [arXiv:2008.03098 (2020)](https://arxiv.org/abs/2008.03098)*.
78-
79-
```
80-
@article{Hafych:2008.03098,
81-
author = {Hafych, Vasyl and Eller, Philipp and Caldwell, Allen and Schulz, Oliver},
82-
title = {Parallelizing MCMC Sampling via Space Partitioning},
83-
year = {2018},
84-
month = {8},
85-
archiveprefix = {arXiv},
86-
eprint = {2008.03098},
87-
primaryclass = {stat.CO},
88-
}
89-
```
90-
9159

9260
## Learning (more about) Julia
9361

docs/src/internal_api.md

+1-21
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Order = [:macro, :function]
3535
BAT.AbstractProposalDist
3636
BAT.AbstractSampleGenerator
3737
BAT.BasicMvStatistics
38-
BAT.DataSet
3938
BAT.ENSAutoProposal
4039
BAT.ENSBound
4140
BAT.ENSEllipsoidBound
@@ -45,40 +44,30 @@ BAT.ENSProposal
4544
BAT.ENSRandomWalk
4645
BAT.ENSSlice
4746
BAT.ENSUniformly
48-
BAT.HMIData
49-
BAT.HMISettings
50-
BAT.IntegrationVolume
51-
BAT.KDTreePartitioning
5247
BAT.LFDensity
5348
BAT.LFDensityWithGrad
5449
BAT.MCMCSampleGenerator
5550
BAT.OnlineMvCov
5651
BAT.OnlineMvMean
5752
BAT.OnlineUvMean
5853
BAT.OnlineUvVar
59-
BAT.PointCloud
6054
BAT.RenormalizedDensity
61-
BAT.SearchResult
62-
BAT.SpacePartTree
6355
BAT.StandardMvNormal
6456
BAT.StandardMvUniform
6557
BAT.StandardUvNormal
6658
BAT.StandardUvUniform
6759
BAT.TransformedDensity
68-
BAT.WhiteningResult
60+
6961
BAT.WrappedNonBATDensity
7062
7163
BAT.argchoice_msg
7264
BAT.bat_sampler
7365
BAT.bg_R_2sqr
7466
BAT.checked_logdensityof
75-
BAT.create_hypercube
76-
BAT.create_hyperrectangle
7767
BAT.default_val_numtype
7868
BAT.default_var_numtype
7969
BAT.density_valtype
8070
BAT.drop_low_weight_samples
81-
BAT.find_hypercube_centers
8271
BAT.find_marginalmodes
8372
BAT.fromuhc
8473
BAT.fromuhc!
@@ -87,21 +76,12 @@ BAT.get_bin_centers
8776
BAT.getlikelihood
8877
BAT.getprior
8978
BAT.gr_Rsqr
90-
BAT.hm_init
91-
BAT.hm_integrate!
92-
BAT.hm_whiteningtransformation!
93-
BAT.hyperrectangle_creationproccess!
94-
BAT.integrate_hyperrectangle_cov
9579
BAT.is_log_zero
9680
BAT.issymmetric_around_origin
9781
BAT.log_volume
9882
BAT.log_zero_density
99-
BAT.modify_hypercube!
100-
BAT.modify_integrationvolume!
101-
BAT.partition_space
10283
BAT.proposal_rand!
10384
BAT.proposaldist_logpdf
104-
BAT.reduced_volume_hm
10585
BAT.repetition_to_weights
10686
BAT.spatialvolume
10787
BAT.sum_first_dim

docs/src/list_of_algorithms.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ sampling_algorithm = EllipsoidalNestedSampling()
4545
```
4646

4747
### Partitioned Sampling (experimental)
48-
BAT.jl sampling algorithm type: [`PartitionedSampling`](@ref)
48+
BAT.jl sampling algorithm type: `PartitionedSampling`, requires [PartitionedParallelSampling.jl](https://github.com/bat/PartitionedParallelSampling.jl).
4949
```julia
50-
sampling_algorithm = ReactiveNestedSampling()
50+
sampling_algorithm = PartitionedParallelSampling.PartitionedSampling()
5151
```
5252

5353

@@ -79,9 +79,9 @@ integral = bat_integrate(sampleable, integration_algorithm).result
7979
```
8080

8181
### Adaptive Harmonic Mean Integration (AHMI)]
82-
BAT.jl integration algorithm type: [`AHMIntegration`](@ref)
82+
BAT.jl integration algorithm type: `AHMI.AHMIntegration`, requires [AHMI.jl](https://github.com/bat/AHMI.jl).
8383
```julia
84-
integration_algorithm = AHMIntegration()
84+
integration_algorithm = AHMI.AHMIntegration()
8585
```
8686

8787
### Vegas Integration

docs/src/stable_api.md

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ AbstractTransformedDensity
5454
AbstractTransformToInfinite
5555
AbstractTransformToUnitspace
5656
AdaptiveMHTuning
57-
AHMIntegration
5857
AnyDensityLike
5958
AnyIIDSampleable
6059
AnySampleable

examples/benchmarks/benchmarks.jl

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using BAT, ValueShapes, IntervalSets, Distributions, Plots, EmpiricalDistributions
2+
using AHMI
23
using StatsBase, ArraysOfArrays, LinearAlgebra, LaTeXStrings, QuadGK, PrettyTables, HypothesisTests, Statistics
34
ENV["JULIA_DEBUG"] = "BAT"
45

examples/paper-example/paper_example.jl

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ using ArraysOfArrays
1010
using TypedTables
1111
using CSV
1212
import Cuba
13+
using AHMI
1314

1415

1516
function log_pdf_poisson::T, k::U) where {T<:Real,U<:Real}

src/BAT.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ using ParallelProcessingTools
3737
using Parameters
3838
using PDMats
3939
using PositiveFactorizations
40-
using ProgressMeter
4140
using RecipesBase
4241
using Requires
4342
using StaticArrays
@@ -67,12 +66,10 @@ import ZygoteRules
6766

6867
using ChainRulesCore: AbstractTangent, Tangent, NoTangent, ZeroTangent, AbstractThunk, unthunk
6968

70-
#for AHMI
71-
using DataStructures
72-
using QuadGK
73-
74-
#for Space Partitioning
75-
import CPUTime
69+
# For GaussianShell:
70+
import AdaptiveRejectionSampling
71+
import QuadGK
72+
import SpecialFunctions
7673

7774

7875
include("utils/utils.jl")
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is a part of BAT.jl, licensed under the MIT License (MIT).
22

33

4-
bat_default(::typeof(bat_integrate), ::Val{:algorithm}, ::AnySampleable) = AHMIntegration()
4+
# ToDo: bat_default(::typeof(bat_integrate), ::Val{:algorithm}, ::AnySampleable) = BridgeSampling()
55
bat_default(::typeof(bat_integrate), ::Val{:algorithm}, ::SampledDensity) = BridgeSampling()

src/distributions/gaussian_shell.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# This file is a part of BAT.jl, licensed under the MIT License (MIT).
22

3-
using SpecialFunctions
4-
using Random123
5-
import AdaptiveRejectionSampling
63

74
"""
85
struct BAT.GaussianShell <: Distribution{Multivariate,Continuous}

src/integration/ahmi/ahmi.jl

-18
This file was deleted.

0 commit comments

Comments
 (0)