Elements of Machine Learning
Elements of Machine Learning
AI Thinking
Elements of ML
Disclaimer
Miami Dade College has adapted the content on the subsequent slides from the
AI for Current Workforce program, which is part of
Intel® Digital Readiness Programs.
Topics
4
Introduction to Machine Learning
Introduction to Machine Learning
Example
Given the history of home sales in a city, you could use machine learning to
create a model that is able to predict the value of a different home in that
same city.
How ML differs from Traditional Programming?
12
History of Machine Learning [2]
Alexey
Ivakhnen
ko and Tin Kam
Arthur Ho Fei-Fei Li
Valentin created
First Samuel publishe
Lapa ImageNet, a
mathemat created d paper
created database of
ical model Checker on
first labelled
of Neural s random
multi- images
Network Progra decision
layer
m perceptro forests
n
199 201
1950 1959 1967 7 6
Machine Learning is a crucial tool in the process of getting insights from massive
datasets held by companies and researchers today.
There are two main reasons for this:
• Scale of data
• Unexpected findings
Why Machine Learning?
• Fraud detection.
• They involve a repeated decision or evaluation which you want to automate and need
consistent results.
• It is challenging and often impossible to explicitly describe the solution or criteria behind
a decision.
• You require labelled data or existing examples, where you can describe the situation and
map it to the correct result.
What is an Algorithm?
Time for Quiz
21
Open Quiz
✔ Statistical
Open Quiz
Machine learning uses large amounts of data and algorithms to perform tasks.
❑ True
❑ False
Open Quiz
❑ 1950
❑ 1956
❑ 1958
❑ 1959
Key Takeaways
26
Reflections
28
Machine Learning Models
Machine Learning Models
• ML Terminologies
• E.g., In email spam detector, the features could include the following:
• words in the email text.
• sender's address.
• time of day, the email was sent.
• email contains the phrase "one weird trick."
Machine Learning Terminologies
• Feature Vector
• E.g.,
• Overfitting
• When a massive amount of data trains a machine learning model, it tends to learn from
the noise and inaccurate data entries.
• It occurs when a model is too simple, which can be a result of a model needing more
training time, more input features, or less regularization.
Now that we understand key
ML Terminologies, let's dive deeper Into the
Machine Learning Process
37
Machine Learning Process
39
Machine Learning Process
Machine learning models are defined
by the presence or absence of human
influence on raw data — whether a
reward is offered, specific feedback is
given, or labels are used.
41
What are different Machine Learning Models?
• Supervised Learning
• Unsupervised Learning
• Reinforcement Learning
What are different Machine Learning Models?
Supervised and Unsupervised Learning
What are the challenges faced by Machine Learning?
• AI impact on jobs
• Public perception around artificial intelligence centers around job loss, this
concern should be probably reframed.
• Privacy
• Data privacy, data protection and data security, are of prime concerns and have
allowed policymakers to make more strides here in recent years.
What are the challenges faced by Machine Learning?
• Accountability
• There isn’t significant legislation to regulate AI practices, there is no real
enforcement mechanism to ensure that ethical AI is practiced.
Models for machine learning. (n.d.). IBM Developer. Retrieved September 28, 2021, from https://developer.ibm.com/articles/cc-models-machine-learning/
Discussion
49
Reflections
51
Introduction to Supervised Learning
Introduction to Supervised Learning
• How it works?
• Applications[hands-on activity/discussion].
• Data is labelled.
• It is used whenever we want to predict a certain outcome from a given input, and we
have examples of input/output pairs.
Classification Problem:
• Binary Classification.
• Distinguishing exactly between two classes.
• E.g., Classifying emails as either spam or not.
• Multiclass Classification
• Classification between more than two classes.
• E.g., Predicting language of a given text.
What is Supervised Learning?
• Regression
• The goal is to predict a continuous number, or real number in mathematical
terms.
• E.g., Predicting a person’s annual income from
• their education,
• their age, and
• where they live.
Supervised Learning Algorithms?
• Predictive analytics
• Logistic regression
• Spam detection
Challenges in Supervised Learning
62
Open Quiz
✔ Supervised Learning
63
Open Quiz
If there is a certain type of continuity in the output, which type of problem it is?
❑ Regression
❑ Classification
64
Open Quiz
Machine learning uses large amounts of data and algorithms to perform the
task.
❑ True
❑ False
65
Key Takeaways
67
Let’s start by understanding what is
Unsupervised Learning.
Introduction to Unsupervised
Learning
Introduction to Unsupervised Learning
• Applications[hands-on activity/discussion].
70
What is Unsupervised Learning?
71
How Unsupervised Learning works?
72
What are different types of Unsupervised Learning?
73
What are different types of Unsupervised Learning?
74
What are different types of Unsupervised Learning?
• Clustering
• Partitioning data into distinct groups of similar items.
• Clustering is the most common unsupervised learning technique.
• It is used for exploratory data analysis to find hidden patterns or groupings in
data.
• Applications for cluster analysis include gene sequence analysis, market
research, and object recognition.
75
Unsupervised Learning Algorithms
• K-means Clustering
• Hierarchical Clustering
• Anomaly Detection
• Apriori Algorithm
76
Unsupervised Learning Applications
• News Sections
• Google News uses unsupervised learning to categorize articles on the
same story from various online news outlets.
• Computer vision
• Unsupervised learning algorithms are used for visual perception tasks,
such as object recognition.
• Anomaly detection
• Unsupervised learning models can comb through large amounts of data
and discover atypical data points within a dataset.
• These anomalies can raise awareness around faulty equipment, human
error, or breaches in security.
77
Unsupervised Learning Applications
● Medical imaging
○ Unsupervised machine learning provides essential features to medical
imaging devices, such as image detection, classification and
segmentation, used in radiology and pathology to diagnose patients
quickly and accurately.
● Customer personas
○ Unsupervised learning allows businesses to build better buyer persona
profiles, enabling organizations to align their product messaging more
appropriately.
● Recommendation Engines
○ Using past purchase behavior data, unsupervised learning can help to
discover data trends that can be used to develop more effective cross-
selling strategies.
78
Challenges in Unsupervised Learning
Supervised Unsupervised
Useful for solving problems that rely on Useful for finding unknown patterns
past trends for example the price of within data from an experimental
an item. device.
81
Open Quiz
✔ Unsupervised Learning
82
Open Quiz
83
Open Quiz
❑ True
❑ False
84
Key Takeaways
86
Reflections
87
Now let's get started with
Reinforcement Learning!
Introduction to Reinforcement
Learning
Introduction to Reinforcement Learning
90
What is Reinforcement Learning?
91
Let's take a step back and
understand this with an analogy !
Rat In a Maze
• State
• Agent
• Action
• Reward
• Punishment
What do you think that each of these terms depicts in Rat in a Maze game?
94
Let us understand these term with our analogy:
● State: This term signifies the current position of the rat in the maze. It can be
any random position in the maze.
● Agent: Our agent over here is the rat itself.
● Action: The action rat must take to move in the correct direction of the
cheese.
● Reward: The reward is delicious cheese.
● Punishment: The punishment can be the rat not getting the cheese at all.
● Environment: Maze with random paths.
95
Let's try to understand how this works with the help
of Pac-man!
96
Now as we have an idea about
Reinforcement Learning, lets dive a
bit deeper and understand
Q-Learning- a model free
Reinforcement Learning Algorithm.
What is Q – Learning ?
• The Q-learning algorithm can now smartly decide what action to take in which
situation.
• Using our analogy we can say, now the rat just got smarter and now can figure
out the location of the cheese in any maze.
98
How is Q-Learning different from Reinforcement
Learning?
• It notes what actions are going to maximize the reward and what actions are not
helping to fetch the reward. This is the unique part of Q-Learning.
• If the rat uses Q-learning to fetch the cheese, it will choose the shortest
path ,which will result in getting the cheese in the shortest time.
99
Discussion
100
Key Takeaways
102
Let’s understanding how ML
differs from Deep Learning and
AI
AI vs ML vs DL
Artificial Intelligence Vs Machine Learning Vs Deep
Learning
• AI Vs ML Vs DL.
• Why DL?
• DL Applications.
• Applications[hands-on activity/discussion].
• Challenges.
105
What is Deep Learning?
• The term “deep” refers to the number of layers in the network—the more
layers, the deeper the network.
106
What is Neural Network?
• Neural networks are loosely modelled after how neurons in the brain
behave.
• It is useful when solving problems for which the dataset is very large.
107
What is Neural Network Architecture?
108
Artificial Intelligence Vs Machine Learning Vs Deep
Learning
109
Machine Learning vs DL?
110
ML vs DL
• Feature Engineering
• E.g., the roundness of the face or the distance between the eyes.
111
ML vs DL
How DL works?
• Given enough “labelled data” (i.e., images of known faces) and the right
tuning.
• Deep Learning model will identify the most relevant features from the data
on its own.
112
Deep Learning Applications
113
Deep learning represents a conceptual
shift in thinking, from
"How do you engineer the best features?"
to
"How do you guide the model toward
discovering the best features?”
114
Bibliography
• Education, I. C. (2021, August 12). Machine Learning. IBM.
https://www.ibm.com/cloud/learn/machine-learning?mhsrc=ibmsearch_a&mhq=machine%20learning
• Label Your Data. (2020, July 6). The History of Machine Learning: How Did It All Start? Label Your Data Team.
https://labelyourdata.com/articles/history-of-machine-learning-how-did-it-all-start
• The Difference Between Artificial Intelligence, Machine Learning and Deep Learning. (n.d.). Intel. Retrieved September 28, 2021, from
https://www.intel.com/content/www/us/en/artificial-intelligence/posts/difference-between-ai-machine-learning-deep-learning.html
• Parthasarathy, S. (2019, April 22). Difference between Traditional programming versus Machine Learning from a PM perspective.
Medium.
https://productcoalition.com/difference-between-traditional-programming-versus-machine-learning-from-a-pm-perspective-3802b02bc7f
6
• GeeksforGeeks. (2020, April 11). Top 10 Apps Using Machine Learning in 2020.
https://www.geeksforgeeks.org/top-10-apps-using-machine-learning-in-2020/
• Replika. (n.d.). Replika.Com. Retrieved September 30, 2021, from https://replika.ai/
• Video Source: What is Machine Learning? (2018, February 22). [Video]. YouTube. https://www.youtube.com/watch?v=QghjaS0WQQU
• What Is Machine Learning? - I School Online. (2021, January 29). UCB-UMT.
https://ischoolonline.berkeley.edu/blog/what-is-machine-learning/
• N. (n.d.). What Is Machine Learning - ML - and Why Is It Important? | NetApp. NetApp. Retrieved September 30, 2021, from
https://www.netapp.com/artificial-intelligence/what-is-machine-learning/
• What is a machine learning model? (2021, May 24). Microsoft Docs.
https://docs.microsoft.com/en-us/windows/ai/windows-ml/what-is-a-machine-learning-model
115
Bibliography
• Framing: Key ML Terminology | Machine Learning Crash Course. (n.d.). Google Developers. Retrieved September 28, 2021, from
https://developers.google.com/machine-learning/crash-course/framing/ml-terminology
• DataRobot. (2021, September 27). Prediction | DataRobot Artificial Intelligence Wiki. DataRobot | AI Cloud.
https://www.datarobot.com/wiki/prediction/
• Education, I. C. (2021a, March 25). Underfitting. IBM. https://www.ibm.com/cloud/learn/underfitting
• Advani, V. (2021, June 10). What is Machine Learning? How Machine Learning Works and future of it? GreatLearning Blog: Free Resources
What Matters to Shape Your Career! https://www.mygreatlearning.com/blog/what-is-machine-learning/
• Advani, V. (2021, June 10). What is Machine Learning? How Machine Learning Works and future of it? GreatLearning Blog: Free Resources
What Matters to Shape Your Career! https://www.mygreatlearning.com/blog/what-is-machine-learning/
• Models for machine learning. (n.d.). IBM Developer. Retrieved September 28, 2021, from
https://developer.ibm.com/articles/cc-models-machine-learning/
• What Is Machine Learning? | How It Works, Techniques & Applications. (n.d.). Mathworks. Retrieved September 29, 2021, from
https://in.mathworks.com/discovery/machine-learning.html
• Models for machine learning. (n.d.). IBM Developer. Retrieved September 28, 2021, from
https://developer.ibm.com/articles/cc-models-machine-learning/
• Muller, A. C., & Guido, S. (2017). Introduction to Machine Learning with Python (First Edition) [E-book]. O’Reilly Media,Inc.
• C. (n.d.-a). Supervised And Unsupervised Machine Learning. Finxter. Retrieved October 1, 2021, from
https://blog.finxter.com/supervised-and-unsupervised-machine-learning/
• Video Source: Object recognition- https://www.youtube.com/watch?v=i0yqhHKWY0A
• Spam detection: https://www.youtube.com/watch?v=_iOxylrN4Io
116