Just like poetry, mathematics creates its own worlds, with various “entities” and their “rules of engagement”..... Just like poetry, mathematics creates its own worlds, with lái various
Trang 1ES 691 Mathematics for
Trang 2Course Part | - Magic of how
learning happens (in organisms
Trang 3Course Part Il - Mathematics that
enables algorithmic learning
Mathematics
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES
Trang 4Mathematics Mathemagic
Course Part Ill -— “Mathemagic’, where
concepts of learning and mathematics
come together to produce the “brains”
of Al, called Machine Learning
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES
Trang 9How?
A Very Very Brief Reply
Trang 10A lot of ML Deals With “Linear Combinations”
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 10
Trang 11A lot of ML Deals With “Linear Combinations”
Trang 12A lot of ML Deals With “Linear Combinations”
Input layer Output layer
Perceptron Unit
> wx, 2 @ — neuron fires
> wx; < @— neuron doesn't fire
` Can be written more
wx succinctly as an inner
product of two vectors
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 12
Trang 13“Systems of Linear Equations” Naturally Show Up
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 13
Trang 14“Systems of Linear Equations” Naturally Show Up
Input layer Output layer
A simple neural network
Trang 15“Systems of Linear Equations” Naturally Show Up
Input layer Output layer
Using multiple observations
Trang 16Lots of Parameters to Handle
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 16
Trang 17Lots of Parameters to Handle
Nice Illustrations by Nikola Marincic
Trang 18Lots of Parameters to Handle
Trang 19Cost Functions Will Often be Defined on Vectors
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 19
Trang 20Cost Functions Will Often be Defined on Vectors
Trang 21Cost Functions Will Often be Defined on Vectors
Trang 22Optimization of Parameters w.r.t Cost Function Will be Required
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 22
Trang 23Optimization of Parameters w.r.t Cost Function Will be Required 8Œ
Trang 24Probabilities Will be Needed to Handle/Analyze Randomness in
Data, Weight Initializations, and Model Behavior
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 24
Trang 25Probabilities Will be Needed to Handle/Analyze Randomness in
Data, Weight Initializations, and Model Behavior
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 25
Trang 26Probabilities Will be Needed to Handle/Analyze Randomness in
Data, Weight Initializations, and Model Behavior
Trang 27We Will Also Adopt Probabilistic Formulations
in Various Contexts to Handle Uncertainties
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 27
Trang 28
We Will Also Adopt Probabilistic Formulations
in Various Contexts to Handle Uncertainties 4;
Trang 29
We Will Also Adopt Probabilistic Formulations
in Various Contexts to Handle Uncertainties 4;
Trang 30
We Will Also Adopt Probabilistic Formulations
in Various Contexts to Handle Uncertainties 4:
Which will often again lead us to
Linear Algebra and Optimization —4; —— MAP
Trang 31In Reducing Dimensions, it Would Help to
Know How to Smartly Decompose Matrices
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES
31
Trang 32In Reducing Dimensions, it Would Help to
Know How to Smartly Decompose Matrices
Trang 33In Reducing Dimensions, it Would Help to
Know How to Smartly Decompose Matrices
Variable 1
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES
33
Trang 34The above examples are just a small sample
In fact, it will help immensely with smart problem formulation, implementation, and
analysis to know the three fields well.
Trang 35Poetry of Mathematics
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 35
Trang 36
Just like poetry, mathematics creates its own worlds, with
various “entities” and their “rules of engagement”
Trang 37
Just like poetry, mathematics creates its own worlds, with
lái various “entities” and their “rules of engagement”
Trang 38
Just like poetry, mathematics creates its own worlds, with
lái various “entities” and their “rules of engagement”
Trang 39; Just like poetry, mathematics creates its own worlds, with
various “entities” and their “rules of engagement”
Some Mathematical Objects and Places
Trang 40Just like poetry, mathematics creates its own worlds, with
various “entities” and their “rules of engagement”
Trang 41Beyond Single Variables
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 41
Trang 42Beyond Single Variables
Row Vector Column Vector
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 42
Trang 43Beyond Single Variables
[51377] 1635
Row Vector
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES
TENSOR
43
Trang 44
Just like poetry, mathematics creates its own worlds, with
various “entities” and their “rules of engagement”
scalar vector matrix
ee®®
Tensor Algebra Beyond Single Variables
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES
Trang 45Definition a single number an array of 2-D array of numbers k-D array of numbers
Python code x= x= x = np.array([[1.2,3.4], x =np.array([[[1 2, 3]
[700, 800, 900]]])
Visualization a 3-D Tensor 45
Trang 46ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 46
Trang 49
Symbol | Name Example Explanation
B= {2,3,9}
C= {3,9}
_ Proper Subset {l}c A A set that is contained in
CCB another set
f1,3}c 4A equal to another set
Œ Not a Proper Subset 3)ơ 4A A set that is not contained in
another set
€ Is amember 3EA 3 is an element in set A res Is not a member 4¢A 4 is not an element in set A 49
Trang 51
Q Are these sets the same?
Trang 52Extend the line backward to Integer
include the negatives
Trang 54Rational
Q
Rational numbers are the ratios of integers, also called fractions, such as 1/2 = 0.5 or 1/3 = 0.333 Rational decimal expansions
end or repeat (Q is from quotient.)
Trang 55Rational
Q
Rational numbers are the ratios of integers, also called fractions, such as 1/2 = 0.5 or 1/3 = 0.333 Rational decimal expansions
end or repeat (Q is from quotient.)
Real Algebraic Non-zero polynomials of finite
ZAR ⁄⁄ degree with integer coefficients
The real subset of the algebraic numbers: the real roots of polynomials Real algebraic numbers may be rational or irrational
V2 = 1.41421 is irrational Irrational decimal expansions neither end nor repeat
Trang 56Rational
0
Rational numbers are the ratios of integers, also called fractions, such as 1/2 = 0.5 or 1/3 = 0.333 Rational decimal expansions
end or repeat (Q is from quotient.)
Real Algebraic Non-zero polynomials of finite
ZAR ⁄⁄ degree with integer coefficients
The real subset of the algebraic numbers: the real roots of polynomials Real algebraic numbers may be rational or irrational
V2 = 1.41421 is irrational Irrational decimal expansions neither end nor repeat
Trang 57Rational
0
Rational numbers are the ratios of integers, also called fractions, such as 1/2 = 0.5 or 1/3 = 0.333 Rational decimal expansions
end or repeat (Q is from quotient.)
ZAR ⁄ degree with integer coefficients
The real subset of the algebraic numbers: the real roots of polynomials Real algebraic numbers may be rational or irrational
V2 = 1.41421 is irrational Irrational decimal expansions neither end nor repeat
Irrationals that are not algebraic (as it is root of polynomial x* — 2 = 0)
Transcendental — Subset of 2 Irrational, but not Transcendental
Trang 60ES691 - Mathematics for Machine Learning / Dr Naveed R Butt
60
Trang 61
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt
61
Trang 64Predeƒfined Interactions
Operators
Trang 67
Operators may have some properties
of interest and [analytical] use!
Trang 68
Operators may have some properties
of interest and [analytical] use!
Trang 69
Operators may have some properties
of interest and [analytical] use!
Trang 70
Operators may have some properties
of interest and [analytical] use!
We know that x, + Xz, and x» + x, lead to
the same point y (at least for numbers)
Addition is Commutative!
Trang 71
Operators may have some properties
of interest and [analytical] use!
Property Addition Multiplication Commutative a+b=b+a axb=bxa
Associative a+(b+c)=(a+b)+c ax(bxc)=(axb)xec Distributive ax(b+c)=axb+axc
Trang 72Taken together, Operators and Sets may have
some properties of interest and [analytical] use!
Trang 73Taken together, Operators and Sets may have
some properties of interest and [analytical] use!
Trang 74Taken together, Operators and Sets may have
some properties of interest and [analytical] use!
Trang 75Taken together, Operators and Sets may have
some properties of interest and [analytical] use!
Trang 76Taken together, Operators and Sets may have
some properties of interest and [analytical] use!
Trang 77Taken together, Operators and Sets may have
some properties of interest and [analytical] use!
xWMe=eWx=x
Vx€CX 1y CÀ:
Trang 78Taken together, Operators and Sets may have
some properties of interest and [analytical] use!
xWMe=eWx=x
Inverse Element
Vx EX 1y CÀ:
Trang 79Z = set of integers
Closure Property
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 79
Trang 82Z = set of integers
Closure Property
a+bcZ
a-bcZ axbcZ
Trang 83
Why Are These Properties of Interest?
Trang 84
Why Are These Properties of Interest?
- Alot of mathematics deals with finding solutions
(possibly under constraints), solution sets, and
general proofs
Trang 85
Why Are These Properties of Interest?
- Alot of mathematics deals with finding solutions
(possibly under constraints), solution sets, and
Trang 86
Why Are These Properties of Interest?
- Alot of mathematics deals with finding solutions
(possibly under constraints), solution sets, and
general proofs
- Closure, Identity, Inverse helpful as we can be
sure that mappings can be reversed, and
solution does not require expanding the set
- They also help us understand nature and
limitations of sets possibly leading to new math (e.g., need for complex numbers when trying to
solve polynomials Galois Theory another
Is the square root of a real number always a real number?
Trang 87
Why Are These Properties of Interest?
- Alot of mathematics deals with finding solutions
(possibly under constraints), solution sets, and
general proofs
- Closure, Identity, Inverse helpful as we can be
sure that mappings can be reversed, and
solution does not require expanding the set
- They also help us understand nature and
limitations of sets possibly leading to new math (e.g., need for complex numbers when trying to
solve polynomials Galois Theory another
Trang 88
Why Are These Properties of Interest?
- Alot of mathematics deals with finding solutions
(possibly under constraints), solution sets, and
general proofs
- Closure, Identity, Inverse helpful as we can be
sure that mappings can be reversed, and
solution does not require expanding the set
- They also help us understand nature and
limitations of sets possibly leading to new math (e.g., need for complex numbers when trying to
solve polynomials Galois Theory another
No solution to the problem
“find Real number x such that x* + 1 = 0” since Real numbers are not closed
under square root
Trang 89
Why Are These Properties of Interest?
- Alot of mathematics deals with finding solutions
(possibly under constraints), solution sets, and
general proofs
- Closure, Identity, Inverse helpful as we can be
sure that mappings can be reversed, and
solution does not require expanding the set
- They also help us understand nature and
limitations of sets possibly leading to new math (e.g., need for complex numbers when trying to
solve polynomials Galois Theory another
No solution to the problem
“find Real number x such that x* + 1 = 0” since Real numbers are not closed
under square root
Imagine the time before introduction of Set of Complex numbers!
Trang 90
Why Are These Properties of Interest? (Contd )
- Analytical solutions and proofs become easier if
expressions can be simplified
- Commutative, Associative, Distributive
properties come in handy
Trang 91
Why Are These Properties of Interest? (Contd )
- Analytical solutions and proofs become easier if
expressions can be simplified
- Commutative, Associative, Distributive
properties come in handy
Prove the useful identity
Trang 92
Why Are These Properties of Interest? (Contd )
- Analytical solutions and proofs become easier if
expressions can be simplified
- Commutative, Associative, Distributive
properties come in handy
Prove the useful identity
(œ + b)(a — b) = (œ + b)a + (a + b)(—b) = a(a + b) + (—b)(a + b) = a? + ab — ba — b?
= a? + ab— ab—b? =a? + lab— lab + b? —= a? + (1 — 1)ab — bŠ —= a° + 0ab — bÊ = a?
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 92
Trang 93A Very Common Type of Operators
Trang 95A Very Common Type of Operators
Trang 96A Very Common Type of Operators
What are nullary, unary,
ternary, and n-ary operators?
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 96
Trang 97Some Examples
On the set of real numbers R, f(a, b) = a + b)
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES 97
Trang 98Some Examples
On the set of real numbers R, f(a, b) = a+ bis a binary operation}
On the set (2, R) of 2 x 2 matrices with real entries, f(A, B) = AB |
ES691 - Mathematics for Machine Learning / Dr Naveed R Butt @ GIKI - FES