SlideShare une entreprise Scribd logo
MODEL TRAINING
Muhammad Umar
UIAI Lab
CONTENTS
 Linear Regression
 Gradient Descent
 Polynomial Regression
 Learning Curve
 Regularized Linear Models
 Logistic Regression
LINEAR
REGRESSION
 𝑦 = 𝜃0 + 𝜃1𝑥1 + 𝜃2𝑥2 + 𝜃3𝑥3 + ⋯ + 𝜃𝑛𝑥𝑛
• y ∶ predicted value
• n : size of data
• x : input data
 𝑀𝑆𝐸 𝑋, ℎ𝜃 =
1
𝑚 𝑖=1
𝑚
(𝜃𝑇𝑥 𝑖 − 𝑦 𝑖 )2
• Mean Squared Error
 Cost function
 Predicted Value – Actual Value
 Similar to the actual values, MSE value is small
GRADIENT
DESCENT AND
ITS TYPES
 Method to find local optima (maximum or minimum)
 To adjust the parameters repeatedly to minimize the cost
function
 Gradient tells us direction of greatest increase
 Learning step is learning rate
Cost
Local minimum
Global minimum
Plateau
Figure: Gradient Descent pitfalls
Cost
Start
Figure: Learning Rate
Batch
Gradient
Descent
Mini-
Batch
Gradient
Descent
Stochastic
Gradient
Descent
TYPES
POLYNOMIAL
REGRESSION
Figure: Non-Linear
Dataset
Figure: Polynomial Regression
Predictions
 Not linear, complex shape
 Add the increments of each characteristics as a new characteristic
 Train linear models on datasets with extended characteristics.
LEARNING
CURVE
 Learning curve shows how accuracy changes with varying
sample size.
 Make subset in training set and train several times.
Figure: Learning Curve
REGULARIZED
LINEAR MODELS
 𝐽 𝜃 = 𝑀𝑆𝐸 𝜃 + 𝛼 𝑖=1
𝑛
𝜃𝑖
2
 𝛼 : Parameter for regulate
Figure: Ridge Regularization
LOGISTIC
REGRESSION
 Compute the sum of weights for the input
 𝑝 = ℎ𝜃 𝑥 = 𝜎 𝜃𝑇𝑥
 𝜎 : Sigmoid function; Sigmoid curve
 Output : 0 ~ 1
Figure: Logistic function
𝜎 𝑡 =
1
1 + 𝑒−𝑡
Thank You

Contenu connexe

Similaire à Training Models Chapter 4 Hands on Machine Learning Book

Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjdArjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
12345arjitcs
 
Linear Regression
Linear RegressionLinear Regression
Linear Regression
Abdullah al Mamun
 

Similaire à Training Models Chapter 4 Hands on Machine Learning Book (20)

Training DNN Models - II.pptx
Training DNN Models - II.pptxTraining DNN Models - II.pptx
Training DNN Models - II.pptx
 
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Neural Learning to Rank
Neural Learning to RankNeural Learning to Rank
Neural Learning to Rank
 
Session 4 .pdf
Session 4 .pdfSession 4 .pdf
Session 4 .pdf
 
Regression
RegressionRegression
Regression
 
L1 intro2 supervised_learning
L1 intro2 supervised_learningL1 intro2 supervised_learning
L1 intro2 supervised_learning
 
dimension reduction.ppt
dimension reduction.pptdimension reduction.ppt
dimension reduction.ppt
 
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjdArjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
 
Methods of Optimization in Machine Learning
Methods of Optimization in Machine LearningMethods of Optimization in Machine Learning
Methods of Optimization in Machine Learning
 
Report
ReportReport
Report
 
Linear, Machine Learning or Probabilistic Predictive Models: What's Best for ...
Linear, Machine Learning or Probabilistic Predictive Models: What's Best for ...Linear, Machine Learning or Probabilistic Predictive Models: What's Best for ...
Linear, Machine Learning or Probabilistic Predictive Models: What's Best for ...
 
Building and deploying analytics
Building and deploying analyticsBuilding and deploying analytics
Building and deploying analytics
 
Linear Regression
Linear RegressionLinear Regression
Linear Regression
 
An Introduction to Deep Learning
An Introduction to Deep LearningAn Introduction to Deep Learning
An Introduction to Deep Learning
 
