diff --git a/README.md b/README.md index 41e644f..22e1ce7 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ For instance, if you wanted to draw samples from a 10-dimensional Rosenbrock dis import pocomc as pc import numpy as np -ndim = 10 # Number of dimensions +n_dim = 10 # Number of dimensions def log_prior(x): if np.any((x < -10.0) | (x > 10.0)): # If any dimension is out of bounds, the log prior is -infinity @@ -54,11 +54,11 @@ def log_likelihood(x): + (x[:,::2] - 1.0)**2.0, axis=1) -nwalkers = 1000 +n_particles = 1000 prior_samples = np.random.uniform(size=(nwalkers, ndim), low=-10.0, high=10.0) -sampler = pc.Sampler(nwalkers, - ndim, +sampler = pc.Sampler(n_particles, + n_dim, log_likelihood, log_prior, vectorize_likelihood=True, diff --git a/docs/build/doctrees/api/plotting.doctree b/docs/build/doctrees/api/plotting.doctree index 36709a6..ccbcccb 100644 Binary files a/docs/build/doctrees/api/plotting.doctree and b/docs/build/doctrees/api/plotting.doctree differ diff --git a/docs/build/doctrees/api/sampler.doctree b/docs/build/doctrees/api/sampler.doctree index 321d2b6..636f74b 100644 Binary files a/docs/build/doctrees/api/sampler.doctree and b/docs/build/doctrees/api/sampler.doctree differ diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index 7628b4a..b4f571f 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/examples.doctree b/docs/build/doctrees/examples.doctree index 7fb4e03..7517fab 100644 Binary files a/docs/build/doctrees/examples.doctree and b/docs/build/doctrees/examples.doctree differ diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree index 10cedcd..daa22ae 100644 Binary files a/docs/build/doctrees/index.doctree and b/docs/build/doctrees/index.doctree differ diff --git a/docs/build/doctrees/pages/quickstart.doctree b/docs/build/doctrees/pages/quickstart.doctree index f5c3126..c2f7bcd 100644 Binary files a/docs/build/doctrees/pages/quickstart.doctree and b/docs/build/doctrees/pages/quickstart.doctree differ diff --git a/docs/build/html/_sources/examples.rst.txt b/docs/build/html/_sources/examples.rst.txt index f0fd7da..706415b 100644 --- a/docs/build/html/_sources/examples.rst.txt +++ b/docs/build/html/_sources/examples.rst.txt @@ -5,7 +5,8 @@ Examples This page highlights several examples on how ``pocomc`` can be used in practice, illustrating both simple and more advanced aspects of the code. Jupyter notebooks containing more details are available -`on Github `_. +`on Github `_. ``seaborn`` +is required to be installed to generate some of the plots. Gaussian Shells =============== diff --git a/docs/build/html/_sources/index.rst.txt b/docs/build/html/_sources/index.rst.txt index 86a8735..0d2bc32 100644 --- a/docs/build/html/_sources/index.rst.txt +++ b/docs/build/html/_sources/index.rst.txt @@ -85,6 +85,6 @@ Copyright 2022 Minas Karamanis and contributors. Changelog ========= -**0.0.1 (30/04/22)** +**0.1.0 (12/07/22)** - First version diff --git a/docs/build/html/_sources/pages/quickstart.ipynb.txt b/docs/build/html/_sources/pages/quickstart.ipynb.txt index 166d62a..57a6dc4 100644 --- a/docs/build/html/_sources/pages/quickstart.ipynb.txt +++ b/docs/build/html/_sources/pages/quickstart.ipynb.txt @@ -45,7 +45,7 @@ " + (x[:,::2] - 1.0)**2.0, axis=1)\n", "\n", "# Define our uniform prior.\n", - "def logprior(x):\n", + "def log_prior(x):\n", " if np.any(x < -10.0) or np.any(x > 10.0):\n", " return -np.inf\n", " else:\n", @@ -79,10 +79,10 @@ "nparticles = 1000\n", "\n", "# Initialise sampler\n", - "sampler = pc.Sampler(nparticles,\n", - " ndim,\n", - " loglikelihood=log_likelihood,\n", - " logprior=logprior,\n", + "sampler = pc.Sampler(n_particles,\n", + " n_dim,\n", + " log_likelihood=log_likelihood,\n", + " log_prior=log_prior,\n", " vectorize_likelihood=True,\n", " bounds=(-10.0, 10.0))" ] diff --git a/docs/build/html/api/plotting.html b/docs/build/html/api/plotting.html index d4e4ea8..e658dbf 100644 --- a/docs/build/html/api/plotting.html +++ b/docs/build/html/api/plotting.html @@ -340,7 +340,7 @@

PlottingParameters
  • results (dict) – Result dictionary produced using pocoMC.

  • -
  • full_run (bool) – Whether or not to include run diagnostics beyond the basic run. Default: True.

  • +
  • full_run (bool) – If True, include run diagnostics beyond the basic run. Default: True.

  • width (float) – Width of figure. Default: 10.0.

  • height (float) – Height of each subplot. Default: 10.0.

@@ -381,9 +381,7 @@

Plotting
pocomc.plotting.corner(results: dict, labels: Optional[List] = None, dims: Optional[Union[List, numpy.ndarray]] = None, color: Optional[str] = None, **corner_kwargs)#
-
-

Corner plot of the 1-D and 2-D marginal posteriors.

-
+

Corner plot of the 1-D and 2-D marginal posteriors.

Parameters