Davide Gerosa (module lead) - davide.gerosa@unimib.it
Giulia Fumagalli (teaching assistant) - g.fumagalli47@campus.unimib.it
University of Milano-Bicocca, 2025. BSc in Artificial Intelligence.
Machine learning and data mining are quickly becoming essential techniques in the field of (astro)physics. Such powerful tools provide precious insights into the laws governing natural processes and shed light on the information contained in experimental datasets. This lab provides a quick introduction to such topics, equipping students with some essential background to apply their data-science knowledge to core physical problems.
- Probability Probability theory. Bayes theorem. Descriptive statistics (E: Monty Hall)
- Sampling Bayesian vs frequentist statistics. From the pdf to the samples: inverse transform, acceptance/rejection (E: Black holes)
- Density estimation From the samples to the pdf: histograms, Kernel Density Estimation. (E: Exoplanets)
- Markov chains Bayesian stats examples. Monte Carlo integrations. Markov chains. (E: Weather forecast, N-dimensional balls)
- MCMC Metropolis Hastings. MCMC diagnostics. Modern samplers. (E: Time transients)
- Model selection Bayesian model selection. Savage-Dickey density ratio. (E: Higgs Boson)
- Nested sampling Computing the evidence. Nested sampling. Modern samples. (E: Time transients & Higgs Boson)
- Project (E: The expansion of the Universe)
Here are some useful textbooks. The first one is easier, the second one is amazing, the third is short and sweet, the fourth and fifth ones are for the true Bayesians...
- "Machine Learning for Physics and Astronomy", Acquaviva, Princeton University Press, 2023.
- "Statistics, Data Mining, and Machine Learning in Astronomy", Željko, Andrew, Jacob, and Gray. Princeton University Press, 2012.
- "Statistical Data Analysis", Cowan. Oxford Science Publications, 1997.
- "Data Analysis: A Bayesian Tutorial", Sivia and Skilling. Oxford Science Publications, 2006.
- "Bayesian Data Analysis", Gelman, Carlin, Stern, Dunson, Vehtari, and Rubin. Chapman & Hall, 2013. Free!
We will make heavy use of the python programming language. If you need to refresh your python skills, here are some catch-up resources and online tutorials.
- "Python for Scientific Computing", M. Zingale
- "Lectures on scientific computing with Python", R. Johansson et al.
- Python Programming for Scientists", T. Robitaille et al.
- "Learning Scientific Programming with Python", Hill, Cambridge University Press, 2020. Supporting code: scipython.com.
- "Python for non pythonians", Rubera, Grossetti, 2019.
Classes will take place on the Bicocca campus, on Wednesdays from 8.30am to 12.30pm, for a total of 36 hours.
Our schedule is as follows. Here is a public calendar with the dates below, which you can import into your calendar software.
- Mar 5. Lab U9-910
- Mar 12. Lab U9-910
- Mar 19. Lab U9-910
- Mar 26, Davide is away for research
- Apr 2. Lab U9-910
- Apr 9. Lab U9-910
- Apr 16. Lab U9-910
- Apr 23. Lab U9-910
- Apr 30. Lab U5-531
- May 7. Lab U5-531
- May 14. Tutoring before the exams. Lab U5-531
Coding. Each class will be about 1h of lecture and about 3h of coding. You will need to run python, see here for instructions.
News+emails: https://elearning.unipv.it/course/view.php?id=7387
Recordings: https://elearning.unimib.it/enrol/index.php?id=57492
Each lecture has an exercise at the end (actually, most of the time in class is dedicated to completing these problems!). At the end of the class, you will have to submit your codes showcasing what you've done on these problems. There will not be oral exams. The outcome will be provided as a passed / not passed statement (no numbers).
To submit your codes, register on github.com, create a new private repository called machinelearning4physics_bicocca_2025_solutions, upload your files, share it with the two of us (usernames dgerosa and gfumagalli), and send us an email when you are done. See here for detailed instructions.
You do not need to submit assignments after every lecture. Please share them all together at the end of the course, when you are ready. Exams will be cleared according to the nominal exam dates available on the student service website.
- Current: dgerosa.github.io/astrostatistics_bicocca
- 2024: github.com/dgerosa/astrostatistics_bicocca_2024
Credit: xkcd 1831.
