Lecture2 Math ML Review
Lecture2 Math ML Review
• Linear Algebra
• ML Basic Review
Why Probability in ML
• What is probability ?
• mathematical study of uncertainty.
• Probability plays a key role in machine learning, as the design of
learning algorithms often relies on probabilistic assumption of the
data.
• This review tries to cover basic probability theory that serves as a
basic requirement for this course.
Basic Concepts: Probability Space
• When we speak about probability, we often refer to the probability of an
event of uncertain nature taking place, e.g., measure each outcome chance
after tossing a coin.
Basic Concepts: Probability Measure
Probability Space, Example
• Let’s throw a fair dice:
• What are possible outcomes?
• If we are interested in odd or even events, what is event space?
• What is the probability to get odd numbers?
• What is the probability to get even numbers?
Basic Concepts: Random Variables
• Random variable (RV) is not variable.
• It is a function that map outcoms (in the outcome space) to real
values.
• Why?! Abstract various events into numbers then we can apply math
framework to deal with random events.
Basic Concepts: Random Variables
• Random variable (RV) is not variable.
• It is a function that map outcoms (in the outcome space) to real
values.
• Why?! Abstract various events into numbers then we can apply math
framework to deal with random events.
Random Variables : Examples
• For a fair dice, define random variable X as X(i) = 0, where “i” is the
number dice outcome face number. What is the probability of
random variable X = 0, denoted by P(X = 0) or PX(0)?
• For a fair dice, define random variable Y as Y(i) = 0, if “i” is even and
Y(i) = 1, if “i” is odd. What is the probability of random variable Y = 1?
• For two fair dices, define random variable Z as Z(i, j) = i + j, what is the
probability of random variable z = 3?
Basic Concepts: Joint and Marginal Distributions
• How about more than one RVs at your problem?
Basic Concepts: Conditional Distributions
• They specify the distribution of a random variable when the value of
another random variable is known.
• In other words, when some events are known to be true.
• Suppose we know that a dice throw was odd, and want to know the
probability of an “one” has been thrown. Do you know?
Basic Concepts: Independence
• independence means that the distribution of a random variable does
not change on learning the value of another random variable.
• In machine learning, we often make such assumptions about our
data, for example, training samples are assumed to be drawn
independently from some underlying space.
http://www.statisticshowto.com/probability-and-statistics/hypothesis-testing/
Statistical Hypothesis: quick go through, II
http://www.statisticshowto.com/probability-and-statistics/hypothesis-testing/
Today Lecture
• Probability & Statistics
• Linear Algebra
Basic Concepts and Notations: What is LA
• Linear algebra is the branch of mathematics concerning linear
equations and linear functions (mappings).
• The transpose of a matrix results from “flipping” the rows and columns.
Matrix Properties : Symmetric Matrices
Matrix Properties : Trace
Matrix Properties : Norms
• The norm of a matrix is a length-like measure of a matrix.
Matrix Properties : Linear Independence and Rank
• A set of vectors {x1, x2, . . . xn} is said to be linearly independent if no
vector can be represented as a linear combination of the remaining
vectors.
Another nice property of orthogonal matrices is that operating on a vector with an orthogonal matrix will
not change its Euclidean norm
Matrix Properties : Determinant, I
Absolute value of determinant of a matrix is the n-dim volume spanned by n rows. 1-dim
case: |[a]| = a
http://linear.ups.edu/html/section-PDM.html
Matrix Properties : Quadratic Forms and PD
Matrix Properties : Eigenvalues and Eigenvectors
Matrix Calculations : Gradient
Gradient and Hessian for Quadratic Functions, I
Gradient and Hessian for Quadratic Functions, II
• Linear Algebra :
Basic LA Concepts, Matrix Products, Matrix Properties, Matrix Calculations.
(https://www.quora.com/Books-What-is-the-best-book-for-learning-Linear-
Algebra)
Today Lecture
• Probability & Statistics
• Linear Algebra
• ML Basic Review
Simple Questionnaire
How many people have heard about Machine Learning
Apple
Learning (Training)
What is Model in ML
How Machine Learn
ML Types
• Supervised Learning
• Unsupervised Learning
• Semi-Supervised Learning
• Reinforcement Learning
Supervised Learning
• the correct classes of the training data are known
http://bigdata-madesimple.com/machine-learning-explained-understanding-supervised-unsupervised-and-reinforcement-learning/
Unsupervised Learning
• the correct classes of the training data are not known
http://bigdata-madesimple.com/machine-learning-explained-understanding-supervised-unsupervised-and-reinforcement-learning/
Semi-Supervised Learning
• A Mix of Supervised and Unsupervised learning
Reinforcement Learning
• Learn online based on feedback
http://bigdata-madesimple.com/machine-learning-explained-understanding-supervised-unsupervised-and-reinforcement-learning/
Supervised V.S. Unsupervised
• Supervised:
• Try to predict a specific quantity
• Have training samples with labels
• Can measure accuracy directly
• Unsupervised:
• Try to understand data
• Looking for patterns not for something specified (supervised)
• Evaluation usually indirect or qualitative
• Semi-supervised:
• Using unsupervised methods to improve supervised algs.
• Few labeled samples with lots of unlabeled.
ML Techniques
• classification: assign class from observations
Not a Spam
Auto Driving
https://www.slideshare.net/JunliGu/autonomous-driving-revolution-trends-challenges-and-machine-learning
Content Generation (Your Individual Project)
https://www.boredpanda.com/computer-deep-learning-algorithm-painting-masters/
Why ML are Challenging