0% found this document useful (0 votes)
3 views92 pages

Road Map For Building Machine Learning System

The document provides an overview of machine learning, defining it as a subset of artificial intelligence focused on developing algorithms that allow computers to learn from data and improve performance. It discusses various applications of machine learning, including social media, product recommendations, image recognition, and healthcare efficiency, highlighting its growing importance in modern technology. Additionally, it outlines different types of machine learning, such as supervised, unsupervised, and reinforcement learning.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views92 pages

Road Map For Building Machine Learning System

The document provides an overview of machine learning, defining it as a subset of artificial intelligence focused on developing algorithms that allow computers to learn from data and improve performance. It discusses various applications of machine learning, including social media, product recommendations, image recognition, and healthcare efficiency, highlighting its growing importance in modern technology. Additionally, it outlines different types of machine learning, such as supervised, unsupervised, and reinforcement learning.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

FUNDAMENTAL OF MACHINE LEARNING

PREPARED BY: ABDUL JALIL NIAZAI


Agenda
Introduction
 A friendly Introduction to machine
learning
 What is Machine learning
 What is Learning
 Machine learning discipline
 How does Machine learning work?

Application of machine learning


Type of machine learning

PREPARED BY: ABDUL JALIL NIAZAI


PREPARED BY: ABDUL JALIL NIAZAI
What is Machine Learning?

Data
Learn from Experience Learn from Experience Follow Instructions

PREPARED BY: ABDUL JALIL NIAZAI


What is Machine Learning?

 In the real world, we are surrounded by humans


who can learn everything from their experiences
with their learning capability, and we have
computers or machines which work on our
instructions.
 But can a machine also learn from experiences or
past data like a human does?
 So here comes the role of Machine Learning.

PREPARED BY: ABDUL JALIL NIAZAI


What is Machine Learning?

 Machine Learning is said as a subset of artificial intelligence that is mainly concerned with the
development of algorithms which allow a computer to learn from the data and past experiences on
their own.
 The term machine learning was first introduced by Arthur Samuel in 1959. We can define it in a
summarized way as:

“ Machine learning enables a machine to automatically learn from data, improve performance from
experiences, and predict things without being explicitly programmed.”

PREPARED BY: ABDUL JALIL NIAZAI


What is Machine Learning?

 With the help of sample historical data, which is known as training data, machine learning
algorithms build a mathematical model that helps in making predictions or decisions without being
explicitly programmed.
 A machine has the ability to learn if it can improve its performance by gaining more data.

PREPARED BY: ABDUL JALIL NIAZAI


What is Learning?

 Herbert Simon: “Learning is any process by which


a system improves performance from experience.”

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning

 Building Intelligent Machines to Transform


data into Knowledge.

 In this age of modern technology there is one resource that we have in abundance:
 Large amount of structured and unstructured data.

 Machine learning evolved as subfield of artificial intelligence that involved:


 Development of self-learning algorithms to gain knowledge from that data.
 To make prediction.
 Instead of requiring humans to manually derive rules and build model from large
amount of data

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Disciplines

 Machine learning is broad


field constituted of the
following Six main
disciplines

PREPARED BY: ABDUL JALIL NIAZAI


Prominent Applications of Machine
Learning

 Though it is impossible to list every use case of machine learning, a survey of recent
success stories includes several prominent applications:
 Identification of unwanted spam messages in e-mail
 Segmentation of customer behavior for targeted advertising
 Forecasts of weather behavior and long-term climate changes
 Reduction of fraudulent credit card transactions
 Actuarial estimates of financial damage of storms and natural disasters
 Prediction of popular election outcomes
 Development of algorithms for auto-piloting drones and self-driving cars
 Optimization of energy use in homes and office buildings
 Projection of areas where criminal activity is most likely
 Discovery of genetic sequences linked to diseases

PREPARED BY: ABDUL JALIL NIAZAI


Application of Machine Learning

 Social Media
