SlideShare a Scribd company logo
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algorithms | Simplilearn
Machine Learning Example
How does
Snapchat
filter work?
Machine Learning Example
Machine Learning Example
Matrix of numbers
Machine Learning Example
Matrix of numbers
Looks for color patterns
on face
Machine Learning Example
Matrix of numbers
Looks for color patterns
on face
Points align
themselves and
look for areas of
contrast
Machine Learning Example
Matrix of numbers
Looks for color patterns
on face
Points align
themselves and
look for areas of
contrast
What’s in it for you?
Types of Machine Learning Algorithms
Real World Applications of Machine Learning
Processes involved in Machine Learning
What is Machine Learning?
Logistic Regression
Linear Regression
Decision Tree and Random forest
K Nearest Neighbors
Popular Algorithms with Hands On Demo
Real World Applications of
Machine Learning
Real World Applications of Machine Learning
Face Recognition Healthcare Industry Weather Forecasting
Produce a Web Series Prepare a new Drink
Siri and Cortana
What is Machine Learning?
What is Machine Learning?
Machine Learning is the science of making computers learn and act like humans by feeding
data and information without being explicitly programmed.
What is Machine Learning?
Past Data
Machine Learning is the science of making computers learn and act like humans by feeding
data and information without being explicitly programmed.
What is Machine Learning?
Past Data
Analyses
Machine Learning is the science of making computers learn and act like humans by feeding
data and information without being explicitly programmed.
What is Machine Learning?
Past Data
Analyses
Trains
Machine Learning is the science of making computers learn and act like humans by feeding
data and information without being explicitly programmed.
What is Machine Learning?
Past Data
Analyses
Predicts
Trains
Machine Learning is the science of making computers learn and act like humans by feeding
data and information without being explicitly programmed.
Output
Processes involved in Machine Learning
Data
Gathering
7Machine Learning
Processes
Processes involved in Machine Learning
Data
Gathering
7Machine Learning
Processes
Data
Pre-Processing
Processes involved in Machine Learning
Data
Gathering
7Machine Learning
Processes
Data
Pre-Processing
Choose
Model
Processes involved in Machine Learning
Data
Gathering
7Machine Learning
Processes
Data
Pre-Processing
Choose
Model
Train Model
Processes involved in Machine Learning
Data
Gathering
7Machine Learning
Processes
Data
Pre-Processing
Choose
Model
Train Model
Test Model
Processes involved in Machine Learning
Data
Gathering
7Machine Learning
Processes
Data
Pre-Processing
Choose
Model
Train Model
Test Model
Tune Model
Processes involved in Machine Learning
Data
Gathering
7Machine Learning
Processes
Data
Pre-Processing
Choose
Model
Train Model
Test Model
Tune Model
Prediction
Types of Machine Learning Algorithms
VSupervised
Learning
Un-Supervised
Learning
Reinforcement
Learning
Machine
Learning
Association
• Market Basket Analysis
• Text Mining
• Face Recognition
Classification
• Fraud Detection
• Email Spam Detection
• Image Classification
Regression
• Weather Forecasting
• Risk Assessment
• Score Prediction
Clustering
• Medical Research
• City Planning
• Targeted Marketing
Reinforcement Learning
• Gaming
• Robot Navigation
• Stock Trading
• Assembly Line Processes
Popular Algorithms in Machine Learning
Algorithm 1
Linear
Regression
Popular Algorithms in Machine Learning
Algorithm 1
Algorithm 2
Linear
Regression
Logistic
Regression
Popular Algorithms in Machine Learning
Algorithm 1
Decision
Tree
Algorithm 2
Algorithm 3
Linear
Regression
Logistic
Regression
Popular Algorithms in Machine Learning
Algorithm 1
Decision
Tree
Random
Forest
Algorithm 2
Algorithm 3
Algorithm 4
Linear
Regression
Logistic
Regression
Popular Algorithms in Machine Learning
Algorithm 1
Decision
Tree
Random
Forest
K Nearest
Neighbors
Algorithm 2
Algorithm 3
Algorithm 4
Algorithm 5
Linear
Regression
Logistic
Regression
Linear Regression
History of Linear Regression
Linear Regression: Brief history on how Regression came into picture.
Francis Galton Heights of Father and Son
Studied
Best fit
line
Regression Line
Analyzed
Height Data
Mean Height of all People
Regressed
Linear Regression
Linear Regression is a linear modelling approach to find relationship between one or more independent variables (predictors)
denoted as X and dependent variable (target) denoted as Y.
Temperature
Sales
Temperature
Sales
Regression line to predict the sales
Plotting the sales of ice cream based
on temperature
Predict sales of Ice Cream based on temperature:
Linear Regression
Finding the best fit line: The best fit line can be found out by minimizing the distance between all the data points and the distance
to the regression line. Ways to minimize this distance are sum of squared errors, sum of absolute errors etc.
Distance between the data points
and the line is maximum
Not the best fit line
Finding the best fit line: The best fit line can be found out by minimizing the distance between all the data points and the distance
to the regression line. Ways to minimize this distance are sum of squared errors, sum of absolute errors etc.
Linear Regression
Not the best fit line
Distance between the data points
and the line can still be reduced
Linear Regression
Finding the best fit line: The best fit line can be found out by minimizing the distance between all the data points and the distance
to the regression line. Ways to minimize this distance are sum of squared errors, sum of absolute errors etc.
Distance between the data points
and the line is the least
Best fit regression line
Implementation of Linear Regression
Linear Regression: Predict Employee Salary based on Years of Experience.
HR team trying to figure out how much
to pay to a new joinee?
Predict Salary
How much do we pay her?
New Joinee
Years of experience
Salary
Employee data of Salary
based on Years of experience
Implementation of Linear Regression
1. Load the libraries:
2. Import the Dataset:
Implementation of Linear Regression
3. Visualize the data:
Implementation of Linear Regression
4. Split the data into training and testing set:
5. Fit Simple Linear Regression to the training dataset:
Implementation of Linear Regression
6. Predict the test set results:
Implementation of Linear Regression
7. Visualize the train set results:
Implementation of Linear Regression
8. Visualize the test set results:
Implementation of Linear Regression
9. Calculating the residuals:
Since the RMSE value is too less, the model is a good model
Logistic Regression
Logistic Regression
Logistic Regression is a Classification algorithm used to predict discrete/ categorical values
Who will default on their credit card payment?
Logistic Regression
Logistic Regression is a Classification algorithm used to predict discrete/ categorical values
Who will default on their credit card payment?
Credit card users
Logistic Regression
Logistic Regression is a Classification algorithm used to predict discrete/ categorical values
Who will default on their credit card payment?
Credit card users Make credit card
transaction
Logistic Regression
Logistic Regression is a Classification algorithm used to predict discrete/ categorical values
Who will default on their credit card payment?
Credit card users
Plot of monthly credit card balance
and annual income
Make credit card
transaction
Logistic Regression
Plotting the Logistic Regression Curve: The Logistic Regression curve is known as the Sigmoid curve (S curve)
Predicted Y lies in the range 0 and 1
1
1 + e-zP =
Predicted Y can exceed the range 0 and 1
Y = m1x+c0
Logistic Regression
Plotting the Logistic Regression Curve: The Logistic Regression curve is known as the Sigmoid curve (S curve)
Y = m1x+c0
0.5
Threshold
value
0.5
Cutoff point at 0.5, anything below it
results in 0 and above is 1
Red data point will default as it is above
the threshold value of 0.5 and green data
point won’t as it is below the threshold
value
Implementation of Logistic Regression
Logistic Regression: Predict if a person will buy an SUV based on their Age and Estimated Salary
Age Estimated
Salary
Implementation of Logistic Regression
1. Load the libraries:
2. Import the dataset and extract the independent and dependent variables:
Implementation of Logistic Regression
3. Visualize the dataset:
Implementation of Logistic Regression
4. Split the dataset into Training and Testing set:
5. Feature Scaling:
6. Fit Logistic Regression to Training dataset:
Implementation of Logistic Regression
7. Predicting the Test set results:
Implementation of Logistic Regression
8. Visualize the Train set results:
Implementation of Logistic Regression
9. Visualize the Test set results:
Implementation of Logistic Regression
11. Evaluating the model:
Understanding the Confusion Matrix:
N = 134 Predicted: No Predicted: Yes
Actual: No TN=79 FP=6
Actual: Yes FN=11 TP=38
Accuracy:
(TN+TP)/N
(79+38)/134 = 0.87
Misclassification Rate:
(FP+FN)/N
(6+11)/134 = 0.13
Decision Tree and
Random Forest
Decision Tree
Decision Tree is a tree where each node represents a feature (attribute), each link (branch) represents a decision and each leaf
represents an outcome (categorical or continuous value).
Should the person accept a new job offer?
Yes
Salary >
$60,000
Root Node
Accept a job offer?
Reject
Offer
No
Leaf node
Accept
offer
Yes
Reject
Offer
No
Reject
Offer
YesNo
Performance
Incentives
Decision
node
Commute > 1
hour
Implementation of Decision Tree
Decision Tree and Random Forest: Does Kyphosis exist after a surgery?
Bunch of kids Kyphosis surgery Predict kyphosis
present or absent?
Implementation of Decision Tree
Classification Tree for Kyphosis:
Start>=8.5
Absent 64/17
Present
8/11
No
Start>=14.5
Absent 56/6
Yes
Absent
12/0
Yes
Absent
29/0
Yes
Absent
12/2
Yes
Age<55
Absent 27/6
No
Age>=111
Absent 15/6
No
Present
3/4
No
Implementation of Decision Tree
1. Load the libraries:
2. Import the dataset and extract the independent and dependent variables:
Implementation of Decision Tree
3. Visualize the data:
Implementation of Decision Tree
4. Split the data into Train and Test set:
5. Train a Decision Tree:
Implementation of Decision Tree
6. Predict the Model:
Implementation of Decision Tree
N = 25 Predicted: No Predicted: Yes
Actual: No TN=16 FP=4
Actual: Yes FN=2 TP=3
7. Evaluate the Model:
Understanding the confusion matrix: Accuracy:
(TN+TP)/N
(16+3)/25 = 0.76
Misclassification Rate:
(FP+FN)/N
(4+2)/25 = 0.24
Improving performance using Random Forest
Compare the model using Random Forest Tree:
Accuracy:
(TN+TP)/N
(18+2)/25 = 0.80
Misclassification Rate:
(FP+FN)/N
(2+3)/25 = 0.20
Algorithm 5
K Nearest Neighbors
K Nearest Neighbors (KNN)
K Nearest Neighbors: KNN is a Classification algorithm generally used to predict categorical values.
Height(ft)
Weight (lbs)
Class Dog
1.5
3.5
2.0
3.0
2.5
1.0
0.5
0 65 75 9585 105
Class Cat
Weight (lbs)
Class Dog
1.5
3.5
2.0
3.0
2.5
1.0
0.5
0 65 75 9585 105
Height(ft)
New data
point
Class Cat
To find if a new data point is a or a ?
Choosing a K will define what class a new data point is assigned to:
K Nearest Neighbors
Height(ft)
Class Dog
Weight (lbs)
0.5
2.5
2.0
1.5
3.0
1.0
3.5
10565 75 85 95
Class Cat
K=3
If K=3, the new data point
belongs to class Cat
K=7
If K=7, the new data point
belongs to class Dog
Implementation of KNN
Predict if a person will buy an SUV based on Age and Estimated Salary
Age Estimated
Salary
Implementation of KNN
1. Load the Libraries:
2. Load the Dataset:
Implementation of KNN
3. Visualize the dataset:
Implementation of KNN
4. Split the data into Train and Test set:
5. Feature Scaling:
Implementation of KNN
6. Fit KNN to Train set:
7. Predict the Test set results:
Implementation of KNN
8. Visualize the Train set results:
Implementation of KNN
9. Visualize the Test set results:
Implementation of KNN
10. Evaluate the model by creating a confusion matrix:
Understanding the confusion matrix:
N = 100 Predicted: No Predicted: Yes
Actual: No TN=64 FP=4
Actual: Yes FN=3 TP=29
Accuracy:
(TN+TP)/N
(64+29)/100 = 0.93
Misclassification Rate:
(FP+FN)/N
(4+3)/100 = 0.07
Summary
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algorithms | Simplilearn

