introduction to machine learning (and notation)
TRANSCRIPT
Introduction to Machine Learning (and Notation)
David I. InouyeTuesday, September 7, 2021
David I. Inouye Introduction to Machine Learning 0
Outline
â¸Supervised learningâ¸Regressionâ¸Classification
â¸Unsupervised learningâ¸Dimensionality reduction (PCA)â¸Clusteringâ¸Generative models
â¸Other key conceptsâ¸Generalizationâ¸Curse of dimensionalityâ¸No free lunch theorem
David I. Inouye Introduction to Machine Learning 1
The goal of supervised learning is to estimate a mapping (or function) between input and output
David I. Inouye Introduction to Machine Learning 2
Inputđ
OutputđŚ
Mappingđ
The goal of supervised learning is to estimate a mapping (or function) between input and outputgiven only input-output examples
David I. Inouye Introduction to Machine Learning 3
Inputđ
OutputđŚ?
The set of input-output pairs is called a training set,denoted by đ = đ! , đŚ! !"#
$
â¸Input đ!â¸Called features (ML), attributes, or covariates (Stats).
Sometimes just variables.â¸Can be numeric, categorical, discrete, or nominal.â¸Examples
â¸[height, weight, age, gender]â¸[đĽ!, đĽ", ⯠, đĽ#] â A d-dimensional vector of numbersâ¸Imageâ¸Email message
â¸Output đŚ!â¸Called output, response, or target (or label)â¸Real-valued/numeric output: e.g., đŚ& â ââ¸Categorical, discrete, or nominal output: đŚ& from finite
set, i.e., đŚ& â {1,2,⯠, đ}
David I. Inouye Introduction to Machine Learning 4
If the output đŚ! is numeric, then the problem is known as regression
â¸Given height đĽ!, predict age đŚ!â¸Predict GPA given SAT scoreâ¸Predict SAT score given GPAâ¸Predict GRE given SAT and GPA
David I. Inouye Introduction to Machine Learning 5
NOTE: Input đĽ does not have to be numeric. Only the output đŚ must be numeric.
If output is categorical, then the problem is known as classification
â¸Given height đĽ, predict âmaleâ (đŚ = 0) or âfemaleâ (đŚ = 1)
â¸Given salary đĽ" and mortgage payment đĽ#, predict defaulting on loan (âyesâ or ânoâ)
David I. Inouye Introduction to Machine Learning 6
The goal of unsupervised learning is to model or understand the input data directly
David I. Inouye Introduction to Machine Learning 7
Inputđ
??? â¸Dimensionality reduction
â¸Clustering
â¸Generative modelsâWhat I cannot create I do not understandââ Richard Feynman
In unsupervised learning, the training set is only a set of input values đ = đ! !"#$
â¸[Dimensionality reduction] Estimate a single number that summarizes all variables of wealth (e.g. credit score)
â¸[Clustering] Estimate natural groups of customers
â¸[Generative Models] Estimate the distribution of normal transactions to detect fraud (anomalies)
David I. Inouye Introduction to Machine Learning 8
Given this dataset, should we use supervised or unsupervised learning?
David I. Inouye Introduction to Machine Learning 9
đ features/attributes/covariates
đ samples/observations/examples
yes no
Adapted from Machine Learning: A Probabilistic Perspective, Ch. 1, Kevin P. Murphy, 2012.
Color Shape Size (cm) Is it good?
Blue Square 10 yes
Red Ellipse 2.4 yes
Red Ellipse 20.7 no
The dataset cannot determine the task,rather the context determines the task
David I. Inouye Introduction to Machine Learning 10
đ features/attributes/covariates
đ samples/observations/examples
yes no
Adapted from Machine Learning: A Probabilistic Perspective, Ch. 1, Kevin P. Murphy, 2012.
Color Shape Size (cm) Is it good?
Blue Square 10 yes
Red Ellipse 2.4 yes
Red Ellipse 20.7 no
Generalization beyond the training set is the main goal of learning
David I. Inouye Introduction to Machine Learning 11
đ features/attributes/covariates
đ samples/observations/examples
yes no
Example from Machine Learning: A Probabilistic Perspective, Ch. 1, Kevin P. Murphy, 2012.
đĽ!đĽ"
đŚ!đŚ"
Color Shape Size (cm) Is it good?
Blue Square 10 yes
Red Ellipse 2.4 yes
Red Ellipse 20.7 no
Generalization beyond the training set is the main goal of learning
David I. Inouye Introduction to Machine Learning 12
Original source for figure unknown.
What does generalization look like for unsupervised learning?
â¸Generalization in dimensionality reduction
â¸Generalization in generative models can be understood through the view of log likelihood.
David I. Inouye Introduction to Machine Learning 13
The curse of dimensionality is unintuitiveExample: Most space is in the âcornersâ
â¸Ratio between unit hypersphere to unit hypercubeâ¸1D : 2/2 = 1â¸2D : #
$= 0.7854
â¸3D : !"#
%= 0.5238
â¸d-dimensions: đ& đ = ##$
' #$()
đ&
â¸Thus, for 10-D: 2.55/2^10 = 2.55/1024 = 0.00249
David I. Inouye Introduction to Machine Learning 14
The curse of dimensionality is unintuitiveThe number of points in ½ cube is very small
David I. Inouye Introduction to Machine Learning 15
https://eranraviv.com/curse-of-dimensionality/
The curse of dimensionality is unintuitiveExample: Need edge length to be 0.9 to capture 1/2 data samples in 10 dimensions
David I. Inouye Introduction to Machine Learning 16
From Machine Learning: A Probabilistic Perspective, Kevin Murphy, 2012.
The âblessingâ of dimensionality(more data generally doesnât hurt if you can ignore)
David I. Inouye Introduction to Machine Learning 17
https://www.hackerearth.com/blog/developers/simple-tutorial-svm-parameter-tuning-python-r/