Coder Social home page Coder Social logo

chandanpanda / teaching-stan-hierarchical-modelling Goto Github PK

View Code? Open in Web Editor NEW

This project forked from widdowquinn/teaching-stan-hierarchical-modelling

0.0 1.0 0.0 5.13 MB

Jupyter notebooks for teaching hierarchical Bayesian modelling with Stan

Home Page: https://widdowquinn.github.io/Teaching-Stan-Hierarchical-Modelling/

Jupyter Notebook 30.16% Python 0.07% HTML 69.76%

teaching-stan-hierarchical-modelling's Introduction

README.md Teaching-Stan-Hierarchical-Modelling

Introduction

This set of notebooks works through an example of hierarchical (also known as multilevel) Bayesian modelling using the pystan Python module. It is derived from Chris Fonnesbeck's introduction to Bayesian multilevel modelling using Stan:

Radon Problem Description Plot of Radon by Floor and County Plot of Radon by County

Reading/Using the Notebooks

These notebooks can be read through online as webpages (follow the links below in Notebooks), or downloaded and used interactively as Jupyter notebooks, where you can explore and experiment with the models in your web browser, using Python.

# License Information

Chris Fonnesbeck's material is licensed under the following licenses:

Both licences grant permission to reproduce and prepare derivative works, and these licenses should be considered also to apply to the work in this repository.

Reporting Issues

I will have made mistakes. If you spot any, or would otherwise like to make improvements, I would be grateful if you could please take one of the following actions:

  • Raise the issue at the GitHub issues page for this repository.
  • Fork the repository, make the required changes, and then issue a pull request.
# Notebooks
  1. Introduction
  2. Data Import
  3. Bias/Variance Tradeoff
  4. A Pooled Model
  5. An Unpooled Model
  6. Pooled vs Unpooled Models
  7. Partial Pooling - An Introduction
  8. Partial Pooling - Varying Intercept
  9. Partial Pooling - Varying Slope
  10. Partial Pooling - Varying Intercept and Slope
  11. Group-level Predictors
  12. Contextual Effects
  13. Prediction

Getting Started with Interactive Notebooks

## 1. Get the notebooks

Clone the notebooks from GitHub with:

git clone [email protected]:widdowquinn/Teaching-Stan-Hierarchical-Modelling.git

Then change into the repository directory:

cd Teaching-Stan-Hierarchical-Modelling/

2. Create a virtualenv to run the notebooks

Using virtualenv we create a standalone Python virtual environment with the appropriate libraries installed. This will not interfere with system Python or any other Python instances available on your machine.

First, create the virtual environment:

virtualenv -p python3.6 venv-stan

Next, activate the virtual environment:

source venv-stan/bin/activate

Then, install the required packages:

pip install -r requirements.txt

Finally, install Jupyter:

pip install jupyter

## 3. Starting the notebooks

To start Jupyter, issue the following at the command line:

jupyter notebook

This should bring up a view on the current directory in your browser. Click on any of the .ipynb notebook files to start them running in your browser - the index.ipynb page is a good place to start.

teaching-stan-hierarchical-modelling's People

Contributors

widdowquinn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.