Git Product home page Git Product logo

2019-cmdstanpy-bayesian-workshop's Introduction

Welcome to Bayesian Workflows using CmdStanPy!

We will be predicting the results of Women's World Cup 2019!

Today's tutorial and dependencies will be provided in Google Colab

This requires a Google account, allowing you to save a copy of the notebook to your personal Google Drive.

Tutorial link: bit.ly/pyladiesstan3

However, if you prefer to work locally on your machine, here are steps to install CmdStanPy and tutorial requirements:

  1. Navigate to a desired directory
  2. git clone https://github.com/nyc-pyladies/2019-cmdstanpy-bayesian-workshop.git
  3. cd 2019-cmdstanpy-bayesian-workshop/
  4. python3 -m venv venv
  5. source venv/bin/activate
  6. pip install -r requirements.txt

In order to use CmdStanPy, we need to install the shell interface to Stan using CmdStan

  1. CmdStanPy provides a utility to perform this install. From within Python you can run this utility via the following
import cmdstanpy
cmdstanpy.install_cmdstan()

(This may take a few minutes to install)

Take note of the install directory, as well as the install version. You should see the following logged in the first couple of lines from installation:

Install directory: /Users/(your username)/.cmdstanpy

Downloading CmdStan version 2.20.0

  1. Set environment variable for CMDSTAN

export CMDSTAN='/Users/(your username)/.cmdstanpy/cmdstan-2.20.0'

(The path and cmdstan version should match the log output from Step 7)

  1. Run jupyter notebook
  2. Navigate to tutorial in notebooks/WWC2019.ipynb

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.