Social media platforms use machine learning
algorithms and approaches to create some
attractive and excellent features.
For instance, Facebook notices and records
your activities, chats, likes, and comments,
and the time you spend on specific kinds of
posts.
Machine learning learns from your own
experience and makes friends and page
suggestions for your profile.

PREPARED BY: ABDUL JALIL NIAZAI


Application of Machine Learning

 Product Recommendations
Product recommendation is one of the most popular and known applications of
machine learning. Product recommendation is one of the stark features of almost every
e-commerce website today, which is an advanced application of machine learning
techniques.
Using machine learning and AI, websites track your behavior based on your previous
purchases, searching patterns, and cart history, and then make product
recommendations.

PREPARED BY: ABDUL JALIL NIAZAI


Application of Machine Learning

 Image Recognition
Image recognition, which is an approach
for cataloging and detecting a feature or
an object in the digital image, is one of
the most significant and notable machine
learning and AI techniques. This
technique is being adopted for further
analysis, such as pattern recognition, face
detection, and face recognition.

PREPARED BY: ABDUL JALIL NIAZAI


Application of Machine Learning

 Image Recognition
Sentiment analysis is one of the most necessary
applications of machine learning. Sentiment
analysis is a real-time machine learning
application that determines the emotion or
opinion of the speaker or the writer.
For instance, if someone has written a review or
email (or any form of a document), a sentiment
analyzer will instantly find out the actual thought
and tone of the text. This sentiment analysis
application can be used to analyze a review
based website, decision-making applications, etc.

PREPARED BY: ABDUL JALIL NIAZAI


Application of Machine Learning

 Automating Employee Access Control

Organizations are actively implementing


machine learning algorithms to determine the
level of access employees would need in various
areas, depending on their job profiles. This is one
of the coolest applications of machine learning.

PREPARED BY: ABDUL JALIL NIAZAI


Application of Machine Learning

 Regulating Healthcare Efficiency and Medical Services

Significant healthcare sectors are actively looking at using machine learning


algorithms to manage better. They predict the waiting times of patients in the
emergency waiting rooms across various departments of hospitals.

The models use vital factors that help define the algorithm, details of staff at
various times of day, records of patients, and complete logs of department chats
and the layout of emergency rooms. Machine learning algorithms also come to
play when detecting a disease, therapy planning, and prediction of the disease
situation. This is one of the most necessary machine learning applications.

PREPARED BY: ABDUL JALIL NIAZAI


Application of Machine Learning

 Predict Potential Heart Failure  Banking Domain

An algorithm designed to scan a doctor’s Banks are now using the latest advanced
free-form e-notes and identify patterns in a technology machine learning has to offer to
patient’s cardiovascular history is making help prevent fraud and protect accounts
waves in medicine. from hackers.

Instead of a physician digging through The algorithms determine what factors to


multiple health records to arrive at a sound consider to create a filter to keep harm at
diagnosis, redundancy is now reduced with bay. Various sites that are unauthentic will
computers making an analysis based on be automatically filtered out and restricted
available information. from initiating transactions.

PREPARED BY: ABDUL JALIL NIAZAI


Application of Machine Learning

 Language Translation

 One of the most common machine learning applications is language translation.


Machine learning plays a significant role in the translation of one language to
another.
 We are amazed at how websites can translate from one language to another
effortlessly and give contextual meaning as well.
 The technology behind the translation tool is called ‘machine translation.’ It has
enabled people to interact with others from all around the world; without it, life
would not be as easy as it is now.
 It has provided confidence to travelers and business associates to safely venture
into foreign lands with the conviction that language will no longer be a barrier.

PREPARED BY: ABDUL JALIL NIAZAI


Application Machine Learning
 Machine learning is a buzzword for
today's technology, and it is growing
very rapidly day by day. We are using
machine learning in our daily life even
without knowing it such as Google
Maps, Google assistant, Alexa, etc.
Below are some most trending real-
world applications of Machine
Learning:

PREPARED BY: ABDUL JALIL NIAZAI


Application Machine Learning
 Traffic Alerts (Maps)
