Skip to content

Commit

Permalink
clean out files and rename a method
Browse files Browse the repository at this point in the history
  • Loading branch information
yallup committed Nov 1, 2023
1 parent 4592da5 commit 791cc40
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 150 deletions.
54 changes: 0 additions & 54 deletions importance.py

This file was deleted.

10 changes: 5 additions & 5 deletions margarine/marginal_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def mask_arr(arr):
def integrate(
self,
loglikelihood,
prior,
prior_pdf,
batch_size=1000,
sample_size=10000,
logzero=-1e30,
Expand All @@ -202,9 +202,9 @@ def integrate(
loglikelihood: **function**
| A function that takes a numpy array of samples
and returns the loglikelihood of each sample.
prior: **function**
prior_pdf: **function**
| A function that takes a numpy array of samples
and returns the logprior pdf of each sample.
and returns the prior logpdf of each sample.
batch_size: **int**
| The number of samples to draw at each iteration.
sample_size: **int**
Expand Down Expand Up @@ -244,14 +244,14 @@ def integrate(
] = g[in_bounds]
pis[
sample_size - n_todo : sample_size - n_todo + n_accept
] = prior(x[in_bounds])
] = prior_pdf(x[in_bounds])
trials += batch_size
else:
n_accept = n_todo
xs[sample_size - n_todo :] = x[in_bounds][:n_accept]
fs[sample_size - n_todo :] = f[in_bounds][:n_accept]
gs[sample_size - n_todo :] = g[in_bounds][:n_accept]
pis[sample_size - n_todo :] = prior(x[in_bounds])[
pis[sample_size - n_todo :] = prior_pdf(x[in_bounds])[
:n_accept
]
last_index = in_bounds[-1]
Expand Down
63 changes: 0 additions & 63 deletions run_pypolychord.py

This file was deleted.

28 changes: 0 additions & 28 deletions train_maf.py

This file was deleted.

0 comments on commit 791cc40

Please sign in to comment.