More Related Content

What's hot (20)

PPTX
Machine Learning
Darshan Ambhaikar
 
PPT
Machine learning
Rajib Kumar De
 
PDF
An introduction to Machine Learning
butest
 
PPT
Machine Learning
Vivek Garg
 
PPTX
Machine learning
Rajesh Chittampally
 
PPTX
Machine Learning and Real-World Applications
MachinePulse
 
PPTX
Machine learning
Saurabh Agrawal
 
PPTX
Types of Machine Learning
Samra Shahzadi
 
PPTX
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Simplilearn
 
PPTX
Introduction to Machine Learning
Rahul Jain
 
PPTX
Deep learning
Ratnakar Pandey
 
PDF
Lecture 1: What is Machine Learning?
Marina Santini
 
PPTX
Unsupervised learning
amalalhait
 
PDF
Credit card fraud detection through machine learning
dataalcott
 
PPTX
introduction to machin learning
nilimapatel6
 
PDF
Machine learning
Dr Geetha Mohan
 
PPTX
Intro/Overview on Machine Learning Presentation
Ankit Gupta
 
PPTX
supervised learning
Amar Tripathi
 
PPTX
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
Simplilearn
 
PDF
Machine Learning Deep Learning AI and Data Science
Venkata Reddy Konasani
 
