SlideShare a Scribd company logo
10. Advice for applying Machine
Learning:
EVALUATING A HYPOTHESIS:
Due to overfitting, the learned hypothesis may fail to generalize to
new examples not in training set
One way to evaluate the hypothesis:
To evaluate a hypothesis, given a dataset of training examples, we
can split up the data into two sets: a training set and a test set.
➢Train the model only using the 70% of input dataset, and use
the remaining 30% as test set: and check if the predictions
match the given values
➢When dividing the dataset into training set and test set, make
sure the data is not ordered in any way. Randomize it. Random
is better.
Procedure:
Err is 1→ if o/p was actually 1 but hypothesis gave 0 OR
o/p was 0 but hypothesis gave 1
Otherwise (when hypothesis and o/p match), its 0.
Test error – Gives us the proportion of the test data that was
misclassified
HOW TO SELECT MODEL:
We might generally expect JCV(θ) To be lower than Jtest (θ) because:
An extra parameter (d, the degree of the polynomial) has been fit
to the cross-validation set.
➢Here, superscript is the no of model chosen (degree of
polynomial)
➔ Pick the model with lowest JCV(Θ): let’s say d=4 is the one
BIAS AND VARIANCE:
High bias is underfitting and high variance is overfitting. Ideally, we
need to find a golden mean between these two.
We need to distinguish whether bias or variance is the problem
contributing to bad predictions.
The training error will tend to decrease as we increase the degree d
of the polynomial.
At the same time, the cross-validation error will tend to decrease as
we increase d up to a point, and then it will increase as d is
increased, forming a convex curve.
DETERMINING WHETHER ITS BIAS OR VARIANCE:
Diagnosing: means determining/localizing the problem
Bias and Variance vs Regularization:
As λ approaches 0, hypothesis tends to overfit
Choosing the regularization parameter λ:
Pick the one which gives lowest Jcv (say 5th
one)
BIAS/VARIANECE vs m (NO OF TRAINING EXAMPLES):
Jcv tend to decrease as → more the no of training examples, better
is the generalization to new data
For high bias, as the training examples increases → Jcv and Jtrain
come close to each other and both have a pretty high value
The Jtrain remains small as the data is perfectly fitted to trained
model(overfitted). But, the Jcv is quite high due to lack of
generalization to new data
For high variance, the gap is quite large, but as we further increase
the no of training examples, it is actually helpful.
Debugging a learning algo:
We can choose any type of NN, but a good choice is to chose a large
NN with many hidden units or with many hidden layers, and use
regularization in it to prevent overfitting.
One good approach is to:
• Try various types of NN
• Select the one with lowest JCV
➔ Why is the recommended approach to perform error
analysis using the cross-validation data used to compute
JCV(θ) rather than the test data used to compute Jtest(θ)?
If we develop new features by examining the test set, then we may
end up choosing features that work well specifically for the test set,
so Jtest(θ) is no longer a good estimate of how well we generalize
to new examples.

More Related Content

What's hot

14 dimentionality reduction
14 dimentionality reduction14 dimentionality reduction
14 dimentionality reduction
TanmayVijay1
 
13 unsupervised learning clustering
13 unsupervised learning   clustering13 unsupervised learning   clustering
13 unsupervised learning clustering
TanmayVijay1
 
Error Finding in Numerical method
Error Finding in Numerical methodError Finding in Numerical method
Error Finding in Numerical method
Fazle Rabbi Ador
 
Approximation and error
Approximation and errorApproximation and error
Approximation and errorrubenarismendi
 
Linear regression in machine learning
Linear regression in machine learningLinear regression in machine learning
Linear regression in machine learning
Shajun Nisha
 
Numerical approximation
Numerical approximationNumerical approximation
Numerical approximationMileacre
 
Logistic regression in Machine Learning
Logistic regression in Machine LearningLogistic regression in Machine Learning
Logistic regression in Machine Learning
Kuppusamy P
 
Antiderivatives And Slope Fields
Antiderivatives And Slope FieldsAntiderivatives And Slope Fields
Antiderivatives And Slope Fieldsseltzermath
 
U6 Cn2 Definite Integrals Intro
U6 Cn2 Definite Integrals IntroU6 Cn2 Definite Integrals Intro
U6 Cn2 Definite Integrals IntroAlexander Burt
 
