Introduction to Machine
Learning
Adama Science and Technology University
School of Electrical Engineering and Computing
Department of CSE
Dr. Mesfin Abebe Haile (2020)
Outline
Why Machine Learning (ML)?
Examples of ML applications
Related to the course
Major classes of ML Algorithms
ML Vs AI
Questions about ML
11/07/22 2
Why Machine Learning ?
It is very hard to write programs that solve complex problem.
(Defining the requirements)
Computing the probability of a credit card transaction is
fraudulent.
Recognizing a three-dimensional objects.
We don’t know what program to write because we don’t know
how its done in our brain. (tacit knowledge not explicit)
Even if we had a good idea about how to do it, the program
might be terribly complicated.
11/07/22 3
Why Machine Learning ?
There may not be rules that are both simple and reliable.
We need to combine a very large number of weak rules.
May be the rules are changing frequently (dynamic)?
E.g. Fraud is a moving target .
The program needs to keep changing.
11/07/22 4
Why Machine Learning ?
The program produced by the learning algorithm my look very
different from a typical hand-written program.
If we do it right, the program works for new cases as well as
the ones we trained it on.
If the data changes the program can change too by training on
the new data.
Massive amount of computation are now cheaper than paying
someone to write a task-specific program.
11/07/22 5
Why Machine Learning ?
Instead of writing a program by hand for each specific
task, we collect lots of examples that specify the correct
output for a given input.
A machine learning algorithm then takes these examples
and produces a program that does the job.
11/07/22 6
What is Machine Learning ?
Machine Learning: is a field of study that gives computers the
ability to learn without being explicitly programmed. (Arthur
Samuel – 1959)
A computer program is said to learn from experience E with
respect to some class of task T and performance measure P, if
its performance at task in T, as measured by P, improves with
experience E. (Tom Mitchell – 1998)
11/07/22 7
What is Machine Learning ?
What is ML: building computational artifacts that learn over
time based on experience.
It includes:
The mathematics behind it
The science behind it (systematic and logical approach,
knowledge base on demonstrable)
The engineering behind it (the application of mathematics and
science)
The computing behind it (using computer technology)
11/07/22 8
Examples of ML Application
Some examples of tasks best solved by learning algorithms.
Recognizing patterns:
Object in real scenes
Facial identities or facial expressions
Spoken words
Recognizing anomalies:
Unusual sequences of credit card transactions
Unusual patterns of sensor readings in a nuclear power plant
Prediction:
Future stock price or currency exchange rates
Which movies will a person like?
11/07/22 9
Examples of ML Application
Some application of ML in Google:
Page ranking (RankBrain)
Spam identification in email
Speech recognition (language recognition)
Software in Cars (Autonomous and self driving cars)
Recommender system
Google voice search
Gmail inbox’s smart replay
Google photos
Google Cloud Vision API
Virtual reality etc…
11/07/22 10
ML related to this Course
The course can be:
More of theoretical :
More of practical:
Balancing the theory and the application
11/07/22 11
ML related to this Course
Some prerequisite :
Programming (python, matlab, R etc…)
Probability and Statistics;
Mathematics (Linear Algebra, Matrix, Vector, differential
calculus, and integral calculus)
Curiosity of working with data etc… (most importantly)
ML – it is all about learning from examples (data).
We take features (independent attributes) and produced labels
(dependent attribute).
11/07/22 12
Learning Path
Generally, the learning path includes:
Math skills
Programming skills
Data Engineering skills
Machine learning algorithms
Machine learning frameworks
11/07/22 13
Learning Path
Generally, the learning path includes: Math skills
11/07/22 14
Learning Path
Generally, the learning path includes: Programming skills
11/07/22 15
Learning Path
Generally, the learning path includes: Data Engineering skills
11/07/22 16
Learning Path
Generally, the learning path includes: ML algorithms
11/07/22 17
Learning Path
Generally, the learning path includes: ML Framework
11/07/22 18
Major Classes of ML Algorithms
11/07/22 19
Supervised Learning
11/07/22 20
Supervised Learning
11/07/22 21
Supervised Learning
Supervised learning: (function approximation) [labels data
well]
Input 1 2 3 4 5 6 9
Output 1 4 9 16 25 36 ?
output <- input2
Learn to predict an output when given an input vector.
E.g.: Features: age, gander, smoking, drinking etc…
Labels : having the disease , does not have the disease
11/07/22 22
Supervised Learning
Supervised Learning:
Regression Problem: numerical / continuous value.
Given some data, you assume that those values come from some
sort of function and try to find out what the function is.
It is a problem of function approximation or interpolation.
Classification Problem: nominal / discrete value.
Grouping the data into predetermined classes.
11/07/22 23
Supervised Learning
Supervised learning: making predictions using data.
Example : is a given email “spam” or “ham”.
There is an outcome; we are trying to predict.
Classification
11/07/22 24
Unsupervised Learning
Unsupervised learning :
Unsupervised (concise description) [cluster scores well]
The aim of unsupervised learning is to find clusters of
similar inputs in the data without being explicitly told that some
data points belong to one class and the other in other classes.
The algorithm has to discover this similarity by itself.
Discover a good internal representation of the input.
11/07/22 25
Unsupervised Learning
11/07/22 26
Unsupervised Learning
11/07/22 27
Unsupervised Learning
Unsupervised learning: extracting structure from data.
Example: segment grocery store shopper into clusters that exhibit
similar behaviors.
There is no “right answer”
Clustering
11/07/22 28
Reinforcement Learning
Reinforcement learning :
Reinforcement (stimulus/state, action, reward) [behavior scores
well] – reward maximization.
The algorithm searches over the state space of possible inputs and
outputs in order to maximize a reward.
Learn to select an action to maximize payoff.
11/07/22 29
Reinforcement Learning
11/07/22 30
Machine Learning Vs AI
Machine learning : is more of induction (from specific to
generalization)
Abebe is mortal, Almaz is mortal
Kebede is mortal,
Then, all humans are mortal
Artificial Intelligence: more of deduction (from general to
specific – reasoning )
A implies B
Having “A”, you can infer “B”
11/07/22 31
Machine Learning Vs AI
Machine learning can be:
Unsupervised (description) -> summaries -> Supervised (function
approximation) -> Labels
Data is the key in ML:
The difference b/n solving a problem as AI or ML person is:
As a AI person: the algorithm is central
As a ML person: the data is central (get the priority)
11/07/22 32
Machine Learning Application
Machine learning can be applied:
What are the serious of steps I need to do in order to solve some
problem?
If I tried to describe this problem in a particular way, is it
solvable?
11/07/22 33
Machine Learning
What is Machine Learning?
Machine learning is the semi-automated extraction of knowledge
from data?
Knowledge from data: Starts with a question that might be
answerable using data.
Automated extraction: A computer provides the insight.
Semi-automated: Requires many smart decisions by a human.
11/07/22 34
Machine Learning
How does ML “work”?
High-level steps of supervised learning:
First, train a machine learning model using labeled data.
“Labeled data” has been labeled with the outcome.
“ML model” learns the relationship b/n the attributes of the data and
its outcome.
Then, make predictions on new data for which the label is
unknown.
Example: segment grocery store shopper into clusters that exhibit
similar behaviors.
11/07/22 35
Machine Learning
Questions about ML?
How do I choose which attributes of my data to include in the
model?
How do I choose which model to use?
How do I optimize the model for best performance?
How do I ensure that I’m building a model that will generalize to
unseen data?
Can I estimate how well my model is likely to perform on unseen
data?
11/07/22 36
Question & Answer
11/07/22 37
Thank You !!!
11/07/22 38