Machine Learning
Darshan Ambhaikar
 
Machine learning
Rajib Kumar De
 
An introduction to Machine Learning
butest
 
Machine Learning
Vivek Garg
 
Machine learning
Rajesh Chittampally
 
Machine Learning and Real-World Applications
MachinePulse
 
Machine learning
Saurabh Agrawal
 
Types of Machine Learning
Samra Shahzadi
 
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Simplilearn
 
Introduction to Machine Learning
Rahul Jain
 
Deep learning
Ratnakar Pandey
 
Lecture 1: What is Machine Learning?
Marina Santini
 
Unsupervised learning
amalalhait
 
Credit card fraud detection through machine learning
dataalcott
 
introduction to machin learning
nilimapatel6
 
Machine learning
Dr Geetha Mohan
 
Intro/Overview on Machine Learning Presentation
Ankit Gupta
 
supervised learning
Amar Tripathi
 
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
Simplilearn
 
Machine Learning Deep Learning AI and Data Science
Venkata Reddy Konasani
 

Similar to Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algorithms | Simplilearn (20)

PDF
Data Analysis - Making Big Data Work
David Chiu
 
PDF
HRUG - Linear regression with R
egoodwintx
 
PPTX
When Models Meet Data: From ancient science to todays Artificial Intelligence...
ssuserbbbef4
 