• Now, Google Maps is probably the app we use whenever we go out and require assistance in
directions and traffic. The other day you were traveling to another city and took the expressway
and Maps suggested: “Despite the Heavy Traffic, you are on the fastest route“. But, How does it
know that?

• Well, It’s a combination of people currently using the service, Historic Data of that route collected
over time and few tricks acquired from other companies. Everyone using maps is providing their
location, average speed, the route in which they are traveling which in turn helps Google collect
massive Data about the traffic, which makes them predict the upcoming traffic and adjust your
route according to it.
PREPARED BY: ABDUL JALIL NIAZAI
Application Machine Learning
 Social Media (Facebook)
 One of the most common applications of Machine Learning is Automatic Friend Tagging Suggestions
in Facebook or any other social media platform. Facebook uses face detection and Image
recognition to automatically find the face of the person which matches it’s Database and hence
suggests us to tag that person based on DeepFace.

• Facebook’s Deep Learning project DeepFace is responsible for the recognition of faces and
identifying which person is in the picture.

PREPARED BY: ABDUL JALIL NIAZAI


Application Machine Learning
 Transportation and Commuting (Uber)
• If you have used an app to book a cab, you are already using Machine Learning to an extent. It
provides a personalized application which is unique to you. Automatically detects your location and
provides options to either go home or office or any other frequent place based on your History and
Patterns.

• It uses Machine Learning algorithm layered on top of Historic Trip Data to make a more
accurate ETA prediction. With the implementation of Machine Learning, they saw a 26% accuracy in
Delivery and Pickup.

PREPARED BY: ABDUL JALIL NIAZAI


Application Machine Learning
 Products Recommendations
• Suppose you check an item on Amazon, but you do not buy it then and there. But the next day,
you’re watching videos on YouTube and suddenly you see an ad for the same item. You switch to
Facebook, there also you see the same ad. So how does this happen?

• Well, this happens because Google tracks your search history, and recommends ads based on your
search history. This is one of the coolest applications of Machine Learning. In fact, 35% of Amazon’s
revenue is generated by Product Recommendations.
PREPARED BY: ABDUL JALIL NIAZAI
Application Machine Learning
 Self Driving Cars
• One of the most exciting applications of machine learning is self-driving cars. Machine learning
plays a significant role in self-driving cars. Tesla, the most popular car manufacturing company is
working on self-driving car. It is using unsupervised learning method to train the car models to
detect people and objects while driving.

PREPARED BY: ABDUL JALIL NIAZAI


Application Machine Learning
 Dynamic Pricing
 How does Uber determine the price of your ride?
 Uber’s biggest uses of Machine Learning comes in
the form of surge pricing, a machine learning model
nicknamed as “Geosurge”. If you are getting late
for a meeting and you need to book an Uber in a
crowded area, get ready to pay twice the normal
fare. Even for flights, if you are traveling in the
festive season the chances are prices will be twice
the original price.

PREPARED BY: ABDUL JALIL NIAZAI


Application Machine Learning
 Online Fraud Detection:
• Machine learning is making our online transaction
safe and secure by detecting fraud transaction.
transaction or a fraud transaction.
• For each genuine transaction, the output is
converted into some hash values, and these values
become the input for the next round.
• For each genuine transaction, there is a specific
pattern which gets change for the fraud
transaction hence, it detects it and makes our
online transactions more secure.
PREPARED BY: ABDUL JALIL NIAZAI
Application Machine Learning
 Online Video Streaming (Netflix)
 The Netflix algorithm constantly gathers massive amounts of data about users’ activities
like:
 What day you watch content (TV Shows on Weekdays and Movies on Weekends)
 The Date and Time you watch
 When you pause and leave content (and if you ever come back)
 The ratings Given (about 4 million per day), Searches (about 3 million per day)
 Browsing and Scrolling Behavior

And a lot more. They collect this data for each subscriber they have and use their Recommender
System and a lot of Machine Learning Applications. That’s why they have such a huge customer
retention rate.

PREPARED BY: ABDUL JALIL NIAZAI


How does Machine Learning Work?

 A Machine Learning system learns from historical data, builds the prediction models, and
