From 51a0e3cbd5c2fec4bbb819152ea7be9d4f34a457 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Mon, 16 Apr 2018 13:36:23 +0200 Subject: [PATCH 01/15] Adapted travis config. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 18e9c325..16548982 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,8 @@ install: - pip install -r requirements/backend-spark.txt script: - make test +before_deployment: +- make clean deploy: - provider: pypi user: mschoengens From 7cc659aca3b60d776a94e50e23b29b4aa3b88868 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Mon, 16 Apr 2018 13:40:26 +0200 Subject: [PATCH 02/15] Adapted travis config. --- .travis.yml | 2 -- Makefile | 2 ++ examples/extensions/models/gaussian_cpp/Makefile | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 16548982..18e9c325 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,8 +18,6 @@ install: - pip install -r requirements/backend-spark.txt script: - make test -before_deployment: -- make clean deploy: - provider: pypi user: mschoengens diff --git a/Makefile b/Makefile index c2aed790..e973beb0 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ help: clean: find . -name "*.pyc" -type f -delete + find . -name "*.pkl" -type f -delete find . -name "__pycache__" -delete find . -name ".#*" -delete find . -name "#*#" -delete @@ -72,6 +73,7 @@ reinstall: uninstall install whl_file: clean + mkdir -p build/dist python3 setup.py -v bdist_wheel -d build/dist @echo @echo "Find" `ls build/dist` "in build/dist/." diff --git a/examples/extensions/models/gaussian_cpp/Makefile b/examples/extensions/models/gaussian_cpp/Makefile index b824ac46..cfa190a9 100644 --- a/examples/extensions/models/gaussian_cpp/Makefile +++ b/examples/extensions/models/gaussian_cpp/Makefile @@ -8,6 +8,9 @@ INCLUDEPATH=/usr/include/python3.4m cpp_simple: _gaussian_model_simple.so gaussian_model_simple.py +clean: + rm gaussian_model_simple.o gaussian_model_simple.py gaussian_model_simple_wrap.cpp + %.py: %.i $(SWIG) $(SWIGFLAGS) -o $@ $< From eea401a6e57e7234f0e23bfb162068c100b4e381 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Tue, 17 Apr 2018 09:21:44 +0200 Subject: [PATCH 03/15] . --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 18e9c325..bca26455 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,9 @@ install: - pip install -r requirements/backend-spark.txt script: - make test +before_deploy: +- pip install -u pip +- echo $PYTHONPATH deploy: - provider: pypi user: mschoengens From 6087fbb6415dd9e803ba7ab48f576005d1839cb7 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Tue, 17 Apr 2018 09:37:39 +0200 Subject: [PATCH 04/15] . --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bca26455..0aaa2b7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ install: script: - make test before_deploy: -- pip install -u pip +- pip install --user pip - echo $PYTHONPATH deploy: - provider: pypi From 7de1b94ea62be6c251fe649f791b3dea7738d9dd Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Tue, 17 Apr 2018 09:46:28 +0200 Subject: [PATCH 05/15] . --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0aaa2b7f..a47d909b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ install: script: - make test before_deploy: -- pip install --user pip +- pip install pip - echo $PYTHONPATH deploy: - provider: pypi From 437db62533ebe866f2f7b394af2a9e2d7f016a24 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Tue, 17 Apr 2018 09:56:23 +0200 Subject: [PATCH 06/15] . --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a47d909b..23c61913 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,8 @@ install: script: - make test before_deploy: -- pip install pip -- echo $PYTHONPATH +- make clean +- mkdir -p build/dist deploy: - provider: pypi user: mschoengens From 682e8fde7be8b501f2adbc92cb1a8c3f328830bd Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Tue, 17 Apr 2018 10:03:04 +0200 Subject: [PATCH 07/15] . --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 23c61913..ef6e87f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ script: - make test before_deploy: - make clean -- mkdir -p build/dist +- mkdir dist deploy: - provider: pypi user: mschoengens From 72bf99a944dc6c3801d60d53cc0a6bee4f74a2ce Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Wed, 18 Apr 2018 10:13:34 +0200 Subject: [PATCH 08/15] Repaired documentation url in readme. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd38febe..a7e0db1d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ scientists by providing # Documentation For more information, check out the -* [Tutorial](http://abcpy.readthedocs.io/en/v0.5.0/README.html) +* [Documentation](http://abcpy.readthedocs.io/en/v0.5.0) * [Examples](https://github.com/eth-cscs/abcpy/tree/v0.5.0/examples) directory and * [Reference](http://abcpy.readthedocs.io/en/v0.5.0/abcpy.html) From 52c6f0b79d91c8503caa64e9fc43368961e8d6c3 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Wed, 18 Apr 2018 10:25:48 +0200 Subject: [PATCH 09/15] Repaired Sphinx conf. --- doc/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 017427c8..0e49b051 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -31,7 +31,7 @@ def __getattr__(cls, name): # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. From 006bd16f79f6a81ee847a8a7dd8bcd7cbc2aa5cc Mon Sep 17 00:00:00 2001 From: statrita Date: Tue, 12 Jun 2018 17:54:21 +0200 Subject: [PATCH 10/15] Bug fixes in graphical tools and inference --- abcpy/continuousmodels.py | 1 + abcpy/graphtools.py | 13 +++++++++---- abcpy/inferences.py | 22 ++++++++++++++-------- abcpy/statistics.py | 6 ++---- tests/graphtools_tests.py | 31 ++++++++++++++++++------------- 5 files changed, 44 insertions(+), 29 deletions(-) diff --git a/abcpy/continuousmodels.py b/abcpy/continuousmodels.py index 45926ea0..a06be373 100644 --- a/abcpy/continuousmodels.py +++ b/abcpy/continuousmodels.py @@ -114,6 +114,7 @@ def pdf(self, input_values, x): lower_bound = input_values[:self.get_output_dimension()] upper_bound = input_values[self.get_output_dimension():] + if (np.product(np.greater_equal(x, np.array(lower_bound)) * np.less_equal(x, np.array(upper_bound)))): pdf_value = 1. / np.product(np.array(upper_bound) - np.array(lower_bound)) else: diff --git a/abcpy/graphtools.py b/abcpy/graphtools.py index aecd56c6..53ec44df 100644 --- a/abcpy/graphtools.py +++ b/abcpy/graphtools.py @@ -86,6 +86,11 @@ def _reset_flags(self, models=None): model.calculated_pdf = None def pdf_of_prior(self, models, parameters, mapping=None, is_root=True): + self.set_parameters(parameters) + result = self._recursion_pdf_of_prior(models, parameters, mapping, is_root) + return result + + def _recursion_pdf_of_prior(self, models, parameters, mapping=None, is_root=True): """ Calculates the joint probability density function of the prior of the specified models at the given parameter values. Commonly used to check whether new parameters are valid given the prior, as well as to calculate acceptance probabilities. @@ -138,23 +143,23 @@ def pdf_of_prior(self, models, parameters, mapping=None, is_root=True): for parent_index, parent in enumerate(model.get_input_models()): # Only calculate the pdf if the parent has never been visited for this model if(not(visited_parents[parent_index])): - pdf = self.pdf_of_prior([parent], parameters, mapping=mapping, is_root=False) + pdf = self._recursion_pdf_of_prior([parent], parameters, mapping=mapping, is_root=False) input_models = model.get_input_models() for j in range(len(input_models)): if input_models[j][0] == parent: visited_parents[j]=True - result[i]*=pdf + result[i] *= pdf if(not(is_root)): if(model.calculated_pdf is None): result[i] *= model.pdf(model.get_input_values(),relevant_parameters) else: - result[i]*=model.calculated_pdf + result[i] *= 1 #model.calculated_pdf # Multiply the pdfs of all roots together to give an overall pdf. temporary_result = result result = 1. for individual_result in temporary_result: - result*=individual_result + result *= individual_result return result diff --git a/abcpy/inferences.py b/abcpy/inferences.py index 9e9cc993..cf7e57f6 100644 --- a/abcpy/inferences.py +++ b/abcpy/inferences.py @@ -234,7 +234,7 @@ def sample(self, observations, n_samples, n_samples_per_param, epsilon, full_out journal.add_parameters(accepted_parameters) journal.add_weights(np.ones((n_samples, 1))) - + self.accepted_parameters_manager.update_broadcast(self.backend, accepted_parameters=accepted_parameters) names_and_parameters = self._get_names_and_parameters() journal.add_user_parameters(names_and_parameters) @@ -482,7 +482,8 @@ def sample(self, observations, steps, epsilon_init, n_samples = 10000, n_samples if (full_output == 1 and aStep <= steps - 1) or (full_output == 0 and aStep == steps - 1): journal.add_parameters(accepted_parameters) journal.add_weights(accepted_weights) - + self.accepted_parameters_manager.update_broadcast(self.backend, accepted_parameters=accepted_parameters, + accepted_weights=accepted_weights) names_and_parameters = self._get_names_and_parameters() journal.add_user_parameters(names_and_parameters) @@ -830,7 +831,8 @@ def sample(self, observations, steps, n_samples = 10000, n_samples_per_param = 1 journal.add_parameters(accepted_parameters) journal.add_weights(accepted_weights) journal.add_opt_values(approx_likelihood_new_parameters) - + self.accepted_parameters_manager.update_broadcast(self.backend, accepted_parameters=accepted_parameters, + accepted_weights=accepted_weights) names_and_parameters = self._get_names_and_parameters() journal.add_user_parameters(names_and_parameters) journal.number_of_simulations.append(self.simulation_counter) @@ -1050,6 +1052,7 @@ def sample(self, observations, steps, epsilon, n_samples = 10000, n_samples_per_ samples_until = 0 for aStep in range(0, steps): + print(aStep) if(aStep==0 and journal_file is not None): accepted_parameters=journal.parameters[-1] accepted_weights=journal.weights[-1] @@ -1103,7 +1106,7 @@ def sample(self, observations, steps, epsilon, n_samples = 10000, n_samples_per_ new_parameters = np.array(new_parameters) new_distances = np.array(new_distances) new_all_distances = np.concatenate(new_all_distances) - index = index_arr + index = np.array(index) acceptance = np.array(acceptance) # Reading all_distances at Initial step @@ -1152,7 +1155,8 @@ def sample(self, observations, steps, epsilon, n_samples = 10000, n_samples_per_ if full_output == 1: journal.add_parameters(accepted_parameters) journal.add_weights(accepted_weights) - + self.accepted_parameters_manager.update_broadcast(self.backend, accepted_parameters=accepted_parameters, + accepted_weights=accepted_weights) names_and_parameters = self._get_names_and_parameters() journal.add_user_parameters(names_and_parameters) journal.number_of_simulations.append(self.simulation_counter) @@ -1191,7 +1195,7 @@ def sample(self, observations, steps, epsilon, n_samples = 10000, n_samples_per_ if full_output == 0: journal.add_parameters(accepted_parameters) journal.add_weights(accepted_weights) - + self.accepted_parameters_manager.update_broadcast(self.backend,accepted_parameters=accepted_parameters,accepted_weights=accepted_weights) names_and_parameters = self._get_names_and_parameters() journal.add_user_parameters(names_and_parameters) journal.number_of_simulations.append(self.simulation_counter) @@ -1311,7 +1315,6 @@ def _accept_parameter(self, data): distance = self.distance.distance(self.accepted_parameters_manager.observations_bds.value(), y_sim) all_distances.append(distance) acceptance = rng.binomial(1, np.exp(-distance / self.epsilon), 1) - acceptance = 1 else: ## Select one arbitrary particle: @@ -1545,6 +1548,8 @@ def sample(self, observations, steps, n_samples = 10000, n_samples_per_param = 1 journal.add_parameters(accepted_parameters) journal.add_weights(accepted_weights) journal.add_opt_values(accepted_cov_mats) + self.accepted_parameters_manager.update_broadcast(self.backend, accepted_parameters=accepted_parameters, + accepted_weights=accepted_weights) names_and_parameters = self._get_names_and_parameters() journal.add_user_parameters(names_and_parameters) journal.number_of_simulations.append(self.simulation_counter) @@ -1562,7 +1567,8 @@ def sample(self, observations, steps, n_samples = 10000, n_samples_per_param = 1 journal.add_parameters(accepted_parameters) journal.add_weights(accepted_weights) journal.add_opt_values(accepted_cov_mats) - + self.accepted_parameters_manager.update_broadcast(self.backend, accepted_parameters=accepted_parameters, + accepted_weights=accepted_weights) names_and_parameters = self._get_names_and_parameters() journal.add_user_parameters(names_and_parameters) journal.number_of_simulations.append(self.simulation_counter) diff --git a/abcpy/statistics.py b/abcpy/statistics.py index 00f6af75..a49ec07b 100644 --- a/abcpy/statistics.py +++ b/abcpy/statistics.py @@ -71,10 +71,10 @@ def _polynomial_expansion(self, summary_statistics): if not isinstance(summary_statistics, (np.ndarray)): raise TypeError('Summary statisticss is not of allowed types') # Include the polynomial expansion - result = summary_statistics + result = summary_statistics for ind in range(2,self.degree+1): result = np.column_stack((result,np.power(summary_statistics,ind))) - + # Include the cross-product term if self.cross == True and summary_statistics.shape[1]>1: # Convert to a matrix @@ -93,7 +93,6 @@ class Identity(Statistics): def __init__(self, degree = 2, cross = True): self.degree = degree self.cross = cross - def statistics(self, data): if isinstance(data, list): @@ -105,7 +104,6 @@ def statistics(self, data): data = np.concatenate(data).reshape(len(data),-1) else: raise TypeError('Input data should be of type list, but found type {}'.format(type(data))) - # Expand the data with polynomial expansion result = self._polynomial_expansion(data) diff --git a/tests/graphtools_tests.py b/tests/graphtools_tests.py index 23d92524..2f6352ff 100644 --- a/tests/graphtools_tests.py +++ b/tests/graphtools_tests.py @@ -219,6 +219,7 @@ def test(self): mapping, index = sampler._get_mapping() self.assertTrue(mapping==[(B1, 0),(N2, 1),(N1,2)]) +from abcpy.continuousmodels import Uniform class PdfOfPriorTests(unittest.TestCase): """Tests the implemetation of pdf_of_prior""" @@ -229,11 +230,11 @@ def __init__(self, parameters): def pdf(self, input_values, x): return x - self.N1 = Mockobject([1, 0.1]) - self.N2 = Mockobject([self.N1, 0.1]) - self.N3 = Mockobject([0.1, 0.01]) - self.graph1 = Mockobject([self.N2, self.N3]) - self.graph2 = Mockobject([2, self.N3]) + self.N1 = Uniform([[1.3], [1.55]], name='n1') + self.N2 = Uniform([[self.N1], [1.60]], name='n2') + self.N3 = Uniform([[2], [4]], name='n3') + self.graph1 = Uniform([[self.N1], [self.N2]], name='graph1') + self.graph2 = Uniform([[.5], [self.N3]]) self.graph = [self.graph1, self.graph2] @@ -241,21 +242,25 @@ def pdf(self, input_values, x): distance_calculator = LogReg(statistics_calculator) backend = Backend() - self.sampler = RejectionABC(self.graph, [distance_calculator, distance_calculator], backend) + self.sampler1 = RejectionABC([self.graph1], [distance_calculator], backend) + self.sampler2 = RejectionABC([self.graph2], [distance_calculator], backend) + self.sampler3 = RejectionABC(self.graph, [distance_calculator, distance_calculator], backend) - rng = np.random.RandomState(1) - - self.sampler.sample_from_prior(rng=rng) - - self.pdf = self.sampler.pdf_of_prior(self.sampler.model, [1, 2, 4]) + self.pdf1 = self.sampler1.pdf_of_prior(self.sampler1.model, [1.32088846, 1.42945274]) + self.pdf2 = self.sampler1.pdf_of_prior(self.sampler2.model, [3]) + self.pdf3 = self.sampler3.pdf_of_prior(self.sampler3.model, [1.32088846, 1.42945274, 3]) def test_return_value(self): """Tests whether the return value is float.""" - self.assertTrue(isinstance(self.pdf, float)) + self.assertTrue(isinstance(self.pdf1, float)) + self.assertTrue(isinstance(self.pdf2, float)) + self.assertTrue(isinstance(self.pdf3, float)) def test_result(self): """Test whether pdf calculation works as intended""" - self.assertTrue(self.pdf==32) + self.assertTrue(self.pdf1 == 14.331188169432183) + self.assertTrue(self.pdf2 == 0.5) + self.assertTrue(self.pdf3 == 7.1655940847160915) if __name__ == '__main__': From 08ebaa5df76d4bd8d5b20403dbd87e1f51f90f2d Mon Sep 17 00:00:00 2001 From: statrita Date: Tue, 12 Jun 2018 18:10:10 +0200 Subject: [PATCH 11/15] Bug fixes in graphical tools and inference --- tests/graphtools_tests.py | 2 +- tests/inferences_tests.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/graphtools_tests.py b/tests/graphtools_tests.py index 2f6352ff..631f04e8 100644 --- a/tests/graphtools_tests.py +++ b/tests/graphtools_tests.py @@ -247,7 +247,7 @@ def pdf(self, input_values, x): self.sampler3 = RejectionABC(self.graph, [distance_calculator, distance_calculator], backend) self.pdf1 = self.sampler1.pdf_of_prior(self.sampler1.model, [1.32088846, 1.42945274]) - self.pdf2 = self.sampler1.pdf_of_prior(self.sampler2.model, [3]) + self.pdf2 = self.sampler2.pdf_of_prior(self.sampler2.model, [3]) self.pdf3 = self.sampler3.pdf_of_prior(self.sampler3.model, [1.32088846, 1.42945274, 3]) def test_return_value(self): diff --git a/tests/inferences_tests.py b/tests/inferences_tests.py index ab401209..3516e1f8 100644 --- a/tests/inferences_tests.py +++ b/tests/inferences_tests.py @@ -91,8 +91,8 @@ def test_sample(self): self.assertEqual(mu_sample_shape, (10,1)) self.assertEqual(sigma_sample_shape, (10,1)) self.assertEqual(weights_sample_shape, (10,1)) - self.assertLess(abs(mu_post_mean - (-3.64971)), 1e-3) - self.assertLess(abs(sigma_post_mean - 4.1925), 1e-3) + self.assertLess(abs(mu_post_mean - (-3.55548377)), 1e-3) + self.assertLess(abs(sigma_post_mean - 5.87147492), 1e-3) self.assertFalse(journal.number_of_simulations == 0) @@ -111,8 +111,8 @@ def test_sample(self): self.assertEqual(mu_sample_shape, (10,1)) self.assertEqual(sigma_sample_shape, (10,1)) self.assertEqual(weights_sample_shape, (10,1)) - self.assertLess(abs(mu_post_mean - (-3.09297) ), 1e-3) - self.assertLess(abs(sigma_post_mean - 5.78645), 1e-3) + self.assertLess(abs(mu_post_mean - (-3.88512394) ), 1e-3) + self.assertLess(abs(sigma_post_mean - 2.90352432), 1e-3) self.assertFalse(journal.number_of_simulations == 0) @@ -254,8 +254,8 @@ def test_sample(self): self.assertEqual(mu_sample_shape, (10,1)) self.assertEqual(sigma_sample_shape, (10,1)) self.assertEqual(weights_sample_shape, (10,1)) - self.assertLess(mu_post_mean - 2.120856674879079, 10e-2) - self.assertLess(sigma_post_mean - 6.711723792285109, 10e-2) + self.assertLess(mu_post_mean - 0.55859197, 10e-2) + self.assertLess(sigma_post_mean - 7.03987723, 10e-2) self.assertFalse(journal.number_of_simulations == 0) @@ -314,7 +314,7 @@ def test_sample(self): self.assertEqual(sigma_sample_shape, (10,1)) self.assertEqual(weights_sample_shape, (10,1)) self.assertLess(mu_post_mean - (-0.81410299), 10e-2) - self.assertLess(sigma_post_mean - 5.51827908, 10e-2) + self.assertLess(sigma_post_mean - 9.25442675, 10e-2) self.assertFalse(journal.number_of_simulations == 0) From 887d9419371b327224932a168adaf98022bb95e8 Mon Sep 17 00:00:00 2001 From: statrita Date: Thu, 14 Jun 2018 13:33:23 +0200 Subject: [PATCH 12/15] more cleaning --- abcpy/graphtools.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/abcpy/graphtools.py b/abcpy/graphtools.py index 53ec44df..d0f706ef 100644 --- a/abcpy/graphtools.py +++ b/abcpy/graphtools.py @@ -86,6 +86,26 @@ def _reset_flags(self, models=None): model.calculated_pdf = None def pdf_of_prior(self, models, parameters, mapping=None, is_root=True): + """ + Calculates the joint probability density function of the prior of the specified models at the given parameter values. + Commonly used to check whether new parameters are valid given the prior, as well as to calculate acceptance probabilities. + + Parameters + ---------- + models: list of abcpy.ProbabilisticModel objects + Defines the models for which the pdf of their prior should be evaluated + parameters: python list + The parameters at which the pdf should be evaluated + mapping: list of tupels + Defines the mapping of probabilistic models and index in a parameter list. + is_root: boolean + A flag specifying whether the provided models are the root models. This is to ensure that the pdf is calculated correctly. + + Returns + ------- + list + The resulting pdf,as well as the next index to be considered in the parameters list. + """ self.set_parameters(parameters) result = self._recursion_pdf_of_prior(models, parameters, mapping, is_root) return result @@ -153,7 +173,7 @@ def _recursion_pdf_of_prior(self, models, parameters, mapping=None, is_root=True if(model.calculated_pdf is None): result[i] *= model.pdf(model.get_input_values(),relevant_parameters) else: - result[i] *= 1 #model.calculated_pdf + result[i] *= 1 # Multiply the pdfs of all roots together to give an overall pdf. temporary_result = result From 8f0f165d3deeebd1b7f56ea716f67bc3aa0559b9 Mon Sep 17 00:00:00 2001 From: mschoengens Date: Fri, 15 Jun 2018 10:15:14 +0200 Subject: [PATCH 13/15] New version 0.5.1 for bugfix. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8f0916f7..4b9fcbec 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0 +0.5.1 From 889af5639ff233a166be59a67f4a81dcc0705fb7 Mon Sep 17 00:00:00 2001 From: mschoengens Date: Fri, 15 Jun 2018 10:16:54 +0200 Subject: [PATCH 14/15] Updated links to match correct version. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a7e0db1d..e673006d 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ scientists by providing # Documentation For more information, check out the -* [Documentation](http://abcpy.readthedocs.io/en/v0.5.0) -* [Examples](https://github.com/eth-cscs/abcpy/tree/v0.5.0/examples) directory and -* [Reference](http://abcpy.readthedocs.io/en/v0.5.0/abcpy.html) +* [Documentation](http://abcpy.readthedocs.io/en/v0.5.1) +* [Examples](https://github.com/eth-cscs/abcpy/tree/v0.5.1/examples) directory and +* [Reference](http://abcpy.readthedocs.io/en/v0.5.1/abcpy.html) Further, we provide a [collection of models](https://github.com/eth-cscs/abcpy-models) for which ABCpy From d9fdfb4d1c2d571ed1256dc20136014698860065 Mon Sep 17 00:00:00 2001 From: statrita Date: Mon, 18 Jun 2018 12:35:14 +0200 Subject: [PATCH 15/15] Correction in installation version --- doc/source/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 83520cb5..7b65a1b5 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -34,7 +34,7 @@ To create a package and install it do :: make package - pip3 install build/dist/abcpy-0.4.0-py3-none-any.whl + pip3 install build/dist/abcpy-0.5.1-py3-none-any.whl Note that ABCpy requires Python3.