0% found this document useful (0 votes)
7 views42 pages

Lecture 01

This document provides an introduction to an advanced machine learning course. It discusses the motivation for machine learning and provides examples of machine learning applications. It then gives an overview of the course objectives, which include understanding machine learning algorithms and applications, implementing algorithms in Python, and selecting the right models for problems. It also outlines the course structure, grading, recommended books, and software.

Uploaded by

carlo.768.ri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views42 pages

Lecture 01

This document provides an introduction to an advanced machine learning course. It discusses the motivation for machine learning and provides examples of machine learning applications. It then gives an overview of the course objectives, which include understanding machine learning algorithms and applications, implementing algorithms in Python, and selecting the right models for problems. It also outlines the course structure, grading, recommended books, and software.

Uploaded by

carlo.768.ri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Advanced Machine Learning

Lecture 1: Introduction
Sandjai Bhulai
Vrije Universiteit Amsterdam

[email protected]
6 September 2023
Motivation

2 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Motivation

3 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Motivation

4 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Motivation

5 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Motivation

6 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Motivation

7 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Machine learning

8 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Machine learning
What is machine learning?
▪ Arthur Samuel (1959): eld of study that gives computers the
ability to learn without being explicitly programmed

▪ Tom Mitchell (1998): a computer program is said to learn


from experience E with respect to some task T and some
performance measure P, if its performance on T, as
measured by P, improves with experience E

9 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


fi
Machine learning

10 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Machine learning examples
▪ Database mining
> Web click data, medical records, biology

▪ Applications that cannot be programmed by hand


> Autonomous vehicles, OCR, NLP, computer vision

▪ Self-customizing programs
> Amazon, Net ix product recommendations

▪ Understanding human learning / behavior


> Brain, real AI

11 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


fl
Machine learning examples

12 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Machine learning examples
▪ Database mining
> Web click data, medical records, biology

▪ Applications that cannot be programmed by hand


> Autonomous vehicles, OCR, NLP, computer vision

▪ Self-customizing programs
> Amazon, Net ix product recommendations

▪ Understanding human learning / behavior


> Brain, real AI

13 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


fl
Machine learning examples

14 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Machine learning examples
▪ Database mining
> Web click data, medical records, biology

▪ Applications that cannot be programmed by hand


> Autonomous vehicles, OCR, NLP, computer vision

▪ Self-customizing programs
> Amazon, Net ix product recommendations

▪ Understanding human learning / behavior


> Brain, real AI

15 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


fl
Machine learning examples

16 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Machine learning examples
▪ Database mining
> Web click data, medical records, biology

▪ Applications that cannot be programmed by hand


> Autonomous vehicles, OCR, NLP, computer vision

▪ Self-customizing programs
> Amazon, Net ix product recommendations

▪ Understanding human learning / behavior


> Brain, real AI

17 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


fl
Machine learning examples

18 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Course overview

Advanced Machine Learning


Course overview: objectives
▪ Understand the capabilities and the limitations of machine
learning
▪ Implement machine learning algorithms in Python
▪ Know relevant machine learning algorithms for both
supervised and unsupervised learning problems
▪ Select the right machine learning models for real-world use
cases
▪ Understand when to apply online learning, reinforcement
learning, and deep learning
▪ Interpret the outcomes of machine learning algorithms

21 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Course overview: grading
▪ Course value: 6 ECTS (a full month of work)
▪ Course consists of:
> Written exam (weight: 0.9)
> Computer assignments (weight: 0.1)
▪ Both parts have to be passed with at least a 5.5
▪ Written assignments for exam preparation
▪ Q&A sessions on Wednesday for written assignments
▪ Teaching assistant: Mathijs Pellemans
▪ Slack workspace

22 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Course overview: books
▪ Book presents mathematical
theory behind machine learning
▪ Very mathematical
▪ Lectures will try to explain the
mathematics

23 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Course overview: books
▪ Book presents concepts behind
deep learning
▪ Not mathematical
▪ Lectures will try to explain the
mathematics

24 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Course overview: books

25 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Course overview: program
▪ Regression models (linear, logistic, etc.)
▪ Neural networks (NNs)
▪ Convolutional NNs
▪ Recurrent NNs
▪ Hidden Markov models
▪ Reinforcement learning

26 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Course overview: software

27 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Preliminaries

Advanced Machine Learning


Linear algebra
▪ A matrix A has elements Aij where i indexes rows and j indexes
columns

Properties of matrices:
▪ AA −1 = A −1A = I
▪ (AB)⊤ = B ⊤ A ⊤
▪ (AB)−1 = B −1A −1
▪ (A ⊤)−1 = (A −1)⊤
▪ (A ⊤)⊤ = A
▪ (A + B)⊤ = A ⊤ + B ⊤
29 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023
Linear algebra
▪ Symmetric matrix: A⊤ = A
▪ Positive de nite: x ⊤ Ax > 0 for all non-zero x and A
symmetric

▪ All vectors in this course will be column vectors


▪ Recall, if A ∈ ℝm×n is a matrix and x ∈ ℝn a vector, then the
n