whenever it receives new data, predicts the output for it.
 The accuracy of predicted output depends upon the amount of data, as the huge amount of
data helps to build a better model which predicts the output more accurately.
 The below block diagram explains the working of Machine Learning algorithm:

PREPARED BY: ABDUL JALIL NIAZAI


Features of Machine Learning

 Machine learning uses data to detect various patterns in a given dataset.


 It can learn from past data and improve automatically.
 It is a data-driven technology.
 The most exciting subsets of Artificial Intelligence.
 Machine learning is much similar to data mining as it also deals with the huge amount of the data.

PREPARED BY: ABDUL JALIL NIAZAI


Need for Machine Learning

 The need for machine learning is increasing day by day.


 The reason behind the need for machine learning is that it is capable of doing tasks that are too complex for a
person to implement directly.
 As a human, we have some limitations as we cannot access the huge amount of data manually, so for this, we need
some computer systems and here comes the machine learning to make things easy for us.

 The importance of machine learning can be easily understood by its uses cases:
 self-driving cars
 cyber fraud detection
 face recognition
 friend suggestion by Facebook, etc.

PREPARED BY: ABDUL JALIL NIAZAI


Need for Machine Learning

 Following are some key points which show the importance of Machine Learning:
 Rapid increment in the production of data
 Solving complex problems, which are difficult for a human
 Decision making in various sector including finance
 Finding hidden patterns and extracting useful information from data.

PREPARED BY: ABDUL JALIL NIAZAI


Types of Machine Learning

The types of machine


learning algorithms differ in
their approach, the type of
data they input and output,
and the type of task or
problem that they are
intended to solve.

 Supervised Learning
 Unsupervised learning
 Reinforcement learning

PREPARED BY: ABDUL JALIL NIAZAI


Supervised Learning
 The supervised learning is based on supervision,
and it is the same as when a student learns things
in the supervision of the teacher.

 Supervised learning is a type of machine learning


method in which we provide sample labeled data
to the machine learning system in order to train it,
and on that basis, it predicts the output.

 The system creates a model using labeled data to


understand the datasets and learn about each data,
once the training and processing are done then we
test the model by providing a sample data to check
whether it is predicting the exact output or not.

PREPARED BY: ABDUL JALIL NIAZAI


Supervised Learning
 Supervised learning algorithms build a
mathematical model of a set of data that
contains both the inputs and the desired
outputs.
 Supervised learning algorithms try to model
relationships and dependencies between
 Target prediction output and
 Input features

 Can predict the output values for new data


based on those relationships which it
learned from the previous datasets

PREPARED BY: ABDUL JALIL NIAZAI


Supervised Learning

 List of supervised learning algorithms


 Nearest Neighbor
 Naïve Bayes
 Decision Trees
 Linear Regression
 Logistic Regression
 Support Vector Machine
 Neural Network

PREPARED BY: ABDUL JALIL NIAZAI


Category of Supervised Learning

 There are two categories of supervised learning.

 Classification task: When the output


variable is a category, such as “red” or “blue”
or “disease” and “no disease”.

 Regression task: A regression


problem is when the output variable is
a real value, such as “dollars” or
“weight”.

PREPARED BY: ABDUL JALIL NIAZAI


Classification - predicting class labels

 Classification is subcategory of supervised learning.


 The goal is to predict the categorical class labels of new
instance based on past observations.
 The task can be binary classification or multi-class
classification.
 Typical example:
 e-mail-spam detection , and handwritten character
recognition.

PREPARED BY: ABDUL JALIL NIAZAI


Regression - predicting continuous
outcomes

 Also called regression analysis.


 Giving a number of predictor (explanatory)
variables and continuous response variable.
 Try to find a relationship between those
variable that allows us to predict an outcome.
 Example, predicting Math SAT score on
amount of time a student spend studying for
the final test.

PREPARED BY: ABDUL JALIL NIAZAI


Reinforcement Learning
 Solving interactive problems with reinforcement
learning.

 In reinforcement learning, the goal is to