PPTX
Nss power point_machine_learning
Gauravsd2014
 
PDF
Post Graduate Admission Prediction System
IRJET Journal
 
PDF
Data Science Interview Questions PDF By ScholarHat
Scholarhat
 
PDF
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
Souma Maiti
 
PPTX
Machine Learning.pptx
NitinSharma134320
 
PDF
Data Analytics For Beginners | Introduction To Data Analytics | Data Analytic...
Edureka!
 
PDF
IRJET- Prediction of Crime Rate Analysis using Supervised Classification Mach...
IRJET Journal
 
PDF
Top 10 Machine Learning Algorithms in 2025.pdf
SoluLab1231
 
PPTX
Egypt hackathon 2014 analytics & spss session
M Baddar
 
PPTX
Pavan Kumar Yes bank stocck is needed for
nvnvnv0288
 
PDF
Employee mode of commuting
Saleesh Satheeshchandran
 
PDF
Barga Data Science lecture 9
Roger Barga
 
PPTX
Practical Machine Learning at Work
IDEAS - Int'l Data Engineering and Science Association
 
PPTX
#ATAGTR2021 Presentation : "Use of AI and ML in Performance Testing" by Adolf...
Agile Testing Alliance
 
PDF
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
ThinkInnovation
 
PDF
Top 10 Machine Learning Algorithms in 2025.pdf
imoliviabennett
 
PPTX
Loan Eligibility Checker
KiranVodela
 
Data Analysis - Making Big Data Work
David Chiu
 
HRUG - Linear regression with R
egoodwintx
 
