GithubHelp home page GithubHelp logo

corriebar / bayesian-workflow-with-pymc Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 9.0 104.21 MB

Repository with code, notebook and slides for my talk at PyConDE & PyData Berlin 2019

Jupyter Notebook 99.60% Python 0.38% Makefile 0.02%

bayesian-workflow-with-pymc's People

Contributors

corriebar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bayesian-workflow-with-pymc's Issues

Open data set

The talk will use proprietary data, but would be nice to have the same analysis with some immoscout data.

  • Link Immo Scout repo
  • Make Immoscout data accessible somewhere

Implement Base Models

A few different variants of base models are needed:

  • 1. intercept-only normal-model
  • 2. intercept-only t-student model
  • 3. linear model (with predictor living_space) using normal likelihood
  • 4. linear model (with predictor living_space) using t-student likelihood

Either 2. or 4. can possibly be omitted.

Increase Reproducibility

Ideally, all code and notebooks should be reproducible:

  • Docker
  • Pipenv or other Python package management
  • Make file
  • Documentation, how to setup everything

Preferably, most stuff should work pretty much the same with both data sets.

convergency checks

Needed convergency checks:

  • trace plot
  • at least one negative example for trace plots
  • Rhat
  • # effective sample size
  • divergency checks (any divergencies?)

Cherry:

  • simple reporting function similar to shinystan

Visualizations of the model

Need some visualizations of the resulting hierarchical model

Similar as in the R talk, get ~4 example ZIP codes for which to visualize the model

  • "spaghetti" plot
  • full uncertainty plot
  • research the ZIP code of the conference

Further, we need some visualizations for a single prediction:

  • Histogram of the predicted log_sqm_price
  • Histogram of the transformed prediction, that is the full price
  • Mark probability that price < x€ in histogram (or waffle chart or quantile dot plot)

Shapefile plots

Visualization of the

  • intercept per ZIP for whole Berlin
  • probability of getting a house <x€ in ZIP code (this might easily be misinterpreted though)
  • research how to visualize uncertainty in maps

For this, need to find a good way of plotting the shapefiles.
Probably geopandas.

prior predictive checks

Need an example of using prior predictive checks with

  • flat priors
  • weakly informative priors

Preferably two visualizations:

  • the parameter distributions
  • the resulting linear model (spaghetti plot)

Modularize scripts

The scripts could probably be enhanced by using more functions.

In particular, when using the same functions for the two data sets.

How does log-transformation change the params?

Since the model will predict the log sqm price, the interpretation of the parameters also changes.

Make sure to understand, how to interpret

  • intercept (geometric mean)
  • slope (multiplicative change)
  • sigma

PyMCon 2020

Hi!

As you may have already seen on Twitter or on PyMC Discourse, we are planning a virtual conference for the PyMC community. All the information is available in the Discourse post.

We are currently looking for conference chairs and volunteers and would be very grateful if you could share the word! We also want to encourage you to, if you are interested and available, apply to be a conference chair.

Hierarchical Model

Implement a basic hierarchical model with varying intercept and slope parameter, again only one predictor (living_space)

  • naive implementation hierarchical model
  • smarter implementation hierarchical model

Question: Using multivariate normal distribution?

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.