develop a system (agent) that improves its
performance based on its interaction with the
environment.
 Information about current state of environment
typically also include a so-called reward signal.
 The feedback (reward) is a measure of how
well the action was measured by a reward
function.

PREPARED BY: ABDUL JALIL NIAZAI


Reinforcement Learning
 Solving interactive problems with
reinforcement learning.

 Through the interaction with the


environment, an agent can learn a
series of actions that maximizes the
reward via an exploratory trial-and-
error approach.

PREPARED BY: ABDUL JALIL NIAZAI


Unsupervised Learning
 Unsupervised learning is a learning method
in which a machine learns without any
supervision.

 The training is provided to the machine


with the set of data that has not been
labeled, classified, or categorized, and the
algorithm needs to act on that data without
any supervision.

 The goal of unsupervised learning is to


restructure the input data into new features
or a group of objects with similar patterns.

PREPARED BY: ABDUL JALIL NIAZAI


Unsupervised Learning
 Discovering hidden structures with
unsupervised learning.

 Using supervised learning techniques, we are


able to explore the structure of our data to
extract meaningful information without the
guidance of a known outcome variable or
reward function.
 Example, using cluster technique the marketers
can discover customer groups based on their
interest in order to develop distinct marketing
programs.

PREPARED BY: ABDUL JALIL NIAZAI


Unsupervised Learning
 In unsupervised learning, we don't have a predetermined result. The machine tries to find
useful insights from the huge amount of data.
 It can be further classifieds into two categories of algorithms:

 Clustering
 Association

PREPARED BY: ABDUL JALIL NIAZAI


Unsupervised Learning
 Clustering
o Cluster analysis or clustering is the task of grouping a set of objects in such a way
that objects in the same group (called a cluster) are more similar (in some sense or
another) to each other than to those in other groups (clusters).
o For example,
If we have the list of all persons in Asia, We can group them based on their nationalities like
Group 1: People belonging to India
Group 2: People belonging to China
Group 3: People belonging to Nepal etc...

PREPARED BY: ABDUL JALIL NIAZAI


Unsupervised Learning
 Association
o Association rule learning is a popular and well researched method for discovering
interesting relations between variables in large databases.
o It is intended to identify strong rules discovered in databases using different measures of
interestingness.
o It is the process of measuring the degree of association between any 2 items.
o For example,
o If we go to a grocery shop, there is a high probability that we will buy a jam if we already
bought bread there.
o This is because bread and jam are 2 items that are closely associated.

PREPARED BY: ABDUL JALIL NIAZAI


Unsupervised Learning
 List of unsupervised learning techniques:

 Partial least squares


 Fuzzy means
 Singular value decomposition
 K-means clustering
 Apriori
 FP Growth Algorithm
 Hierarchical clustering
 Principal component analysis

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 To avoid confusion and to make things simple, some key machine learning terminologies
are described below:
 Algorithm:An algorithms is a set of rules that a machine follows to achieve a
particular goal.
 A Learner or Machine Learning Algorithm?
 A Dataset: Is a table with the data from which the machine learns.
 Instance: An instance is a row in the dataset. Other names for ‘instance’ are: (data
point, example, observation).
 Labeled
 Unlabeled
 Feature: A feature is an individual measurable property of our data. A set of numeric
feature can be conveniently described by a feature vector. Feature vectors are fed as
input vector to the model. For example, in order to predict a fruit, there maybe
features like color, smell, taste, etc.

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 Target (Label): A target variable or label is the value to be predicted by our model. For the
fruit example, the label with each set of input would be the name of the fruit like apple,
orange, banana, etc.
 Training: The idea is to give a set of inputs( features) and its expected output (labels), so
after training, we will have a model that will then map new data to one of the categories
trained on.
 Prediction: Once our model is ready, it can be fed a set of inputs to which it will provide a
predicted output(label).
 Model: A model is a specific representation learned from the data applying some machine
learning algorithms.
 Categorical data: Features having a discrete and set of values with no logical order. For
