GithubHelp home page GithubHelp logo

aayrm5 / unfair-coin-bayes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xofbd/unfair-coin-bayes

0.0 0.0 0.0 35 KB

simulates the posterior distribution of the probability of an unfair coin

License: MIT License

Python 42.12% JavaScript 24.64% HTML 28.91% Makefile 4.34%

unfair-coin-bayes's Introduction

Unfair Coin Bayesian Simulation

This repository creates a web app that simulates the evolving probability distribution of an unfair coin to come up heads using Bayes's theorem. The prior distribution is a Beta distribution with both shape parameters set to one, resulting in a uniform distribution. This repository is ready to deploy a web application using Flask and Bokeh to Heroku. An example of the app can be seen at http://tdi-ml-unfair-coin.herokuapp.com.

Prerequisites

All required Python packages can be found in the requirements.txt file. Additionally, the provided Makefile can be used to created a virtual environment by running make venv. You will also need a Heroku account and have installed the Heroku CLI. For more information on the Heroku CLI, go to https://devcenter.heroku.com/articles/heroku-cli#download-and-install.

Running the app locally using Flask

You may want to run the app using Flask locally before deploying it to Heroku, especially if you have made any changes to the code. To run locally:

  1. clone the repository.
  2. in the repository, run make deploy.
  3. open the link provided in the command line.

If you are using Windows, you can:

  1. create and activate the virtual environment.
  2. set FLASK_APP="flask_app/app.py" in the command line.
  3. run python -m flask run.
  4. open the link in the command line.

Deploying to Heroku

Make sure your app is ready to be deployed to Heroku by running Flask locally. To deploy to Heroku:

  1. clone the repository (if you haven't yet).
  2. heroku login and enter your credentials.
  3. heroku create or heroku create app-name where app-name is a custom app name.
  4. git push heroku master.
  5. heroku open or open the app online through your Heroku profile.

License

This project is distributed under the MIT license. Please see LICENSE for more information.

unfair-coin-bayes's People

Contributors

xofbd 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.