Skip to content

Bayesian Modelling: Exploring PyMC3 for Bayesian modelling & analysis.

Notifications You must be signed in to change notification settings

plausibilities/fundamentals

Repository files navigation


Plausibilities



Fundamentals

Upcoming

  • mybinder.org
  • CodeSpaces
  • GitHub Actions
  • Docker


Analysing, modelling, forecasting, etc., amidst uncertainty.

Content



Studies

Notebooks:

  • Regression

    • A contrasts of linear regression models
      Open In Colab

    • Simple linear regression
      Open In Colab

    • Robust linear regression
      Open In Colab

  • Gaussian Processes

    • Gaussian process regression
      Open In Colab


Development Notes

Environment

The environment of the projects of Uncertainty

conda create --prefix ~/Anaconda3/envs/uncertainty

The installations are

conda install -c anaconda pymc3 # installs: python, theano, arviz, numpy, pandas
conda install -c anaconda seaborn # installs: matplotlib
conda install -c anaconda python-graphviz # installs: graphviz
conda install -c anaconda pywin32 jupyterlab nodejs # installs: requests, urllib3
pip install dotmap


# For norms & testing
conda install -c anaconda pytest coverage pylint pytest-cov

# Upgrading PyMC3
pip install --upgrade pymc3==3.9.3

Environment Updates

Update python via conda install -c anaconda python==3.8.13, numpy via conda update -c anaconda numpy, pandas via conda update -c anaconda pandas; for help visit conda commands.   In terms of pymc3 & pymcpip unistall pymc3, subsequently pip install pymc.   Update pymc via pip install --upgrade pymc.   An alternative [general] update option, within an environment, is

  conda update -c anaconda --update-all

Extra

  conda install -c anaconda colorcet
  conda install -c anaconda m2w64-toolchain_win-64

Requirements

For project fundamentals

conda activate uncertainty
pip freeze -r docs/filter.txt > requirements.txt

and

pylint --generate-rcfile > .pylintrc

Graphing

Aesthetics

  • Matplotlib Style Sheets, e.g., plt.style.use('fivethirtyeight')

  • Arviz, e.g., az.style.use('arviz-darkgrid')

  • Seaborn, e.g., sns.set_style("darkgrid"), sns.set_context("poster"), sns.set_color_codes("pastel")


Layouts

  • Constrained Layout

  • matplotlib.rcParams['figure.constrained_layout.use'] = False

  • plt.rcParams['figure.constrained_layout.use'] = False

  • plt.figure(constrained_layout=False)

  • Adjust: plt.tight_layout(pad=1.0, h_pad=1.5, w_pad=1.5, rect=(0,0,1,1))



References









About

Bayesian Modelling: Exploring PyMC3 for Bayesian modelling & analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages