Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ML Intro

The Imitation Game

The imitation game or the Turing test refers to a test for assesing machine intelligence, proposed by the British mathematician and computer scientist Alan Turing in 1950.

The test is designed to asses a machine’s ability to exhibit intelligent behaviour equivalent to, or indistinguishable from that of a human.

“Try this game with ChatGPT/DeepSeek”

Figure 1:“Try this game with ChatGPT/DeepSeek”

  • Machine Learning: Quite crudely, machine learning can be thought of as a collection of tools and techniques that transforms data into decisions (hopefully good!!) by making some form of classification, like whether or not someone likes pineapple pizza, or some form of quantitavive predictions, like how long can someone run.

Machine Learning Classification

One excellent example of classification is the classification tree itself. We will learn more about them soon.

Machine Learning Regression

Suppose we have a pile of Shoe-size vs Height data, and we want to make some predictions.

“Example: Linear Regression”

Figure 2:“Example: Linear Regression”

Different Types of ML

  • Supervised ML

  • Linear Regression

  • Logistic Regression

  • k-nearest neighbors (k-NN)

  • Support Vector Machine

  • Decision tree

  • Neural Networks

  • Unsupervised ML

  • Density estimation

  • Clustering maps

  • Dimensionality reduction

  • Outlier detection

  • Re-inforcement Learning

  • Deep-Q learning

  • Self-driving car

❓ Exercise

Q7: How to stop the Green Squiggle from being the final answer??

“Wrong Regression”

Figure 3:“Wrong Regression”

Click to show answer

Answer: Add some validation point. If the green squiggle is the final answer then the prediction do will do worse for validation points.

“Correcting Regression”

Figure 4:“Correcting Regression”

Statistical Interlude: Data as Monte Carlo Samples

Suppose the true data-generating distribution is

p(ϕsource).p(\phi \mid \text{source}).

Here, ϕ\phi denotes one data point. For example, in collider physics, ϕ\phi could represent one collision event, one jet image, or one reconstructed object.

For simplicity, we often write

p(ϕsource)p(ϕ).p(\phi \mid \text{source}) \equiv p(\phi).

If we have NN data points,

{ϕ1,ϕ2,,ϕN},\{\phi_1,\phi_2,\ldots,\phi_N\},

then the i.i.d. assumption means

p(ϕ1,ϕ2,,ϕN)=i=1Np(ϕi).p(\phi_1,\phi_2,\ldots,\phi_N) = \prod_{i=1}^{N}p(\phi_i).

This is an extremely useful assumption. It says that every event is generated by the same physical/statistical rule, but each event is still a fresh random draw. In collider physics, this is a very natural way to think.

Each collision event is random, but it is not arbitrary. It is sampled from a probability distribution determined by the underlying physics, detector response, reconstruction procedure, and event selection.

Now suppose we want to compute the average value of some observable f(ϕ)f(\phi). The exact expectation value is

f(ϕ)p=dϕp(ϕ)f(ϕ).\langle f(\phi)\rangle_p = \int d\phi \, p(\phi) f(\phi).

But in real life, we do not know the full distribution p(ϕ)p(\phi). We only have a finite dataset. Therefore, we approximate the distribution by the empirical distribution

p(ϕ)1Ni=1Nδ(ϕϕi).p(\phi) \approx \frac{1}{N}\sum_{i=1}^{N}\delta(\phi-\phi_i).

Substituting this into the expectation value gives

f(ϕ)p=dϕp(ϕ)f(ϕ)dϕ[1Ni=1Nδ(ϕϕi)]f(ϕ).\langle f(\phi)\rangle_p = \int d\phi \, p(\phi) f(\phi) \approx \int d\phi \left[ \frac{1}{N}\sum_{i=1}^{N}\delta(\phi-\phi_i) \right] f(\phi).

Using the property of the delta function,

dϕδ(ϕϕi)f(ϕ)=f(ϕi),\int d\phi \, \delta(\phi-\phi_i)f(\phi)=f(\phi_i),

we get

f(ϕ)p1Ni=1Nf(ϕi).\langle f(\phi)\rangle_p \approx \frac{1}{N}\sum_{i=1}^{N}f(\phi_i).

In other words,

f(ϕ)p1Ni=1Nf(ϕi)\boxed{ \langle f(\phi)\rangle_p \approx \frac{1}{N}\sum_{i=1}^{N}f(\phi_i) }

This is the statistical heart of why more data usually helps.

A few words on Monte Carlo

Monte Carlo methods use randomness to estimate quantities that may be difficult to compute exactly. In this sense, a dataset is already doing something Monte Carlo-like: it gives us random samples from an unknown distribution, and we use these samples to estimate averages, probabilities, losses, and other quantities.