Introduction to Deep Learning
Introduction to Deep LearningIntroduction to Deep Learning
Introduction to Deep Learning
 
MLEARN 210 B Autumn 2018: Lecture 1
MLEARN 210 B Autumn 2018: Lecture 1MLEARN 210 B Autumn 2018: Lecture 1
MLEARN 210 B Autumn 2018: Lecture 1
 
MLHEP 2015: Introductory Lecture #3
MLHEP 2015: Introductory Lecture #3MLHEP 2015: Introductory Lecture #3
MLHEP 2015: Introductory Lecture #3
 
Bootcamp of new world to taken seriously
Bootcamp of new world to taken seriouslyBootcamp of new world to taken seriously
Bootcamp of new world to taken seriously
 
Recommender Systems from A to Z – Model Training
Recommender Systems from A to Z – Model TrainingRecommender Systems from A to Z – Model Training
Recommender Systems from A to Z – Model Training
 

Dernier

DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DrGurudutt
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
Kamal Acharya
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
Kamal Acharya
 
Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
Kamal Acharya
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 

Dernier (20)

The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Pharmacy management system project report..pdf
Pharmacy management system project report..pdfPharmacy management system project report..pdf
Pharmacy management system project report..pdf
 
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data StreamKIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
 
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and ClusteringKIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
 
An improvement in the safety of big data using blockchain technology
An improvement in the safety of big data using blockchain technologyAn improvement in the safety of big data using blockchain technology
An improvement in the safety of big data using blockchain technology
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationKIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
 
Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering Workshop
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
 
retail automation billing system ppt.pptx
retail automation billing system ppt.pptxretail automation billing system ppt.pptx
retail automation billing system ppt.pptx
 

Training Models Chapter 4 Hands on Machine Learning Book

  • 2. CONTENTS  Linear Regression  Gradient Descent  Polynomial Regression  Learning Curve  Regularized Linear Models  Logistic Regression
  • 3. LINEAR REGRESSION  𝑦 = 𝜃0 + 𝜃1𝑥1 + 𝜃2𝑥2 + 𝜃3𝑥3 + ⋯ + 𝜃𝑛𝑥𝑛 • y ∶ predicted value • n : size of data • x : input data  𝑀𝑆𝐸 𝑋, ℎ𝜃 = 1 𝑚 𝑖=1 𝑚 (𝜃𝑇𝑥 𝑖 − 𝑦 𝑖 )2 • Mean Squared Error  Cost function  Predicted Value – Actual Value  Similar to the actual values, MSE value is small
  • 4. GRADIENT DESCENT AND ITS TYPES  Method to find local optima (maximum or minimum)  To adjust the parameters repeatedly to minimize the cost function  Gradient tells us direction of greatest increase  Learning step is learning rate Cost Local minimum Global minimum Plateau Figure: Gradient Descent pitfalls Cost Start Figure: Learning Rate Batch Gradient Descent Mini- Batch Gradient Descent Stochastic Gradient Descent TYPES
  • 5. POLYNOMIAL REGRESSION Figure: Non-Linear Dataset Figure: Polynomial Regression Predictions  Not linear, complex shape  Add the increments of each characteristics as a new characteristic  Train linear models on datasets with extended characteristics.
  • 6. LEARNING CURVE  Learning curve shows how accuracy changes with varying sample size.  Make subset in training set and train several times. Figure: Learning Curve
  • 7. REGULARIZED LINEAR MODELS  𝐽 𝜃 = 𝑀𝑆𝐸 𝜃 + 𝛼 𝑖=1 𝑛 𝜃𝑖 2  𝛼 : Parameter for regulate Figure: Ridge Regularization
  • 8. LOGISTIC REGRESSION  Compute the sum of weights for the input  𝑝 = ℎ𝜃 𝑥 = 𝜎 𝜃𝑇𝑥  𝜎 : Sigmoid function; Sigmoid curve  Output : 0 ~ 1 Figure: Logistic function 𝜎 𝑡 = 1 1 + 𝑒−𝑡

Notes de l'éditeur

  1. Consider talking about: Cybernetics and brain simulation Symbolic Sub-symbolic Statistical learning Integrating the approaches
  2. Consider talking about: Search and optimization Logic Probabilistic methods for uncertain reasoning Classifiers and statistical learning methods Artificial neural networks Evaluating progress