GithubHelp home page GithubHelp logo

yagmurgulec / montecarlosimulationwithstreamlit Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 14.58 MB

Streamlit Application for Monte-Carlo Simulation Applied to Percolation in a 2D system Developed For MLH's Month Long Hackathon

Makefile 0.39% Python 86.29% Java 13.32%

montecarlosimulationwithstreamlit's Introduction

Python demo workflow

Streamlit Application for Monte-Carlo Simulation To Estimate the Value of Percolation Threshold

Open in Streamlit

This repository is created to submit MLH's Month Long Hackathon. I got the inspiration from the Percolation assignment in Coursera's Algorithms 1 course from Princeton.

Some systems from the test files are visualized and used to test the quick union implementations, which are used the connectivity between points in the system. The test files are downloaded from the link.

Apart from the visualization, it shows how the percolation threshold converges with increasing number of rows, columns and statistical experiments. As a new simulation is added, it is tabulated in the same table to make a comparison of their standard deviations, means and confidence intervals.

What is percolation?

Also, Percolation theory helps describe phenomena where connectivity occurs through a medium. This medium is a random system comprised of n-by-m grid of sites and connections between sites. The network can represent a porous material, a network of pipes, a social network, or even a computer network. That is why it has applications in various fields, including physics, mathematics, material science, and computer science. For instance, the image depicts a system with 8-by-8 grid sites, which is percolated. The sites in gray are open sites but not connected to the top. The white sites are full sites (both open and connected to the top). Black sites are not opened.

To be percolated vertically (from top to bottom), at least one of the bottom sites should be full (white).

Alt text

As an example, the system with the same size that is not percolated is shown in the below.

Alt text

Monte-Carlo Simulation for the estimation of the percolation threshold

Each heatmap representation is one statistical experiment. However if sufficiently large number of computations(at least 30) is performed, the percolation threshold is computed averaging of the fraction of sites opened when the system with n-by-m grid sites is percolated.

montecarlosimulationwithstreamlit's People

Contributors

yagmurgulec avatar

Watchers

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