example, eye color, can be ‘brown’ or ‘blue’, or person’s gender.

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 Input Data Type


 Having a good understanding of different type of data, is crucial prerequisite for
exploratory data analysis and dealing with to choose the right learning algorithm in
machine learning.

 The data is classified into majorly four categories:


o Nominal data
o Ordinal data
o Discrete data
o Continuous data

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 Qualitative or Categorical Data

o Qualitative data, also known as the categorical data, describes the data that fits into the
categories.
o Qualitative data are not numerical.
o The categorical information involves categorical variables that describe the features
such as a person’s gender, home town etc.
o Categorical measures are defined in terms of natural language specifications, but not in
terms of numbers.
o Sometimes categorical data can hold numerical values (quantitative value), but those
values do not have a mathematical sense.
o For example, postcode and birthdate.

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 Nominal Data

o Nominal data is one of the types of qualitative information which helps to label the
variables without providing the numerical value.
o It cannot be ordered and measured.
o Examples of nominal data are letters, symbols, words, gender etc.
o The nominal data are examined using the grouping method.
o In this method, the data are grouped into categories, and then the frequency or the
percentage of the data can be calculated.
o These data are visually represented using the pie charts.

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 Ordinal Data

o Ordinal data/variable is a type of data that follows a natural order.


o The significant feature of the nominal data is that the difference between the data
values is not determined.
o This variable is mostly found in surveys, finance, economics, questionnaires, and so
on.
o For example, education level (“high school”, “BS”, “MS”, “PhD”), income level (“
less than 50K”, “50K – 100K”, “Over 100K”).
o The ordinal data is commonly represented using a bar chart.
o The information may be expressed using tables in which each row in the table shows
the distinct category.

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 Quantitative or Numerical Data


o Quantitative data is also known as numerical data which represents the numerical
value (i.e., how much, how often, how many).
o Numerical data gives information about the quantities of a specific thing.
o Some examples of numerical data are height, length, size, weight, and so on.
o The quantitative data can be classified into two different types based on the data sets.
o The two different classifications of numerical data are
o Discrete data and continuous data.

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 Discrete Data
o Discrete data can take only discrete values. Discrete information contains only a finite
number of possible values.
o Those values cannot be subdivided meaningfully.
o Here, things can be counted in whole numbers.
o Example: Number of students in the class

PREPARED BY: ABDUL JALIL NIAZAI


Machine Learning Terminology

 Continuous Data
o Continuous data is data that can be calculated. It has an infinite number of probable
values that can be selected within a given specific range.
o Example: Temperature range, wind speed, and volts of electricity.

PREPARED BY: ABDUL JALIL NIAZAI


A Roadmap for Building Machine
Learning Systems

 The diagram below shows a typical


workflow diagram for using
machine learning in predictive
modeling, which we will discuss in
the following subsections:

PREPARED BY: ABDUL JALIL NIAZAI


Preprocessing
 Getting data into shape:
 Raw data rarely comes in the form and shape that is necessary for
the optimal performance of learning algorithms.
 Real-world the data in usually incomplete, noisy, and inconsistent.
 One of the most crucial step in machine learning application.

PREPARED BY: ABDUL JALIL NIAZAI


Training and Selecting a Predictive
Model

 Different machine learning algorithms have been developed to solve different


problem tasks

 No Free Lunch Rule.

 For example, each classification algorithm has its inherent biases, and no single
classification model enjoys superiority if we don't make any assumptions about the
task.

 Compare at least a handful of different algorithms in order to train and select the
best performing model.

 How do we know which model performs well on the final test dataset and real-world
data if we don't use this test set for the model selection but keep it for the final model
evaluation?

PREPARED BY: ABDUL JALIL NIAZAI


Evaluation
 Evaluating models and predicting unseen data instances.
 After a model has been fitted on the training dataset, we can
use testing dataset to estimate:
 How well the model performs on this unseen data to
estimate the generalization error.
 Can use the model for predicting new, future data, if we are
satisfied with the model performance.

 How do we know which model performs well on the final test dataset and real-world