i-th element of Ax is given by (Ax)i = aij xj
j=1

30 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


fi
Vector calculus
▪ Let a ∈ ℝn and b ∈ ℝn be a vector, and x ∈ ℝ a scalar.
Then

( ∂x )
∂a ∂ai
=
i
∂x

Derivatives with respect to a vector are de ned by

( ∂a )
∂x ∂x
▪ scalar-vector =
i
∂ai

( ∂b )
▪ vector-vector ∂a ∂ai
=
ij
∂bj

31 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023

fi
Vector calculus
n ∂ ⊤ n
▪ Example: let a ∈ ℝ and x ∈ ℝ . What is (x a)?
∂x

▪ Solution: this is a scalar-vector derivative, thus


n
∂ ∑j=1 aj xj
( ∂x )
⊤ ⊤
∂x a ∂x a
= = = ai
∂xi ∂xi
i
∂ ⊤ ⊤ ∂ ⊤
▪ Thus (x a) = a , similarly (a x) = a⊤
∂x ∂x

32 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Vector calculus
▪ Another example. Let b ∈ ℝm, A ∈ ℝm×n, and x ∈ ℝn
∂b⊤ Ax
▪ What is ?
∂x

▪ Solution: this is a scalar-vector derivative, thus

n m
∂ ∑k=1 ∑j=1 bjajk xk m m

( ∂x )
⊤ ⊤
∂b Ax ∂b Ax
aij⊤bj = (A ⊤b)i
∑ ∑
= = = bjaji =
∂xi ∂xi j=1 j=1
i

∂b⊤ Ax
▪ Hence, = b⊤ A
∂x
33 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023
Vector calculus
∂x
▪ =I
∂x

∂Ax
▪ =A
∂x

∂x⊤ A
▪ = A⊤
∂x

∂x⊤ Ax
▪ = x⊤(A + A ⊤) and 2x⊤ A if A is symmetric
∂x

∂2x⊤ Ax ⊤
▪ = A + A and 2A if A is symmetric
∂x∂x ⊤

34 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Vector calculus
∂x
▪ =I
∂x

▪ Proof:

( ∂x ) {1,
∂x ∂xi 0, if i ≠ j,
= =
∂xj if i = j
ij

35 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Vector calculus
∂Ax
▪ =A
∂x

▪ Proof:

( ∂x )
∂Ax ∂(Ax)i ∂ ∑k=1 aik xk
= = = aij
ij
∂xj ∂xj

36 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Vector calculus
∂x⊤ Ax
▪ = x⊤(A + A ⊤)
∂x

▪ Proof:

∂ ∑k=1 ( ∑l=1 akl xl) xk


n n
∂x⊤ Ax
∑ ∑
= = aki xk + ail xl + 2aii xi =
∂xi ∂xi k≠i l≠i
n n
ail xl = (A ⊤x)i + (Ax)i
∑ ∑
aki xk +
k=1 l=1

37 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Vector calculus
⊤ ⊤
n ∂a xx b
▪ If a, b, x ∈ ℝ , then = x⊤(ab⊤ + ba⊤)
∂x

▪ Proof:

n n

∂a xx b ⊤ ∂ ∑k=1 ak xk ∑l=1 xlbl n n

∑ ∑
= = bi ak xk + ai xlbl =
∂xi ∂xi k=1 l=1

bia⊤x + aix⊤b = bia⊤x + aib⊤x = (bia⊤ + aib⊤) x

38 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Normal distribution
▪ Univariate Normal distribution

{ 2σ 2 }
2 1 1 2
(x | μ, σ ) = exp − (x − μ)
(2πσ 2)1/2

β = 1/σ 2

(x | μ, σ 2) > 0

∫−∞
(x | μ, σ 2) dx = 1
𝒩
𝒩
39 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023
𝒩
Normal distribution
▪ Univariate Normal distribution

{ 2σ 2 }
2 1 1 2
(x | μ, σ ) = exp − (x − μ)
(2πσ 2)1/2

∫−∞
[x] = x (x | μ, σ 2) dx = μ

∫−∞
[x 2] = x 2 (x | μ, σ 2) dx = μ 2 + σ 2

var[x] = [x 2] − [x]2 = σ 2
𝒩
𝔼
𝔼
𝒩
𝒩
40 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023
𝔼
𝔼
Normal distribution

41 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023


Normal distribution
▪ Multivariate Normal distribution

{ 2 }
1 1 1 ⊤ −1
(x | μ, Σ) = exp − (x − μ) Σ (x − μ)
(2π) D/2
|Σ| 1/2

▪ μ is a D-dimensional mean vector


▪ Σ is a D × D covariance matrix (symmetric, positive de nite)
▪ | Σ | is the determinant of Σ
𝒩
42 Sandjai Bhulai / Advanced Machine Learning / 6 September 2023

fi
Normal distribution
([0] [0 1]) ([1] [0.8 1 ])
0 1 0 0 1 0.8
, ,

43
𝒩
𝒩
Sandjai Bhulai / Advanced Machine Learning / 6 September 2023

You might also like