Lecture 1 Statistical Machine Learning: Overview subjects
Overview subjects
Regression: 1d vs multidimensional.
In practice, we have to take into account that we do not know the ground truth. How do we take into account this uncertainty?
- Bayesian linear regression
- Probability distribution
- Gaussian processes
Classification: Object detection (esp. deep NNs), (nonlinear) logistic regression. N.B. the latter is called regression but it is in fact classification. In classification problems you know the ground truth.
Kernel methods: We do not always have straight-cut numerical data, but instead for example protein sequences, or documents. This is where Kernel methods come in handy: we are trying for features that can be used for a good approximate solution.
- the 'kernel trick'
- (non-parametric) kernel density estimation
Clustering and EM algorithm (guest lecture Tom Heskes). A main difference with classification is that we do not know the ground truth with clustering. We will dive into Expectation-Maximization.
Sampling methods, such as Markov chain Monte Carlo sampling (MCMC).
Basic concepts
In machine learning, we have a training set with input data x and target data t(x) (target class). We are trying to find a mapping x -> t(x).
A machine learning is usually an adaptive model that uses some learning algorithm for tuning the model parameters on the training set.
End result is y(x):
- Fitted to target data
- For new inputs x -> output y(x).
- Hopefully y(x)~t(x), a.k.a. generalization.
Preprocessing
Why?
- Easier to handle
- Speed up computation
- Create new instances
Examples:
- scaling, centering
- aspect ratio, greyscale
Preprocessing can be done by hand or based on rules, but especially when you do it by hand your preprocessing is highly problem specific (and may rely on expert knowledge). In this course we do not heavily focus on preprocessing.
Feature extraction:
- Dimension reduction
- Reduce in-class variability (noise reduction) -> makes learning easier
- Reduce between-class variability (information loss) -> more difficult to learn
- TODO REVIEW: why? Didn't 100% what is harder.
- So in practice there's a trade-off.
Types of machine learning tasks
- Supervised learning: targets are known
- Classification: targets are classes
- Regression: target is continuous
- Unsupervised learning: unknown targets
- Clustering (similarity between input data)
- Density estimation (distribution of input data)
- Dimension reduction (e.g. to 2D/3D for visualization)
- Reinforcement learning: find optimal target / strategy
- What actions lead to a maximal reward?
- Exploration vs. exploitation
Regression
How to make sense of raw data? See example graph of Covid cases.
- There is an underlying rate in cases
- But also variability due to noise
- Vertical
- "Horizontal": cases registered too late; causing one big spike.
A regression line is a compact representation of the data that allows interpolation (imputation) to fill up gaps in the data, and extrapolation (prediction).
- How can we learn this regression function? What should it look like?
- What if there's missing data?
- What are the risks/pitfalls in using/interpreting this function?
Polynomial curve fitting.
Polynomials are very flexible functions y(x,w)=w0 + w1x + w2x^2 ... etc.
$y(x,w)$ is highly nonlinear in x, but linear w.r.t. weights w, so we still call it a "linear model". So a "linear model" just means: it's easy to handle because it's linear in the weights. It doesn't mean it's linear in the input and only concerns straight regression lines.
The best fitting curve is found through minimizing an error function.
Q: But how do you determine the optimal order of the polynomial?
To find a minimum, we compute a vector of partial derivatives with respect to all inputs, which is indicates by the "nabla" symbol. (Local) minima and maxima have a gradient of 0, i.e. "nabla" = 0.
TODO: latex symbol for nabla.
Note that we typically write vectors "vertically" (when used in linear algebra etc.), so when we write it down horizontally note the transposed symbol.
Review chain rule.