data if we don't use this test set for the model selection but keep it for the final model
evaluation?

PREPARED BY: ABDUL JALIL NIAZAI


Price of a house

$ 70,000
? $ 160,000

PREPARED BY: ABDUL JALIL NIAZAI


Example-Price of a house
Price ($)

Size of the house

PREPARED BY: ABDUL JALIL NIAZAI


Example-Price of a house

$190,000
Price ($)

$70,000

Size of the house

PREPARED BY: ABDUL JALIL NIAZAI


Example-Price of a house

Question: What’s the


$190,000 is the best estimate
for the price of the
house?
 $80,000
Price ($)

$120,000  $120,000
 $190,000

$70,000
?

Size of the house

PREPARED BY: ABDUL JALIL NIAZAI


Linear Regression

$190,000
Price ($)

$120,000

$70,000

Size of the house

PREPARED BY: ABDUL JALIL NIAZAI


Linear Regression

PREPARED BY: ABDUL JALIL NIAZAI


Linear Regression

PREPARED BY: ABDUL JALIL NIAZAI


Linear Regression

Least Square Distance

PREPARED BY: ABDUL JALIL NIAZAI


Detecting Spam E-mail

PREPARED BY: ABDUL JALIL NIAZAI


Detecting Spam E-mail
Spam “Cheap” Non - Spam

PREPARED BY: ABDUL JALIL NIAZAI


Detecting Spam E-mail
Spam “Cheap” Non - Spam

PREPARED BY: ABDUL JALIL NIAZAI


Detecting Spam E-mail
“Cheap” Spam Non - Spam Quiz: If an e-mail contains
the word “cheap”, what is
the probability of it being
spam?

 40 %
 60 %
 80 %
Conclusion:
If the e-mail contains the word
“cheap”, the probability of it being
spam is 80 %.

PREPARED BY: ABDUL JALIL NIAZAI


Detecting Spam E-mail
Quiz: If an e-mail contains
the word “cheap”, what is
“Cheap” 80 % the probability of it being
spam?
Spelling mistake 70 %
 40 %
 60 %
Missing title 95 %
 80 %
etc… Conclusion:
If the e-mail contains the word
“cheap”, the probability of it being
spam is 80 %.

PREPARED BY: ABDUL JALIL NIAZAI


Naïve Bayes Algorithm
Quiz: If an e-mail contains
the word “cheap”, what is
“Cheap” 80 % the probability of it being
spam?
Spelling mistake 70 %
 40 %
 60 %
Missing title 95 %
 80 %
etc… Conclusion:
If the e-mail contains the word
“cheap”, the probability of it being
spam is 80 %.

PREPARED BY: ABDUL JALIL NIAZAI


Recommending Apps
Quiz: Between Gender and Age,
which one seems more decisive for
predicting what app will the user
download?

 Age
 Gender

PREPARED BY: ABDUL JALIL NIAZAI


Recommending Apps
Quiz: Between Gender and Age,
which one seems more decisive for
predicting what app will the user
download?

 Age
 Gender

PREPARED BY: ABDUL JALIL NIAZAI


Recommending Apps
Quiz: Between Gender and Age,
which one seems more decisive for
predicting what app will the user
download?

 Age
 Gender

PREPARED BY: ABDUL JALIL NIAZAI


Recommending Apps

PREPARED BY: ABDUL JALIL NIAZAI


Recommending Apps

PREPARED BY: ABDUL JALIL NIAZAI


Decision Tree

PREPARED BY: ABDUL JALIL NIAZAI


PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
PREPARED BY: ABDUL JALIL NIAZAI
Quiz
 Which of the following is/are classification problem(s)?
 Predicting the gender of a person by his/her
handwriting style
 Predicting house price based on area
 Predicting whether monsoon will be normal next
year
 Predict the number of copies a music album will be
sold next month
 Predicting age of a person
 Predicting nationality of a person
 Predicting whether stock price of a company will
increase tomorrow
 Predicting whether a document is related to
sighting of UFOs?

PREPARED BY: ABDUL JALIL NIAZAI

You might also like