When Models Meet Data: From ancient science to todays Artificial Intelligence...
ssuserbbbef4
 
Nss power point_machine_learning
Gauravsd2014
 
Post Graduate Admission Prediction System
IRJET Journal
 
Data Science Interview Questions PDF By ScholarHat
Scholarhat
 
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
Souma Maiti
 
Machine Learning.pptx
NitinSharma134320
 
Data Analytics For Beginners | Introduction To Data Analytics | Data Analytic...
Edureka!
 
IRJET- Prediction of Crime Rate Analysis using Supervised Classification Mach...
IRJET Journal
 
Top 10 Machine Learning Algorithms in 2025.pdf
SoluLab1231
 
Egypt hackathon 2014 analytics & spss session
M Baddar
 
Pavan Kumar Yes bank stocck is needed for
nvnvnv0288
 
Employee mode of commuting
Saleesh Satheeshchandran
 
Barga Data Science lecture 9
Roger Barga
 
Practical Machine Learning at Work
IDEAS - Int'l Data Engineering and Science Association
 
#ATAGTR2021 Presentation : "Use of AI and ML in Performance Testing" by Adolf...
Agile Testing Alliance
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
ThinkInnovation
 
Top 10 Machine Learning Algorithms in 2025.pdf
imoliviabennett
 
Loan Eligibility Checker
KiranVodela
 
Ad

More from Simplilearn (20)

PPTX
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Simplilearn
 
PPTX
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Simplilearn
 
PPTX
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
Simplilearn
 
PPTX
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
Simplilearn
 
PPTX
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
Simplilearn
 
PPTX
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
Simplilearn
 
PPTX
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
Simplilearn
 
PPTX
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
Simplilearn
 
PPTX
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
Simplilearn
 
PPTX
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
PPTX
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
PPTX
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Simplilearn
 
PPTX
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Simplilearn
 
PPTX
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
Simplilearn
 
PPTX
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
Simplilearn
 
PPTX
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Simplilearn
 
PPTX
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Simplilearn
 
PPTX
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Simplilearn
 
PPTX
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
PPTX
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Simplilearn
 
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Simplilearn
 
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
Simplilearn
 
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
Simplilearn
 
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
Simplilearn
 
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
Simplilearn
 
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
Simplilearn
 
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
Simplilearn
 
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
Simplilearn
 
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Simplilearn
 
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Simplilearn
 
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
Simplilearn
 
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
Simplilearn
 
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Simplilearn
 
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Simplilearn
 
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Simplilearn
 
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Ad

Recently uploaded (20)

PDF
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
PDF
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
PPTX
Connecting Linear and Angular Quantities in Human Movement.pptx
AngeliqueTolentinoDe
 
PPTX
ENGLISH 8 REVISED K-12 CURRICULUM QUARTER 1 WEEK 1
LeomarrYsraelArzadon
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
PDF
Genomics Proteomics and Vaccines 1st Edition Guido Grandi (Editor)
kboqcyuw976
 
PPTX
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
PPTX
Parsing HTML read and write operations and OS Module.pptx
Ramakrishna Reddy Bijjam
 
PDF
AI-assisted IP-Design lecture from the MIPLM 2025
MIPLM
 
PDF
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
PDF
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
PPTX
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
PDF
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
PDF
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
PDF
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
PPTX
Lesson 1 Cell (Structures, Functions, and Theory).pptx
marvinnbustamante1
 
PPTX
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
PDF
Lean IP - Lecture by Dr Oliver Baldus at the MIPLM 2025
MIPLM
 
PPTX
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
Connecting Linear and Angular Quantities in Human Movement.pptx
AngeliqueTolentinoDe
 
ENGLISH 8 REVISED K-12 CURRICULUM QUARTER 1 WEEK 1
LeomarrYsraelArzadon
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
Genomics Proteomics and Vaccines 1st Edition Guido Grandi (Editor)
kboqcyuw976
 
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
Parsing HTML read and write operations and OS Module.pptx
Ramakrishna Reddy Bijjam
 
