Lecture 1 - Introduction
Lecture 1 - Introduction
2
About me
• Dharshana Kasthurirathna
• Main building, 6th floor, Malabe SLIIT campus
• dharshana.k@sliit.lk
Agenda
• Why ML?
• Introduction to ML
4
About
• Subfield of Artificial Intelligence (AI)/Application of optimization
5
Why now?
• Flood of available data (especially with the
advent of the Internet)
• Increasing computational power (e.g. Multi-
core)
• Growing progress in available algorithms and
theory developed by researchers
• Increasing support from industries
• Cloud computing
6
In other words…
7
ML vs Traditional programming
Traditional Programming
Data
Computer Output
Program
Data
Computer Program
Output
8
Motivating Example
Learning to Filter Spam
Model Model
Learning Testin
g
11
The Learning Process in our Example
Model Model
Learning Testin
g
● Number of recipients
● Size of message
● Number of attachments
● Number of "re's" in the
subject line
Email Server …
12
Data Set
Target
Input Attributes
Attribute
Learner Classifier
Database
Inducer Classification Model
Training Set
Induction Algorithm
14
Model Testing
Database Learner
Training Set Inducer
Classifier
Induction Algorithm
Classification Model
15
Workflow
16
Categories
• Supervised Learning
• Unsupervised Learning
• Reinforcement Learning
• Semi-Supervised Learning
• Self-supervised learning
• Bayesian learning
17
Use-Cases
• Spam Email Detection (Classification)
• Image Search (Similarity/Classification)
• Clustering (KMeans) : Amazon
Recommendations
• Autonomous driving/flying : Reinforcement
learning
continued…
18
Supervised Learning (Classification)
• the correct classes (labels) of the training data
are known
Credit: http://us.hudson.com/legal/blog/postid/513/predictive-analytics-artificial-intelligence-science-fiction-e-discovery-truth 19
Supervised learning examples
22
Linear regression
“Predictor”:
40
Evaluate line:
Target y
return r
20
0
0 10 20
Feature x
Credit: http://us.hudson.com/legal/blog/postid/513/predictive-analytics-artificial-intelligence-science-fiction-e-discovery-truth 25
Unsupervised learning examples
27
K-means clustering example
28
Reinforcement Learning
• Allows the machine or software agent to learn its behavior
based on feedback from the environment.
• This behavior can be learnt once and for all, or keep on
adapting as time goes by.
Credit: http://us.hudson.com/legal/blog/postid/513/predictive-analytics-artificial-intelligence-science-fiction-e-discovery-truth 29
Reinforcement learning
Credit: http://us.hudson.com/legal/blog/postid/513/predictive-analytics-artificial-intelligence-science-fiction-e-discovery-truth 32
Semi-supervised learning
34
Bayesian learning
36
Deep Learning
• ML vs DL
37
Dimensionality Reduction - Challenges
40
Machine learning on Big Data and GPGPU computing
43
Commonly used python libraries
• NumPy
- Matrix algebra
• Pandas
- Data Frames, Series
• Matpotlib
- Visualization
44
GPT
• https://dida.do/blog/chatgpt-reinforcement-le
arning
• https://arxiv.org/pdf/2203.02155.pdf
45
Resources
• Coursera – Andrew Ng. Machine Learning
• Udacity – Intro to Machine Learning,
Reinforcement Learning
• Python Machine Learning – Sebastian Raschka
• Advance Machine Learning with Python – John
Hearty
• Machine Learning – Tom Mitchell
• Many more!!!
46
Resources
• Python
• https://www.youtube.com/watch?v=LHBE6Q9
XlzI&t=81s
• https://www.youtube.com/watch?v=r-uOLxNr
Nk8
• Mathematics
• https://www.youtube.com/watch?v=0z6AhrO
SrRs
47
Textbooks
• Pattern Recognition and Machine Lea
rning - Bishop
• Machine Learning – A probabilistic perspectiv
e – Murphy
• Deep Learning – Ian Goodfellow
• Elements of Statistical Learning – Hastie
• Reinforcement Learning – An Introduction – S
utton
-
http://incompleteideas.net/book/RLbook2020
.pdf 48
Questions ?
49