NUMERICAL METHOD
NUMERICAL METHODNUMERICAL METHOD
NUMERICAL METHOD
shahzadebaujiti
 
Chapter 2 continuous_random_variable_2009
Chapter 2 continuous_random_variable_2009Chapter 2 continuous_random_variable_2009
Chapter 2 continuous_random_variable_2009ayimsevenfold
 
Numerical approximation and solution of equations
Numerical approximation and solution of equationsNumerical approximation and solution of equations
Numerical approximation and solution of equationsRobinson
 
Error analysis
Error analysisError analysis
Error analysis
Saloni Singhal
 
Use of Linear Regression in Machine Learning for Ranking
Use of Linear Regression in Machine Learning for RankingUse of Linear Regression in Machine Learning for Ranking
Use of Linear Regression in Machine Learning for Ranking
ijsrd.com
 
PartOne
PartOnePartOne
PartOne?? ?
 
Error(Computer Oriented Numerical and Statistical Method)
Error(Computer Oriented Numerical and Statistical Method)Error(Computer Oriented Numerical and Statistical Method)
Error(Computer Oriented Numerical and Statistical Method)
AyushiDubey19
 
Random number generation
Random number generationRandom number generation
Random number generation
De La Salle University-Manila
 

What's hot (20)

14 dimentionality reduction
14 dimentionality reduction14 dimentionality reduction
14 dimentionality reduction
 
13 unsupervised learning clustering
13 unsupervised learning   clustering13 unsupervised learning   clustering
13 unsupervised learning clustering
 
Error Finding in Numerical method
Error Finding in Numerical methodError Finding in Numerical method
Error Finding in Numerical method
 
Approximation and error
Approximation and errorApproximation and error
Approximation and error
 
Numerical Method
Numerical Method Numerical Method
Numerical Method
 
Linear regression in machine learning
Linear regression in machine learningLinear regression in machine learning
Linear regression in machine learning
 
Numerical approximation
Numerical approximationNumerical approximation
Numerical approximation
 
Logistic regression in Machine Learning
Logistic regression in Machine LearningLogistic regression in Machine Learning
Logistic regression in Machine Learning
 
Antiderivatives And Slope Fields
Antiderivatives And Slope FieldsAntiderivatives And Slope Fields
Antiderivatives And Slope Fields
 
U6 Cn2 Definite Integrals Intro
U6 Cn2 Definite Integrals IntroU6 Cn2 Definite Integrals Intro
U6 Cn2 Definite Integrals Intro
 
NUMERICAL METHOD
NUMERICAL METHODNUMERICAL METHOD
NUMERICAL METHOD
 
Chapter 2 continuous_random_variable_2009
Chapter 2 continuous_random_variable_2009Chapter 2 continuous_random_variable_2009
Chapter 2 continuous_random_variable_2009
 
Numerical approximation and solution of equations
Numerical approximation and solution of equationsNumerical approximation and solution of equations
Numerical approximation and solution of equations
 
Error analysis
Error analysisError analysis
Error analysis
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Use of Linear Regression in Machine Learning for Ranking
Use of Linear Regression in Machine Learning for RankingUse of Linear Regression in Machine Learning for Ranking
Use of Linear Regression in Machine Learning for Ranking
 
PartOne
PartOnePartOne
PartOne
 
Error(Computer Oriented Numerical and Statistical Method)
Error(Computer Oriented Numerical and Statistical Method)Error(Computer Oriented Numerical and Statistical Method)
Error(Computer Oriented Numerical and Statistical Method)
 
Random number generation
Random number generationRandom number generation
Random number generation
 
Extrapolation
ExtrapolationExtrapolation
Extrapolation
 

Similar to 10 advice for applying ml

Hypothesis Testing techniques in social research.ppt
Hypothesis Testing techniques in social research.pptHypothesis Testing techniques in social research.ppt
Hypothesis Testing techniques in social research.ppt
Solomonkiplimo
 
chap4_Parametric_Methods.ppt
chap4_Parametric_Methods.pptchap4_Parametric_Methods.ppt
chap4_Parametric_Methods.ppt
ShayanChowdary
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.pptbutest
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.pptbutest
 
WEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been LearnedWEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been Learned
weka Content
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedWEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been Learned
DataminingTools Inc
 
M08 BiasVarianceTradeoff
M08 BiasVarianceTradeoffM08 BiasVarianceTradeoff
M08 BiasVarianceTradeoff
Raman Kannan
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
Abhimanyu Dwivedi
 
