Inspiration

With growing processing power, it is now easy to fit a regression model or perform a MLE approximation to get prediction and uncertainty from a large set of data. But huge datasets are hard to collect, keep, and maintain. This project aims to predict from a small set of data by incorporating ou prior beliefs of the data. This is called the Bayesian Statistical Learning. It is growing increasingly popular in Machine Learning Community, and we wanted to show what it does, how it does that, and how powerful it can be.

What it does

Predicts with uncertainty incorporating prior beliefs and with the help of a small set of data.

How we built it

We used python's scipy library to perform mathematical operations like beta distribution calculation, combination calculation, sampling from a binomial distribution. We used pygame for the UI. We used pygame as matplotlib's backend to update the chart every second with user's input. We used sockets and InterProcessCommunication in pygame to create two windows at the same time and exchange information between them If you want to see the math behind it, check this presentation we made just for this hackathon.

Challenges we ran into

We tried to build everything from scratch. We even wrote the combination function, the beta distribution calculator ourselves. So, we had to write a lot of functions and vectorize them in numpy to make the functions faster. ** We first tried to use multiprocessing Queue as a means to communicate betweenn different windows, but it truned out to be very slow specially when our plot needs to update every second. So figuring out how to perform **InterProcessCommunication was hard.

Accomplishments that we're proud of

We built a great UI to visualize the Bayesian Prediction Process.

What we learned

Bayesian Statistics, Vectorization, Sockets and Networking.

What's next for Prediction - The Bayesian Approach

Create a UI that asks for prior beliefs and all the distribution for a data from its users, and perform this same prediction and visualization process for any kind and set of data. We thought of doing thatm but it would take another day or so to implement basic version of such a program, and since it is a hackathon, we didn't attemp it for the sake of time.

Built With

Share this project:

Updates