Skip to content

Commit

Permalink
Merge pull request #330 from elfi-dev/dev
Browse files Browse the repository at this point in the history
Release v.0.7.6
  • Loading branch information
hpesonen committed Jul 29, 2020
2 parents 08f3099 + c6c6c80 commit 823d34b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

0.7.6 (2020-08-29)
------------------
- Fix incompatibility with scipy>1.5 in bo.utils.stochastic_optimization
- Minor improvements to documentation

0.7.5 (2019-12-18)
------------------
- Improved the appearance of figures produced by `plot_gp` and added the option
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Ready to contribute? Here's how to set up `ELFI` for local development.
$ make lint
$ make test

You may run `make test-notslow` instead of `make test` *as long as your proposed changes are unrelated to BOLFI*.
You may run ``make test-notslow`` instead of ``make test`` *as long as your proposed changes are unrelated to BOLFI*.

Also make sure that the docstrings of your code are formatted properly::

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**Version 0.7.5 released!** See the CHANGELOG and [notebooks](https://github.com/elfi-dev/notebooks).
**Version 0.7.6 released!** See the [CHANGELOG](CHANGELOG.rst) and [notebooks](https://github.com/elfi-dev/notebooks).

**NOTE:** For the time being NetworkX 2 is incompatible with ELFI.

Expand Down
2 changes: 1 addition & 1 deletion elfi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
__email__ = 'elfi-support@hiit.fi'

# make sure __version_ is on the last non-empty line (read by setup.py)
__version__ = '0.7.5'
__version__ = '0.7.6'
4 changes: 3 additions & 1 deletion elfi/methods/bo/acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,11 @@ def _evaluate_logpdf(theta):
return -np.inf
return np.log(val_pdf)

batch_theta = np.zeros(shape=len(gp.bounds))

# Obtaining the RandMaxVar acquisition.
for i in range(self._limit_faulty_init + 1):
if i > self._limit_faulty_init:
if i == self._limit_faulty_init:
raise SystemExit("Unable to find a suitable initial point.")

# Proposing the initial point.
Expand Down
6 changes: 5 additions & 1 deletion elfi/methods/bo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ def stochastic_optimization(fun, bounds, maxiter=1000, polish=True, seed=0):
tuple of the found coordinates of minimum and the corresponding value.
"""
def fun_1d(x):
return fun(x).ravel()

result = differential_evolution(
func=fun, bounds=bounds, maxiter=maxiter, polish=polish, init='latinhypercube', seed=seed)
func=fun_1d, bounds=bounds, maxiter=maxiter,
polish=polish, init='latinhypercube', seed=seed)
return result.x, result.fun


Expand Down
2 changes: 1 addition & 1 deletion elfi/methods/parameter_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def set_objective(self, n_samples, threshold=None, quantile=None, n_sim=None):
In between (0,1). Define the threshold as the p-quantile of all the
simulations. n_sim = n_samples/quantile.
n_sim : int
Total number of simulations. The threshold will be the n_samples smallest
Total number of simulations. The threshold will be the n_samples-th smallest
discrepancy among n_sim simulations.
"""
Expand Down

0 comments on commit 823d34b

Please sign in to comment.