SVM - Functional Verification
SVM - Functional VerificationSVM - Functional Verification
SVM - Functional Verification
Sai Kiran Kadam
 
Learning On The Border:Active Learning in Imbalanced classification Data
Learning On The Border:Active Learning in Imbalanced classification DataLearning On The Border:Active Learning in Imbalanced classification Data
Learning On The Border:Active Learning in Imbalanced classification Data萍華 楊
 
Predicting breast cancer: Adrian Valles
Predicting breast cancer: Adrian VallesPredicting breast cancer: Adrian Valles
Predicting breast cancer: Adrian Valles
Adrián Vallés
 
Statistical Learning and Model Selection module 2.pptx
Statistical Learning and Model Selection module 2.pptxStatistical Learning and Model Selection module 2.pptx
Statistical Learning and Model Selection module 2.pptx
nagarajan740445
 
non para.doc
non para.docnon para.doc
non para.doc
Annamalai University
 
Machine learning (5)
Machine learning (5)Machine learning (5)
Machine learning (5)NYversity
 
ngboost.pptx
ngboost.pptxngboost.pptx
ngboost.pptx
Hadrian7
 
Chapter 20 and 21 combined testing hypotheses about proportions 2013
Chapter 20 and 21 combined testing hypotheses about proportions 2013Chapter 20 and 21 combined testing hypotheses about proportions 2013
Chapter 20 and 21 combined testing hypotheses about proportions 2013calculistictt
 

Similar to 10 advice for applying ml (20)

Hypothesis Testing techniques in social research.ppt
Hypothesis Testing techniques in social research.pptHypothesis Testing techniques in social research.ppt
Hypothesis Testing techniques in social research.ppt
 
chap4_Parametric_Methods.ppt
chap4_Parametric_Methods.pptchap4_Parametric_Methods.ppt
chap4_Parametric_Methods.ppt
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.ppt
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.ppt
 
WEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been LearnedWEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been Learned
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedWEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been Learned
 
M08 BiasVarianceTradeoff
M08 BiasVarianceTradeoffM08 BiasVarianceTradeoff
M08 BiasVarianceTradeoff
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
 
StatVignette06_HypTesting.pptx
StatVignette06_HypTesting.pptxStatVignette06_HypTesting.pptx
StatVignette06_HypTesting.pptx
 
SVM - Functional Verification
SVM - Functional VerificationSVM - Functional Verification
SVM - Functional Verification
 
abcxyz
abcxyzabcxyz
abcxyz
 
Learning On The Border:Active Learning in Imbalanced classification Data
Learning On The Border:Active Learning in Imbalanced classification DataLearning On The Border:Active Learning in Imbalanced classification Data
Learning On The Border:Active Learning in Imbalanced classification Data
 
Predicting breast cancer: Adrian Valles
Predicting breast cancer: Adrian VallesPredicting breast cancer: Adrian Valles
Predicting breast cancer: Adrian Valles
 
Statistical Learning and Model Selection module 2.pptx
Statistical Learning and Model Selection module 2.pptxStatistical Learning and Model Selection module 2.pptx
Statistical Learning and Model Selection module 2.pptx
 
non para.doc
non para.docnon para.doc
non para.doc
 
Machine learning (5)
Machine learning (5)Machine learning (5)
Machine learning (5)
 
ngboost.pptx
ngboost.pptxngboost.pptx
ngboost.pptx
 
evaluation and credibility-Part 1
evaluation and credibility-Part 1evaluation and credibility-Part 1
evaluation and credibility-Part 1
 
Docs slides-lecture10
Docs slides-lecture10Docs slides-lecture10
Docs slides-lecture10
 
Chapter 20 and 21 combined testing hypotheses about proportions 2013
Chapter 20 and 21 combined testing hypotheses about proportions 2013Chapter 20 and 21 combined testing hypotheses about proportions 2013
Chapter 20 and 21 combined testing hypotheses about proportions 2013
 

More from TanmayVijay1

18 application example photo ocr
18 application example  photo ocr18 application example  photo ocr
18 application example photo ocr
TanmayVijay1
 
1 Introduction to Machine Learning
1 Introduction to Machine Learning1 Introduction to Machine Learning
1 Introduction to Machine Learning
TanmayVijay1
 
