Git Product home page Git Product logo

afairless / beta_binomial_plot Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 229 KB

Plotly Dash app that animates Bayesian updates of beta distributions with binomial data

Home Page: https://afairless.com/updating-our-predictions-with-new-data-basketball-edition/

CSS 41.31% Python 51.75% Dockerfile 6.94%
basketball basketball-stats bayesian-statistics beta-distribution binomial-distribution data-animation data-visualization plotly plotly-dash sports sports-analytics statistical-models statistics

beta_binomial_plot's Introduction

Bayesian Beta-Binomial Updates: Plotly Dash Application

The code in this repository runs a Plotly Dash app that animates a series of Bayesian updates of beta distributions with binomial data

Application controls:

  • Restart Animation - reset the animation to its first state, when only the starting prior beta distribution is displayed
  • Play Animation - toggles the animation on or off; 'off' pauses the animation at its current state
  • Animation Update Frequency (sec) - the animation updates once every X seconds, where X is chosen here
  • Beta parameter alpha starting value (prior) - the starting value for the beta parameter alpha; accepts values with only up to 2 decimal places
  • Beta parameter beta starting value (prior) - the starting value for the beta parameter beta; accepts values with only up to 2 decimal places
  • Number of binomially distributed data points - how long the sequence of binomial data is, i.e., the number of updates
  • Random seed - pseudo-random seed that allows reproducible results whenever the same seed is chosen
  • Binomial Proportion (True Beta Distribution Mode) - the proportion used to generate the binomially distributed data

This webpage shows an example of how the beta-binomial model can be used. It also shows videos of beta distribution upates from the Plotly Dash applicaton.

Below is a sequence of images showing a series of beta-binomial updates.

Image

Image

Image

Run with Docker

From the top project directory, you can run these commands:

sudo docker build -t binomial-docker .

sudo docker run -p 8050:8050 binomial-docker

In the commands above, you may substitute a name of your own choosing for binomial-docker.

Then point your web browser at:

http://127.0.0.1:8050/

Run with Poetry

From the 'src' directory, you can run these commands:

poetry install

poetry shell

python beta_binomial.py

Then point your web browser at:

http://127.0.0.1:8050/

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.