L01-intro_slides
L01-intro_slides
Sebastian Raschka
http://stat.wisc.edu/~sraschka/teaching
Lecture 01
1. Course overview
2. What is machine learning?
3. The broad categories of ML
4. The supervised learning work ow
5. Necessary ML notation and jargon
6. About the practical aspects and tools
◦ 5% Project proposal
Should be activated by
default, but please
double-check
Machine Learning
Deep Learning
AI
Narrow AI:
solving a particular task (playing a game, driving a car, ...)
Machine Learning
Deep Learning
AI
Machine Learning
Deep Learning
AI
E.g.,
generalized linear models,
tree-based methods,
"shallow" networks,
E.g., symbolic expressions, support vector machines,
logic rules / "handcrafted" nearest neighbors, ...
nested if-else programming Main focus of the course
statements ...
Machine Learning
Deep Learning
AI
Machine Learning
Deep Learning
AI
Source: http://yann.lecun.com/exdb/lenet/
Sebastian Raschka STAT 453: Intro to Deep Learning 24
ffi
Some Applications Of Machine Learning/Deep Learning
1. Course overview
2. What is machine learning?
3. The broad categories of ML
4. The supervised learning work ow
5. Necessary ML notation and jargon
6. About the practical aspects and tools
Labeled data
Supervised Learning Direct feedback
Predict outcome/future
No labels/targets
Unsupervised Learning No feedback
Find hidden structure in data
Decision process
Reinforcement Learning Reward system
Learn series of actions
Source: Raschka and Mirjalily (2019). Python Machine Learning, 3rd Edition
Sebastian Raschka STAT 453: Intro to Deep Learning 27
Supervised Learning Is The Largest Subcategory
Labeled data
Supervised Learning Direct feedback
Predict outcome/future
Source: Raschka and Mirjalily (2019). Python Machine Learning, 3rd Edition
No labels/targets
Unsupervised Learning No feedback
Find hidden structure in data
Decision process
Reinforcement Learning
Sebastian Raschka
Reward system
STAT 453: Intro to Deep Learning 28
Supervised Learning 1: Regression
target y
(dependent variable,
output)
x
feature (input, observation)
Source: Raschka and Mirjalili (2019). Python Machine Learning, 3rd Edition
Sebastian Raschka STAT 453: Intro to Deep Learning 29
Supervised Learning 2: Classi cation
Binary classi cation example with two features ("independent" variables, predictors)
x2
x1
Source: Raschka and Mirjalily (2019). Python Machine Learning, 3rd Edition
Sebastian Raschka STAT 453: Intro to Deep Learning 30
fi
fi
Supervised Learning 3: Ordinal regression
Order dependence like in metric regression, discrete values like in classi cation,
but no metric distance but order dependence
rK ≻ rK−1 ≻ . . . ≻ r1
E.g., movie ratings: great ≻ good ≻ okay ≻ for genre fans ≻ bad
≻ ≻
Labeled data
Supervised Learning Direct feedback
Predict outcome/future
No labels/targets
Unsupervised Learning No feedback
Find hidden structure in data
Decision process
Reinforcement Learning Reward system
Learn series of actions
Source: Raschka and Mirjalily (2019). Python Machine Learning, 3rd Edition
Sebastian Raschka STAT 453: Intro to Deep Learning 34
Unsupervised Learning 1:
Representation Learning/Dimensionality Reduction
x2
PC
2
PC PC1
PC2 1
PC2 PC1
x2
x1
PC1
E.g., Autoencoders
Encoder Decoder
Source: https://3.bp.blogspot.com/-OUd11VBJNAM/
VsFacR_YhBI/AAAAAAAABh0/ZKfKAnRj3x0/s1600/
cannot%2Bresist.jpg
latent representation/
feature embedding
x= Network p(y=cat)
Source: https://3.bp.blogspot.com/-OUd11VBJNAM/
VsFacR_YhBI/AAAAAAAABh0/ZKfKAnRj3x0/s1600/
cannot%2Bresist.jpg
y = Cat
x2
x1
Source: Raschka and Mirjalily (2019). Python Machine Learning, 3rd Edition
Sebastian Raschka STAT 453: Intro to Deep Learning 38
Reinforcement Learning:
The third subcategory of ML (and DL)
AI-based GPCR bioactive ligand discovery
1 2
Agent
Action
State: At
St
Reward:
Rt
CH3
Rt+1
Environment
St+1
CH3 3
Figure 5: Representation of the basic reinforcement learning paradigm with a simple molecular example. (1) Given a
benzene ring (state St at iteration t) and some reward value Rt at iteration t, (2) the agent selects an action At that adds
a methyl group to the benzene ring. (3) The environment considers this information for producing the next state (St+1 )
and reward (Rt+1 ). This cycle repeats until the episode is terminated.
Vinyals, Oriol, Timo Ewalds, Sergey Bartunov, Petko Georgiev, Alexander Sasha
Vezhnevets, Michelle Yeo, Alireza Makhzani et al. "Starcraft II: A new challenge for
reinforcement learning." arXiv preprint arXiv:1708.04782 (2017).
Illustration of semi-supervised learning incorporating unlabeled examples. (A) A decision boundary derived
from the labeled training examples only. (B) A decision boundary based on both labeled and unlabeled
examples.
Self-supervised learning via context prediction. (A) A random patch is sampled (red square) along with 9
neighboring patches. (B) Given the random patch and a random neighbor patch, the task is to predict
the position of the neighboring patch relative to the center patch (red square).
1. Course overview
2. What is machine learning?
3. The broad categories of ML
4. The supervised learning work ow
5. Necessary ML notation and jargon
6. About the practical aspects and tools
1 Training
New
Observations
Feature
Feature
Extraction
Observations Extraction
Training Dataset
Predicted Labels
fl
Using a test dataset to evaluate the performance of a
predictive model
New
Observations Observations
Observations
Feature
Extraction
Labels
Model
Image source: Stevens et al., Deep Learning with PyTorch. Manning, 2020
Image source: Stevens et al., Deep Learning with PyTorch. Manning, 2020
1. Course overview
2. What is machine learning?
3. The broad categories of ML
4. The supervised learning work ow
5. Necessary ML notation and jargon
6. About the practical aspects and tools
• supervised learning:
learn function to map input x (features) to
output y (targets)
• structured data:
databases, spreadsheets/csv les
• unstructured data:
features like image pixels, audio signals,
text sentences
(before DL, extensive feature engineering Source: http://rasbt.github.io/mlxtend/
user_guide/image/extract_face_landmarks/
was required)
"training examples"
[i] [i]
Training set: = {⟨x , y ⟩, i = 1,… , n},
Unknown function: f(x) = y
sometimes t or o
Hypothesis: h(x) = ŷ
m m
h:ℝ → , = {1,...,k} h:ℝ →ℝ
𝒟
𝒴
𝒴
Sebastian Raschka STAT 453: Intro to Deep Learning 53
fi
Data Representation
x1
x2
x=
⋮
xm
Feature vector
m= _____
n= _____
"traditional methods"
Source:
https://thegradient.pub/state-of-ml-frameworks-2019-pytorch-dominates-research-tensor ow-dominates-industry/
Source:
https://thegradient.pub/state-of-ml-frameworks-2019-pytorch-dominates-research-tensor ow-dominates-industry/
https://code.visualstudio.com
https://github.com/rasbt/stat453-deep-learning-ss21/tree/main/L01/code