16 recommender systems
16 recommender systems16 recommender systems
16 recommender systems
TanmayVijay1
 
11 ml system design
11 ml system design11 ml system design
11 ml system design
TanmayVijay1
 
5 octave tutorial
5 octave tutorial5 octave tutorial
5 octave tutorial
TanmayVijay1
 
4 linear regeression with multiple variables
4 linear regeression with multiple variables4 linear regeression with multiple variables
4 linear regeression with multiple variables
TanmayVijay1
 
3 linear algebra review
3 linear algebra review3 linear algebra review
3 linear algebra review
TanmayVijay1
 

More from TanmayVijay1 (7)

18 application example photo ocr
18 application example  photo ocr18 application example  photo ocr
18 application example photo ocr
 
1 Introduction to Machine Learning
1 Introduction to Machine Learning1 Introduction to Machine Learning
1 Introduction to Machine Learning
 
16 recommender systems
16 recommender systems16 recommender systems
16 recommender systems
 
11 ml system design
11 ml system design11 ml system design
11 ml system design
 
5 octave tutorial
5 octave tutorial5 octave tutorial
5 octave tutorial
 
4 linear regeression with multiple variables
4 linear regeression with multiple variables4 linear regeression with multiple variables
4 linear regeression with multiple variables
 
3 linear algebra review
3 linear algebra review3 linear algebra review
3 linear algebra review
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 

Recently uploaded (20)

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 

10 advice for applying ml

  • 1. 10. Advice for applying Machine Learning:
  • 2. EVALUATING A HYPOTHESIS: Due to overfitting, the learned hypothesis may fail to generalize to new examples not in training set One way to evaluate the hypothesis: To evaluate a hypothesis, given a dataset of training examples, we can split up the data into two sets: a training set and a test set.
  • 3. ➢Train the model only using the 70% of input dataset, and use the remaining 30% as test set: and check if the predictions match the given values ➢When dividing the dataset into training set and test set, make sure the data is not ordered in any way. Randomize it. Random is better. Procedure:
  • 4. Err is 1→ if o/p was actually 1 but hypothesis gave 0 OR o/p was 0 but hypothesis gave 1 Otherwise (when hypothesis and o/p match), its 0. Test error – Gives us the proportion of the test data that was misclassified HOW TO SELECT MODEL:
  • 5. We might generally expect JCV(θ) To be lower than Jtest (θ) because: An extra parameter (d, the degree of the polynomial) has been fit to the cross-validation set. ➢Here, superscript is the no of model chosen (degree of polynomial) ➔ Pick the model with lowest JCV(Θ): let’s say d=4 is the one
  • 6. BIAS AND VARIANCE: High bias is underfitting and high variance is overfitting. Ideally, we need to find a golden mean between these two. We need to distinguish whether bias or variance is the problem contributing to bad predictions. The training error will tend to decrease as we increase the degree d of the polynomial.
  • 7. At the same time, the cross-validation error will tend to decrease as we increase d up to a point, and then it will increase as d is increased, forming a convex curve. DETERMINING WHETHER ITS BIAS OR VARIANCE: Diagnosing: means determining/localizing the problem Bias and Variance vs Regularization:
  • 8. As λ approaches 0, hypothesis tends to overfit Choosing the regularization parameter λ: Pick the one which gives lowest Jcv (say 5th one)
  • 9. BIAS/VARIANECE vs m (NO OF TRAINING EXAMPLES):
  • 10. Jcv tend to decrease as → more the no of training examples, better is the generalization to new data For high bias, as the training examples increases → Jcv and Jtrain come close to each other and both have a pretty high value
  • 11. The Jtrain remains small as the data is perfectly fitted to trained model(overfitted). But, the Jcv is quite high due to lack of generalization to new data For high variance, the gap is quite large, but as we further increase the no of training examples, it is actually helpful.
  • 12. Debugging a learning algo: We can choose any type of NN, but a good choice is to chose a large NN with many hidden units or with many hidden layers, and use regularization in it to prevent overfitting.
  • 13. One good approach is to: • Try various types of NN • Select the one with lowest JCV ➔ Why is the recommended approach to perform error analysis using the cross-validation data used to compute JCV(θ) rather than the test data used to compute Jtest(θ)? If we develop new features by examining the test set, then we may end up choosing features that work well specifically for the test set, so Jtest(θ) is no longer a good estimate of how well we generalize to new examples.