Laboratory of Machine Learning Methods in Physics

Medical Physics, Second Cycle
2 year
Hours per week – 1. semester:

Enrollment into the program, familiarity with the content of courses Probability in Physics and Mathematical Physics Laboratory is recommended.

Content (Syllabus outline)

Probability, Decision and Information Theory Applied to Physics Data

From sets of physics data (e.g., particle physics, astronomical observations, nuclear physics, etc.), determine statistical quantities such as probability density, expected values and covariance, Bayesian probability etc. In the context of using machine learning methods, define the concepts of misclassification, expected loss, inference and decision making. Followed by an overview of the use of quantities such as relative entropy and mutual information in physics examples.

Probability Distributions in Physics Examples

Treatment and classification of binary, multinomial and other discrete probability distributions and classifications in physics data. Continuous distributions such as Gaussian and exponential distributions in physics models and measurements. Use of machine learning in the context of determining the parameters of probability distributions.

Basics of Monte-Carlo methods and their implementation in machine learning methods with physics examples.


-Introduction of multinomial distributions in particle physics measurements, determination of their statistical and systematic measurement errors. Approach to the optimal selection of the number of compartments (bin) and interval evaluated by different methods, taking into account the limitations of the intrinsic resolution of the measured parameters.

-Simple simulation of the decay chain of unstable particles by considering the decay widths and measurement resolution.

Modeling in physics by using machine learning methods

By using examples from different branches of physics (from condensed and soft matter, particle physics, medical physics to meteorology and astronomy, etc.) one introduces the application of the following concepts:

Linear Regression: Cost Function, Gradient Descent, Bayesian regression

Logistic Regression: Binary and Multiclass Classification, Regularization, Probabilistic generative and discriminative models.

Neural Networks: Curse of dimensionality, Universal approximation theorem, Backpropagation, Stochastic Gradient Descent. Special cases: Convolutional networks (CNN), RNNs, GANs, Variational Autoencoders (VAE).

Kernels and Support Vector Machines, Gaussian processes

Clustering: Mixture models, K-Means, Mixed membership and LDA, Principal Component Analysis, Anomaly Detection

Approximate inference: variational inference, expectation maximization

A special emphasis is given on the methods of optimal model selection in physics, e.g. in problems involving biases and minimal variance.


  • Anomaly detection in nuclear physics and evaluation/classification of these by weight coefficients with respect to physics impact.

-Use of GAN and VAE to simulate detector response to the passage of particles through matter, emphasis on adding physics criteria to the loss function (e.g. maintaining the moving amount etc.).

-Use machine learning methods to identify tumors and appropriate iradiation configuration in medical physics. Emphasis on measurement resolution and consideration of the types of physical processes arising from irradiation.


Simon Širca: Verjetnost v fiziki.
Ivan Kuščer in Alojz Kodre: Matematika v fiziki In tehniki.
Christopher M. Bishop: Pattern Recognition and Machine Learning
Aurélien Géron: Hands-on Machine Learning with Scikit-Learn, Keras, and TensorFlow

Objectives and competences

Students are acquainted with the basics of probability, decision and information theory applied to physics data, probability distributions in physics examples, and get practical experiences with modelling in physics by using machine learning methods.

Intended learning outcomes

Knowledge and understanding:

Understanding the underlying theory of machine learning and the application of the machine learning methods as well as being able to select the appropriate (optimal) variant of this category of methods in scientific applications.


The skill of direct application of the machine learning methods and quantitative evaluation of application on concrete physics and technical problems.


Critical evaluation of the effectiveness, prediction power and accuracy and unbiased performance of the implemented machine learning method.

Transferable skills:

Understanding of the basic concepts of machine learning and related topics in probability theory and statistics. Applying numerical methods and corresponding tools of this type on physics problems, efficient use of accelerator technologies (e.g. GPUs) etc. The student acquires experience in the usage of software tools for machine learning in data processing, classification and modeling. Builds on the skills of writing project reports on scientific computing projects.

Learning and teaching methods

Lectures, weekly projects, live computer presentations, consultations.


The grade is given according to the grades of individual projects (N weekly problems).
grading: 5 (fail), 6-10 (pass) (according to the Statute of UL)

Lecturer's references

Izr. prof. dr. Jernej Fesel Kamenik

Barry M. Dillon, Darius A. Faroughy and Jernej F. Kamenik, Uncovering latent jet substructure, Phys.Rev. D100 (2019) no.5, 056002
Gregor Kasieczka (ed.), Jernej F. Kamenik et al., The Machine Learning Landscape of Top Taggers, SciPost Phys. 7 (2019) 014

prof. dr. Borut Paul Kerševan

Borut Paul Kersevan and Elzbieta Richter-Was, The Monte Carlo event generator AcerMC versions 2.0 to 3.8 with interfaces to PYTHIA 6.4, HERWIG 6.5 and ARIADNE 4.1 Comput.Phys.Commun. 184 (2013) 919-985
ATLAS Collaboration (Aad, G., Borut Kersevan et al.), The ATLAS Simulation Infrastructure, Eur.Phys.J. C70 (2010) 823-874