Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 934 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 934 Bytes

Bayesian statistics : Coding a Markov-chain Monte-Carlo algorithm

Overview

Back in 2022 I really started to get interested in data science. I always wanted to learn more about bayesian statistics, and how to use it in practice beyond the classic expression of the Bayes formula we learn in class. So I dig into a bayesian statistics introduction book, and with the help of some youtube videos (from the excellent channel ritvikmath), I created my first bayesian statistics algorithm.

Goal of the project

Creating a Markov-chain Monte-Carlo type algorithm to estimate the posterior of a bayes formula given any prior. I followed the Metropolis-Hsting algorithm principle.

Project structure

  • echantillonage_preferentiel_v1.py : Training script for the accept-reject sampling
  • MCMC_v1.py : First iteration of the MCMC algorithm
  • MCMC_v2.py : Second iteration of the MCMC algorithm