AI-assisted IP-Design lecture from the MIPLM 2025
MIPLM
 
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
Lesson 1 Cell (Structures, Functions, and Theory).pptx
marvinnbustamante1
 
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
Lean IP - Lecture by Dr Oliver Baldus at the MIPLM 2025
MIPLM
 
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 

Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algorithms | Simplilearn

  • 2. Machine Learning Example How does Snapchat filter work?
  • 5. Machine Learning Example Matrix of numbers Looks for color patterns on face
  • 6. Machine Learning Example Matrix of numbers Looks for color patterns on face Points align themselves and look for areas of contrast
  • 7. Machine Learning Example Matrix of numbers Looks for color patterns on face Points align themselves and look for areas of contrast
  • 8. What’s in it for you? Types of Machine Learning Algorithms Real World Applications of Machine Learning Processes involved in Machine Learning What is Machine Learning? Logistic Regression Linear Regression Decision Tree and Random forest K Nearest Neighbors Popular Algorithms with Hands On Demo
  • 9. Real World Applications of Machine Learning
  • 10. Real World Applications of Machine Learning Face Recognition Healthcare Industry Weather Forecasting Produce a Web Series Prepare a new Drink Siri and Cortana
  • 11. What is Machine Learning?
  • 12. What is Machine Learning? Machine Learning is the science of making computers learn and act like humans by feeding data and information without being explicitly programmed.
  • 13. What is Machine Learning? Past Data Machine Learning is the science of making computers learn and act like humans by feeding data and information without being explicitly programmed.
  • 14. What is Machine Learning? Past Data Analyses Machine Learning is the science of making computers learn and act like humans by feeding data and information without being explicitly programmed.
  • 15. What is Machine Learning? Past Data Analyses Trains Machine Learning is the science of making computers learn and act like humans by feeding data and information without being explicitly programmed.
  • 16. What is Machine Learning? Past Data Analyses Predicts Trains Machine Learning is the science of making computers learn and act like humans by feeding data and information without being explicitly programmed. Output
  • 17. Processes involved in Machine Learning Data Gathering 7Machine Learning Processes
  • 18. Processes involved in Machine Learning Data Gathering 7Machine Learning Processes Data Pre-Processing
  • 19. Processes involved in Machine Learning Data Gathering 7Machine Learning Processes Data Pre-Processing Choose Model
  • 20. Processes involved in Machine Learning Data Gathering 7Machine Learning Processes Data Pre-Processing Choose Model Train Model
  • 21. Processes involved in Machine Learning Data Gathering 7Machine Learning Processes Data Pre-Processing Choose Model Train Model Test Model
  • 22. Processes involved in Machine Learning Data Gathering 7Machine Learning Processes Data Pre-Processing Choose Model Train Model Test Model Tune Model
  • 23. Processes involved in Machine Learning Data Gathering 7Machine Learning Processes Data Pre-Processing Choose Model Train Model Test Model Tune Model Prediction
  • 24. Types of Machine Learning Algorithms VSupervised Learning Un-Supervised Learning Reinforcement Learning Machine Learning Association • Market Basket Analysis • Text Mining • Face Recognition Classification • Fraud Detection • Email Spam Detection • Image Classification Regression • Weather Forecasting • Risk Assessment • Score Prediction Clustering • Medical Research • City Planning • Targeted Marketing Reinforcement Learning • Gaming • Robot Navigation • Stock Trading • Assembly Line Processes
  • 25. Popular Algorithms in Machine Learning Algorithm 1 Linear Regression
  • 26. Popular Algorithms in Machine Learning Algorithm 1 Algorithm 2 Linear Regression Logistic Regression
  • 27. Popular Algorithms in Machine Learning Algorithm 1 Decision Tree Algorithm 2 Algorithm 3 Linear Regression Logistic Regression
  • 28. Popular Algorithms in Machine Learning Algorithm 1 Decision Tree Random Forest Algorithm 2 Algorithm 3 Algorithm 4 Linear Regression Logistic Regression
  • 29. Popular Algorithms in Machine Learning Algorithm 1 Decision Tree Random Forest K Nearest Neighbors Algorithm 2 Algorithm 3 Algorithm 4 Algorithm 5 Linear Regression Logistic Regression
  • 31. History of Linear Regression Linear Regression: Brief history on how Regression came into picture. Francis Galton Heights of Father and Son Studied Best fit line Regression Line Analyzed Height Data Mean Height of all People Regressed
  • 32. Linear Regression Linear Regression is a linear modelling approach to find relationship between one or more independent variables (predictors) denoted as X and dependent variable (target) denoted as Y. Temperature Sales Temperature Sales Regression line to predict the sales Plotting the sales of ice cream based on temperature Predict sales of Ice Cream based on temperature:
  • 33. Linear Regression Finding the best fit line: The best fit line can be found out by minimizing the distance between all the data points and the distance to the regression line. Ways to minimize this distance are sum of squared errors, sum of absolute errors etc. Distance between the data points and the line is maximum Not the best fit line
  • 34. Finding the best fit line: The best fit line can be found out by minimizing the distance between all the data points and the distance to the regression line. Ways to minimize this distance are sum of squared errors, sum of absolute errors etc. Linear Regression Not the best fit line Distance between the data points and the line can still be reduced
  • 35. Linear Regression Finding the best fit line: The best fit line can be found out by minimizing the distance between all the data points and the distance to the regression line. Ways to minimize this distance are sum of squared errors, sum of absolute errors etc. Distance between the data points and the line is the least Best fit regression line
  • 36. Implementation of Linear Regression Linear Regression: Predict Employee Salary based on Years of Experience. HR team trying to figure out how much to pay to a new joinee? Predict Salary How much do we pay her? New Joinee Years of experience Salary Employee data of Salary based on Years of experience
  • 37. Implementation of Linear Regression 1. Load the libraries: 2. Import the Dataset:
  • 38. Implementation of Linear Regression 3. Visualize the data:
  • 39. Implementation of Linear Regression 4. Split the data into training and testing set: 5. Fit Simple Linear Regression to the training dataset:
  • 40. Implementation of Linear Regression 6. Predict the test set results:
  • 41. Implementation of Linear Regression 7. Visualize the train set results:
  • 42. Implementation of Linear Regression 8. Visualize the test set results:
  • 43. Implementation of Linear Regression 9. Calculating the residuals: Since the RMSE value is too less, the model is a good model
  • 45. Logistic Regression Logistic Regression is a Classification algorithm used to predict discrete/ categorical values Who will default on their credit card payment?
  • 46. Logistic Regression Logistic Regression is a Classification algorithm used to predict discrete/ categorical values Who will default on their credit card payment? Credit card users
  • 47. Logistic Regression Logistic Regression is a Classification algorithm used to predict discrete/ categorical values Who will default on their credit card payment? Credit card users Make credit card transaction
  • 48. Logistic Regression Logistic Regression is a Classification algorithm used to predict discrete/ categorical values Who will default on their credit card payment? Credit card users Plot of monthly credit card balance and annual income Make credit card transaction
  • 49. Logistic Regression Plotting the Logistic Regression Curve: The Logistic Regression curve is known as the Sigmoid curve (S curve) Predicted Y lies in the range 0 and 1 1 1 + e-zP = Predicted Y can exceed the range 0 and 1 Y = m1x+c0
  • 50. Logistic Regression Plotting the Logistic Regression Curve: The Logistic Regression curve is known as the Sigmoid curve (S curve) Y = m1x+c0 0.5 Threshold value 0.5 Cutoff point at 0.5, anything below it results in 0 and above is 1 Red data point will default as it is above the threshold value of 0.5 and green data point won’t as it is below the threshold value
  • 51. Implementation of Logistic Regression Logistic Regression: Predict if a person will buy an SUV based on their Age and Estimated Salary Age Estimated Salary
  • 52. Implementation of Logistic Regression 1. Load the libraries: 2. Import the dataset and extract the independent and dependent variables:
  • 53. Implementation of Logistic Regression 3. Visualize the dataset:
  • 54. Implementation of Logistic Regression 4. Split the dataset into Training and Testing set: 5. Feature Scaling: 6. Fit Logistic Regression to Training dataset:
  • 55. Implementation of Logistic Regression 7. Predicting the Test set results:
  • 56. Implementation of Logistic Regression 8. Visualize the Train set results:
  • 57. Implementation of Logistic Regression 9. Visualize the Test set results:
  • 58. Implementation of Logistic Regression 11. Evaluating the model: Understanding the Confusion Matrix: N = 134 Predicted: No Predicted: Yes Actual: No TN=79 FP=6 Actual: Yes FN=11 TP=38 Accuracy: (TN+TP)/N (79+38)/134 = 0.87 Misclassification Rate: (FP+FN)/N (6+11)/134 = 0.13
  • 60. Decision Tree Decision Tree is a tree where each node represents a feature (attribute), each link (branch) represents a decision and each leaf represents an outcome (categorical or continuous value). Should the person accept a new job offer? Yes Salary > $60,000 Root Node Accept a job offer? Reject Offer No Leaf node Accept offer Yes Reject Offer No Reject Offer YesNo Performance Incentives Decision node Commute > 1 hour
  • 61. Implementation of Decision Tree Decision Tree and Random Forest: Does Kyphosis exist after a surgery? Bunch of kids Kyphosis surgery Predict kyphosis present or absent?
  • 62. Implementation of Decision Tree Classification Tree for Kyphosis: Start>=8.5 Absent 64/17 Present 8/11 No Start>=14.5 Absent 56/6 Yes Absent 12/0 Yes Absent 29/0 Yes Absent 12/2 Yes Age<55 Absent 27/6 No Age>=111 Absent 15/6 No Present 3/4 No
  • 63. Implementation of Decision Tree 1. Load the libraries: 2. Import the dataset and extract the independent and dependent variables:
  • 64. Implementation of Decision Tree 3. Visualize the data:
  • 65. Implementation of Decision Tree 4. Split the data into Train and Test set: 5. Train a Decision Tree:
  • 66. Implementation of Decision Tree 6. Predict the Model:
  • 67. Implementation of Decision Tree N = 25 Predicted: No Predicted: Yes Actual: No TN=16 FP=4 Actual: Yes FN=2 TP=3 7. Evaluate the Model: Understanding the confusion matrix: Accuracy: (TN+TP)/N (16+3)/25 = 0.76 Misclassification Rate: (FP+FN)/N (4+2)/25 = 0.24
  • 68. Improving performance using Random Forest Compare the model using Random Forest Tree: Accuracy: (TN+TP)/N (18+2)/25 = 0.80 Misclassification Rate: (FP+FN)/N (2+3)/25 = 0.20
  • 70. K Nearest Neighbors (KNN) K Nearest Neighbors: KNN is a Classification algorithm generally used to predict categorical values. Height(ft) Weight (lbs) Class Dog 1.5 3.5 2.0 3.0 2.5 1.0 0.5 0 65 75 9585 105 Class Cat Weight (lbs) Class Dog 1.5 3.5 2.0 3.0 2.5 1.0 0.5 0 65 75 9585 105 Height(ft) New data point Class Cat To find if a new data point is a or a ?
  • 71. Choosing a K will define what class a new data point is assigned to: K Nearest Neighbors Height(ft) Class Dog Weight (lbs) 0.5 2.5 2.0 1.5 3.0 1.0 3.5 10565 75 85 95 Class Cat K=3 If K=3, the new data point belongs to class Cat K=7 If K=7, the new data point belongs to class Dog
  • 72. Implementation of KNN Predict if a person will buy an SUV based on Age and Estimated Salary Age Estimated Salary
  • 73. Implementation of KNN 1. Load the Libraries: 2. Load the Dataset:
  • 74. Implementation of KNN 3. Visualize the dataset:
  • 75. Implementation of KNN 4. Split the data into Train and Test set: 5. Feature Scaling:
  • 76. Implementation of KNN 6. Fit KNN to Train set: 7. Predict the Test set results:
  • 77. Implementation of KNN 8. Visualize the Train set results:
  • 78. Implementation of KNN 9. Visualize the Test set results:
  • 79. Implementation of KNN 10. Evaluate the model by creating a confusion matrix: Understanding the confusion matrix: N = 100 Predicted: No Predicted: Yes Actual: No TN=64 FP=4 Actual: Yes FN=3 TP=29 Accuracy: (TN+TP)/N (64+29)/100 = 0.93 Misclassification Rate: (FP+FN)/N (4+3)/100 = 0.07

Editor's Notes