SlideShare a Scribd company logo
1 of 30
Download to read offline
Advice	
  for	
  applying	
  
machine	
  learning	
  

Deciding	
  what	
  
to	
  try	
  next	
  
Machine	
  Learning	
  
Debugging	
  a	
  learning	
  algorithm:	
  
Suppose	
  you	
  have	
  implemented	
  regularized	
  linear	
  regression	
  to	
  predict	
  housing	
  
prices.	
  
	
  
	
  
	
  
However,	
  when	
  you	
  test	
  your	
  hypothesis	
  on	
  a	
  new	
  set	
  of	
  houses,	
  you	
  find	
  that	
  
it	
  makes	
  unacceptably	
  large	
  errors	
  in	
  its	
  predicDons.	
  What	
  should	
  you	
  try	
  next?	
  	
  
-­‐ 
-­‐ 
-­‐ 
-­‐ 
-­‐ 
-­‐ 

Get	
  more	
  training	
  examples	
  
Try	
  smaller	
  sets	
  of	
  features	
  
Try	
  geJng	
  addiDonal	
  features	
  
Try	
  adding	
  polynomial	
  features	
  
Try	
  decreasing	
  
Try	
  increasing	
  

Andrew	
  Ng	
  
Machine	
  learning	
  diagnos5c:	
  
DiagnosDc:	
  A	
  test	
  that	
  you	
  can	
  run	
  to	
  gain	
  insight	
  what	
  
is/isn’t	
  working	
  with	
  a	
  learning	
  algorithm,	
  and	
  gain	
  
guidance	
  as	
  to	
  how	
  best	
  to	
  improve	
  its	
  performance.	
  
DiagnosDcs	
  can	
  take	
  Dme	
  to	
  implement,	
  but	
  doing	
  so	
  
can	
  be	
  a	
  very	
  good	
  use	
  of	
  your	
  Dme.	
  

Andrew	
  Ng	
  
Advice	
  for	
  applying	
  
machine	
  learning	
  

EvaluaDng	
  a	
  
hypothesis	
  
Machine	
  Learning	
  
Evalua5ng	
  your	
  hypothesis	
  
price	
  

Fails	
  to	
  generalize	
  to	
  new	
  
examples	
  not	
  in	
  training	
  set.	
  

size	
  

size	
  of	
  house	
  
no.	
  of	
  bedrooms	
  
no.	
  of	
  floors	
  
age	
  of	
  house	
  
average	
  income	
  in	
  neighborhood	
  
kitchen	
  size	
  

Andrew	
  Ng	
  
Evalua5ng	
  your	
  hypothesis	
  
Dataset:	
  
Size	
  

Price	
  

2104	
  
1600	
  
2400	
  
1416	
  
3000	
  
1985	
  
1534	
  
1427	
  
1380	
  
1494	
  

400	
  
330	
  
369	
  
232	
  
540	
  
300	
  
315	
  
199	
  
212	
  
243	
  

Andrew	
  Ng	
  
Training/tes5ng	
  procedure	
  for	
  linear	
  regression	
  
-­‐  Learn	
  parameter	
  	
  	
  	
  	
  from	
  training	
  data	
  (minimizing	
  
training	
  error	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  )	
  
-­‐  Compute	
  test	
  set	
  error:	
  
	
  

Andrew	
  Ng	
  
Training/tes5ng	
  procedure	
  for	
  logis5c	
  regression	
  
-­‐  Learn	
  parameter	
  	
  	
  	
  	
  from	
  training	
  data	
  
-­‐  Compute	
  test	
  set	
  error:	
  
	
  
-­‐  MisclassificaDon	
  error	
  (0/1	
  misclassificaDon	
  error):	
  
	
  

Andrew	
  Ng	
  
Advice	
  for	
  applying	
  
machine	
  learning	
  
Model	
  selecDon	
  and	
  
training/validaDon/test	
  
sets	
  
Machine	
  Learning	
  
price	
  

OverfiBng	
  example	
  

size	
  

Once	
  parameters	
  
were	
  fit	
  to	
  some	
  set	
  of	
  data	
  
(training	
  set),	
  the	
  error	
  of	
  the	
  
parameters	
  as	
  measured	
  on	
  
that	
  data	
  (the	
  training	
  error	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
xxxxx)	
  is	
  likely	
  to	
  be	
  lower	
  
than	
  the	
  actual	
  generalizaDon	
  
error.	
  

Andrew	
  Ng	
  
Model	
  selec5on	
  
1.	
  
2.	
  
3.	
  
	
  
10.	
  
Choose	
  
How	
  well	
  does	
  the	
  model	
  generalize?	
  Report	
  test	
  set	
  
error	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  
Problem:	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  is	
  likely	
  to	
  be	
  an	
  opDmisDc	
  esDmate	
  of	
  
generalizaDon	
  error.	
  I.e.	
  our	
  extra	
  parameter	
  (	
  	
  	
  	
  =	
  degree	
  of	
  
polynomial)	
  is	
  fit	
  to	
  test	
  set.	
  

Andrew	
  Ng	
  
Evalua5ng	
  your	
  hypothesis	
  
Dataset:	
  
Size	
  

Price	
  

2104	
  
1600	
  
2400	
  
1416	
  
3000	
  
1985	
  
1534	
  
1427	
  
1380	
  
1494	
  

400	
  
330	
  
369	
  
232	
  
540	
  
300	
  
315	
  
199	
  
212	
  
243	
  

Andrew	
  Ng	
  
Train/valida5on/test	
  error	
  
Training	
  error:	
  

Cross	
  ValidaDon	
  error:	
  

Test	
  error:	
  

Andrew	
  Ng	
  
Model	
  selec5on	
  
1.	
  
2.	
  
3.	
  
	
  
10.	
  
Pick	
  
EsDmate	
  generalizaDon	
  error	
  	
  for	
  test	
  set	
  

Andrew	
  Ng	
  
Advice	
  for	
  applying	
  
machine	
  learning	
  

Diagnosing	
  bias	
  vs.	
  
variance	
  
Machine	
  Learning	
  
Size	
  

High	
  bias	
  
(underfit)	
  

Price	
  

Price	
  

Price	
  

Bias/variance	
  

Size	
  

“Just	
  right”	
  

Size	
  

High	
  variance	
  
(overfit)	
  

Andrew	
  Ng	
  
Bias/variance	
  
Training	
  error:	
  

error	
  

Cross	
  validaDon	
  error:	
  

degree	
  of	
  polynomial	
  d	
  

Andrew	
  Ng	
  
Diagnosing	
  bias	
  vs.	
  variance	
  

error	
  

Suppose	
  your	
  learning	
  algorithm	
  is	
  performing	
  less	
  well	
  than	
  
you	
  were	
  hoping.	
  (	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  or	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  is	
  high.)	
  	
  Is	
  it	
  a	
  bias	
  
problem	
  or	
  a	
  variance	
  problem?	
  
Bias	
  (underfit):	
  
(cross	
  validaDon	
  	
  
error)	
  

Variance	
  (overfit):	
  
(training	
  error)	
  

degree	
  of	
  polynomial	
  d	
  

Andrew	
  Ng	
  
Advice	
  for	
  applying	
  
machine	
  learning	
  

RegularizaDon	
  and	
  
bias/variance	
  
Machine	
  Learning	
  
Linear	
  regression	
  with	
  regulariza5on	
  

Price	
  

Price	
  

Price	
  

Model:	
  

Size	
  

Size	
  

Large	
  xx	
  
High	
  bias	
  (underfit)	
  

Intermediate	
  xx	
  
“Just	
  right”	
  

Size	
  

Small	
  xx	
  
High	
  variance	
  (overfit)	
  

Andrew	
  Ng	
  
Choosing	
  the	
  regulariza5on	
  parameter	
  	
  

Andrew	
  Ng	
  
Choosing	
  the	
  regulariza5on	
  parameter	
  	
  
Model:	
  
1.  Try	
  
2.  Try	
  
3.  Try	
  
4.  Try	
  
5.  Try	
  
	
  
12. Try	
  
Pick	
  (say)	
  	
  	
  	
  	
  	
  	
  .	
  	
  Test	
  error:	
  

Andrew	
  Ng	
  
Bias/variance	
  as	
  a	
  func5on	
  of	
  the	
  regulariza5on	
  parameter	
  

Andrew	
  Ng	
  
Advice	
  for	
  applying	
  
machine	
  learning	
  

Learning	
  curves	
  
Machine	
  Learning	
  
error	
  

Learning	
  curves	
  

(training	
  set	
  size)	
  

Andrew	
  Ng	
  
error	
  

price	
  

High	
  bias	
  

(training	
  set	
  size)	
  

If	
  a	
  learning	
  algorithm	
  is	
  suffering	
  
from	
   high	
   bias,	
   geJng	
   more	
  
training	
   data	
   will	
   not	
   (by	
   itself)	
  
help	
  much.	
  

price	
  

size	
  

size	
  

Andrew	
  Ng	
  
High	
  variance	
  
error	
  

price	
  

(and	
  small	
  	
  	
  	
  	
  )	
  

(training	
  set	
  size)	
  

If	
  a	
  learning	
  algorithm	
  is	
  suffering	
  
from	
   high	
   variance,	
   geJng	
   more	
  
training	
  data	
  is	
  likely	
  to	
  help.	
  

price	
  

size	
  

size	
  

Andrew	
  Ng	
  
Advice	
  for	
  applying	
  
machine	
  learning	
  

Deciding	
  what	
  to	
  
try	
  next	
  (revisited)	
  
Machine	
  Learning	
  
Debugging	
  a	
  learning	
  algorithm:	
  
Suppose	
  you	
  have	
  implemented	
  regularized	
  linear	
  regression	
  to	
  predict	
  
housing	
  prices.	
  However,	
  when	
  you	
  test	
  your	
  hypothesis	
  in	
  a	
  new	
  set	
  
of	
  houses,	
  you	
  find	
  that	
  it	
  makes	
  unacceptably	
  large	
  errors	
  in	
  its	
  
predicDon.	
  What	
  should	
  you	
  try	
  next?	
  	
  
-­‐ 
-­‐ 
-­‐ 
-­‐ 
-­‐ 
-­‐ 

Get	
  more	
  training	
  examples	
  
Try	
  smaller	
  sets	
  of	
  features	
  
Try	
  geJng	
  addiDonal	
  features	
  
Try	
  adding	
  polynomial	
  features	
  
Try	
  decreasing	
  
Try	
  increasing	
  

Andrew	
  Ng	
  
Neural	
  networks	
  and	
  overfiBng	
  
“Small”	
  neural	
  network	
  
(fewer	
  parameters;	
  more	
  
prone	
  to	
  underfiJng)	
  

ComputaDonally	
  cheaper	
  

“Large”	
  neural	
  network	
  
(more	
  parameters;	
  more	
  prone	
  
to	
  overfiJng)	
  

ComputaDonally	
  more	
  expensive.	
  
	
  
Use	
  regularizaDon	
  (	
  	
  	
  )	
  to	
  address	
  overfiJng.	
  

Andrew	
  Ng	
  

More Related Content

Viewers also liked (17)

1535 1541-1-pb
1535 1541-1-pb1535 1541-1-pb
1535 1541-1-pb
 
1.calculo leithold
1.calculo   leithold1.calculo   leithold
1.calculo leithold
 
5.calculo purcell
5.calculo   purcell5.calculo   purcell
5.calculo purcell
 
2.calculo con geometria analitica swokowski(hasta deriv)
2.calculo con geometria analitica   swokowski(hasta deriv)2.calculo con geometria analitica   swokowski(hasta deriv)
2.calculo con geometria analitica swokowski(hasta deriv)
 
Example of completed_project_eosp (1)
Example of completed_project_eosp (1)Example of completed_project_eosp (1)
Example of completed_project_eosp (1)
 
Problem set 1x
Problem set 1xProblem set 1x
Problem set 1x
 
Dinamica
DinamicaDinamica
Dinamica
 
Sec
SecSec
Sec
 
4a45f7f84be6b
4a45f7f84be6b4a45f7f84be6b
4a45f7f84be6b
 
06 apuntes arquitectura calefaccion chalet
06 apuntes arquitectura calefaccion chalet06 apuntes arquitectura calefaccion chalet
06 apuntes arquitectura calefaccion chalet
 
Interaction
InteractionInteraction
Interaction
 
Charity Treks
Charity TreksCharity Treks
Charity Treks
 
Managerial challenges of_information_technologyxx
Managerial challenges of_information_technologyxxManagerial challenges of_information_technologyxx
Managerial challenges of_information_technologyxx
 
Great Wall of China
Great Wall of ChinaGreat Wall of China
Great Wall of China
 
Quizxxx
QuizxxxQuizxxx
Quizxxx
 
prise en charge d'un cardiopathe en odontologie conservatrice
prise en charge d'un cardiopathe en odontologie conservatriceprise en charge d'un cardiopathe en odontologie conservatrice
prise en charge d'un cardiopathe en odontologie conservatrice
 
1 perkinelmerleadtestingoverview(5 pgs)
1 perkinelmerleadtestingoverview(5 pgs)1 perkinelmerleadtestingoverview(5 pgs)
1 perkinelmerleadtestingoverview(5 pgs)
 

Similar to MLDIAGNOSTICS

Machine Learning lecture7(ml system design1)
Machine Learning lecture7(ml system design1)Machine Learning lecture7(ml system design1)
Machine Learning lecture7(ml system design1)cairo university
 
Machine Learning lecture6(regularization)
Machine Learning lecture6(regularization)Machine Learning lecture6(regularization)
Machine Learning lecture6(regularization)cairo university
 
Machine learning and_nlp
Machine learning and_nlpMachine learning and_nlp
Machine learning and_nlpankit_ppt
 
Overfitting & Underfitting
Overfitting & UnderfittingOverfitting & Underfitting
Overfitting & UnderfittingSOUMIT KAR
 
Machine learning session6(decision trees random forrest)
Machine learning   session6(decision trees random forrest)Machine learning   session6(decision trees random forrest)
Machine learning session6(decision trees random forrest)Abhimanyu Dwivedi
 
Machine Learning Interview Questions
Machine Learning Interview QuestionsMachine Learning Interview Questions
Machine Learning Interview QuestionsRock Interview
 
WEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been LearnedWEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been Learnedweka Content
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedWEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedDataminingTools Inc
 
Plotcon 2016 Visualization Talk by Alexandra Johnson
Plotcon 2016 Visualization Talk  by Alexandra JohnsonPlotcon 2016 Visualization Talk  by Alexandra Johnson
Plotcon 2016 Visualization Talk by Alexandra JohnsonSigOpt
 
Underfitting and Overfitting in Machine Learning
Underfitting and Overfitting in Machine LearningUnderfitting and Overfitting in Machine Learning
Underfitting and Overfitting in Machine LearningAbdullah al Mamun
 
Machine-Learning-Overview a statistical approach
Machine-Learning-Overview a statistical approachMachine-Learning-Overview a statistical approach
Machine-Learning-Overview a statistical approachAjit Ghodke
 
Barga Data Science lecture 10
Barga Data Science lecture 10Barga Data Science lecture 10
Barga Data Science lecture 10Roger Barga
 
Machine learning with scikitlearn
Machine learning with scikitlearnMachine learning with scikitlearn
Machine learning with scikitlearnPratap Dangeti
 
6 Evaluating Predictive Performance and ensemble.pptx
6 Evaluating Predictive Performance and ensemble.pptx6 Evaluating Predictive Performance and ensemble.pptx
6 Evaluating Predictive Performance and ensemble.pptxmohammedalherwi1
 
Initializing & Optimizing Machine Learning Models
Initializing & Optimizing Machine Learning ModelsInitializing & Optimizing Machine Learning Models
Initializing & Optimizing Machine Learning ModelsEng Teong Cheah
 
NITW_Improving Deep Neural Networks (1).pptx
NITW_Improving Deep Neural Networks (1).pptxNITW_Improving Deep Neural Networks (1).pptx
NITW_Improving Deep Neural Networks (1).pptxDrKBManwade
 
NITW_Improving Deep Neural Networks.pptx
NITW_Improving Deep Neural Networks.pptxNITW_Improving Deep Neural Networks.pptx
NITW_Improving Deep Neural Networks.pptxssuserd23711
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.pptbutest
 

Similar to MLDIAGNOSTICS (20)

Machine Learning lecture7(ml system design1)
Machine Learning lecture7(ml system design1)Machine Learning lecture7(ml system design1)
Machine Learning lecture7(ml system design1)
 
Machine Learning lecture6(regularization)
Machine Learning lecture6(regularization)Machine Learning lecture6(regularization)
Machine Learning lecture6(regularization)
 
Machine learning and_nlp
Machine learning and_nlpMachine learning and_nlp
Machine learning and_nlp
 
Overfitting & Underfitting
Overfitting & UnderfittingOverfitting & Underfitting
Overfitting & Underfitting
 
Machine learning session6(decision trees random forrest)
Machine learning   session6(decision trees random forrest)Machine learning   session6(decision trees random forrest)
Machine learning session6(decision trees random forrest)
 
Regresión
RegresiónRegresión
Regresión
 
Machine Learning Interview Questions
Machine Learning Interview QuestionsMachine Learning Interview Questions
Machine Learning Interview Questions
 
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
 
Plotcon 2016 Visualization Talk by Alexandra Johnson
Plotcon 2016 Visualization Talk  by Alexandra JohnsonPlotcon 2016 Visualization Talk  by Alexandra Johnson
Plotcon 2016 Visualization Talk by Alexandra Johnson
 
Underfitting and Overfitting in Machine Learning
Underfitting and Overfitting in Machine LearningUnderfitting and Overfitting in Machine Learning
Underfitting and Overfitting in Machine Learning
 
Machine-Learning-Overview a statistical approach
Machine-Learning-Overview a statistical approachMachine-Learning-Overview a statistical approach
Machine-Learning-Overview a statistical approach
 
Barga Data Science lecture 10
Barga Data Science lecture 10Barga Data Science lecture 10
Barga Data Science lecture 10
 
Machine learning with scikitlearn
Machine learning with scikitlearnMachine learning with scikitlearn
Machine learning with scikitlearn
 
6 Evaluating Predictive Performance and ensemble.pptx
6 Evaluating Predictive Performance and ensemble.pptx6 Evaluating Predictive Performance and ensemble.pptx
6 Evaluating Predictive Performance and ensemble.pptx
 
Initializing & Optimizing Machine Learning Models
Initializing & Optimizing Machine Learning ModelsInitializing & Optimizing Machine Learning Models
Initializing & Optimizing Machine Learning Models
 
NITW_Improving Deep Neural Networks (1).pptx
NITW_Improving Deep Neural Networks (1).pptxNITW_Improving Deep Neural Networks (1).pptx
NITW_Improving Deep Neural Networks (1).pptx
 
NITW_Improving Deep Neural Networks.pptx
NITW_Improving Deep Neural Networks.pptxNITW_Improving Deep Neural Networks.pptx
NITW_Improving Deep Neural Networks.pptx
 
Machine learning yearning
Machine learning yearningMachine learning yearning
Machine learning yearning
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.ppt
 

More from libia nurys espitia hernandez

Terapiadejuegoparaniosconincapacidadde 130321174538-phpapp02
Terapiadejuegoparaniosconincapacidadde 130321174538-phpapp02Terapiadejuegoparaniosconincapacidadde 130321174538-phpapp02
Terapiadejuegoparaniosconincapacidadde 130321174538-phpapp02libia nurys espitia hernandez
 
Ensamblaje mantenimiento y operacion de maquinaria y equipos 2014 1
Ensamblaje mantenimiento y operacion de maquinaria y equipos 2014 1Ensamblaje mantenimiento y operacion de maquinaria y equipos 2014 1
Ensamblaje mantenimiento y operacion de maquinaria y equipos 2014 1libia nurys espitia hernandez
 
14 originales-herramientas-web-que-todavia-desconoces
14 originales-herramientas-web-que-todavia-desconoces14 originales-herramientas-web-que-todavia-desconoces
14 originales-herramientas-web-que-todavia-desconoceslibia nurys espitia hernandez
 

More from libia nurys espitia hernandez (20)

03investyformacion
03investyformacion03investyformacion
03investyformacion
 
Curso basico-refrigeracion-domiciliaria
Curso basico-refrigeracion-domiciliariaCurso basico-refrigeracion-domiciliaria
Curso basico-refrigeracion-domiciliaria
 
0002 la camara-digital2
0002 la camara-digital20002 la camara-digital2
0002 la camara-digital2
 
Modelo de-prueba-facultad-de-odontologia-ucv
Modelo de-prueba-facultad-de-odontologia-ucvModelo de-prueba-facultad-de-odontologia-ucv
Modelo de-prueba-facultad-de-odontologia-ucv
 
Modulometodosestadisticos2011 110329231153-phpapp01
Modulometodosestadisticos2011 110329231153-phpapp01Modulometodosestadisticos2011 110329231153-phpapp01
Modulometodosestadisticos2011 110329231153-phpapp01
 
Taller de innovacion
Taller de innovacionTaller de innovacion
Taller de innovacion
 
Teoria de telecomunicaciones i cap1y2
Teoria de telecomunicaciones i cap1y2Teoria de telecomunicaciones i cap1y2
Teoria de telecomunicaciones i cap1y2
 
Terapiadejuegoparaniosconincapacidadde 130321174538-phpapp02
Terapiadejuegoparaniosconincapacidadde 130321174538-phpapp02Terapiadejuegoparaniosconincapacidadde 130321174538-phpapp02
Terapiadejuegoparaniosconincapacidadde 130321174538-phpapp02
 
Ensamblaje mantenimiento y operacion de maquinaria y equipos 2014 1
Ensamblaje mantenimiento y operacion de maquinaria y equipos 2014 1Ensamblaje mantenimiento y operacion de maquinaria y equipos 2014 1
Ensamblaje mantenimiento y operacion de maquinaria y equipos 2014 1
 
14 originales-herramientas-web-que-todavia-desconoces
14 originales-herramientas-web-que-todavia-desconoces14 originales-herramientas-web-que-todavia-desconoces
14 originales-herramientas-web-que-todavia-desconoces
 
04 dinamica (1)
04 dinamica (1)04 dinamica (1)
04 dinamica (1)
 
0001 guia de-fotografia_2
0001 guia de-fotografia_20001 guia de-fotografia_2
0001 guia de-fotografia_2
 
Telecomunicacionesyredes 120614231942-phpapp01
Telecomunicacionesyredes 120614231942-phpapp01Telecomunicacionesyredes 120614231942-phpapp01
Telecomunicacionesyredes 120614231942-phpapp01
 
Modulo de estadistica ii
Modulo de estadistica iiModulo de estadistica ii
Modulo de estadistica ii
 
Web trig
Web trigWeb trig
Web trig
 
Identidades trigonometricas pitagoricas
Identidades trigonometricas pitagoricasIdentidades trigonometricas pitagoricas
Identidades trigonometricas pitagoricas
 
Rev completa ef
Rev completa efRev completa ef
Rev completa ef
 
Articulo1
Articulo1Articulo1
Articulo1
 
Trigonometria pavicich
Trigonometria pavicichTrigonometria pavicich
Trigonometria pavicich
 
Funciones trigonometricas
Funciones trigonometricasFunciones trigonometricas
Funciones trigonometricas
 

Recently uploaded

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 

Recently uploaded (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 

MLDIAGNOSTICS

  • 1. Advice  for  applying   machine  learning   Deciding  what   to  try  next   Machine  Learning  
  • 2. Debugging  a  learning  algorithm:   Suppose  you  have  implemented  regularized  linear  regression  to  predict  housing   prices.         However,  when  you  test  your  hypothesis  on  a  new  set  of  houses,  you  find  that   it  makes  unacceptably  large  errors  in  its  predicDons.  What  should  you  try  next?     -­‐  -­‐  -­‐  -­‐  -­‐  -­‐  Get  more  training  examples   Try  smaller  sets  of  features   Try  geJng  addiDonal  features   Try  adding  polynomial  features   Try  decreasing   Try  increasing   Andrew  Ng  
  • 3. Machine  learning  diagnos5c:   DiagnosDc:  A  test  that  you  can  run  to  gain  insight  what   is/isn’t  working  with  a  learning  algorithm,  and  gain   guidance  as  to  how  best  to  improve  its  performance.   DiagnosDcs  can  take  Dme  to  implement,  but  doing  so   can  be  a  very  good  use  of  your  Dme.   Andrew  Ng  
  • 4. Advice  for  applying   machine  learning   EvaluaDng  a   hypothesis   Machine  Learning  
  • 5. Evalua5ng  your  hypothesis   price   Fails  to  generalize  to  new   examples  not  in  training  set.   size   size  of  house   no.  of  bedrooms   no.  of  floors   age  of  house   average  income  in  neighborhood   kitchen  size   Andrew  Ng  
  • 6. Evalua5ng  your  hypothesis   Dataset:   Size   Price   2104   1600   2400   1416   3000   1985   1534   1427   1380   1494   400   330   369   232   540   300   315   199   212   243   Andrew  Ng  
  • 7. Training/tes5ng  procedure  for  linear  regression   -­‐  Learn  parameter          from  training  data  (minimizing   training  error                    )   -­‐  Compute  test  set  error:     Andrew  Ng  
  • 8. Training/tes5ng  procedure  for  logis5c  regression   -­‐  Learn  parameter          from  training  data   -­‐  Compute  test  set  error:     -­‐  MisclassificaDon  error  (0/1  misclassificaDon  error):     Andrew  Ng  
  • 9. Advice  for  applying   machine  learning   Model  selecDon  and   training/validaDon/test   sets   Machine  Learning  
  • 10. price   OverfiBng  example   size   Once  parameters   were  fit  to  some  set  of  data   (training  set),  the  error  of  the   parameters  as  measured  on   that  data  (the  training  error                         xxxxx)  is  likely  to  be  lower   than  the  actual  generalizaDon   error.   Andrew  Ng  
  • 11. Model  selec5on   1.   2.   3.     10.   Choose   How  well  does  the  model  generalize?  Report  test  set   error                                          .   Problem:                                            is  likely  to  be  an  opDmisDc  esDmate  of   generalizaDon  error.  I.e.  our  extra  parameter  (        =  degree  of   polynomial)  is  fit  to  test  set.   Andrew  Ng  
  • 12. Evalua5ng  your  hypothesis   Dataset:   Size   Price   2104   1600   2400   1416   3000   1985   1534   1427   1380   1494   400   330   369   232   540   300   315   199   212   243   Andrew  Ng  
  • 13. Train/valida5on/test  error   Training  error:   Cross  ValidaDon  error:   Test  error:   Andrew  Ng  
  • 14. Model  selec5on   1.   2.   3.     10.   Pick   EsDmate  generalizaDon  error    for  test  set   Andrew  Ng  
  • 15. Advice  for  applying   machine  learning   Diagnosing  bias  vs.   variance   Machine  Learning  
  • 16. Size   High  bias   (underfit)   Price   Price   Price   Bias/variance   Size   “Just  right”   Size   High  variance   (overfit)   Andrew  Ng  
  • 17. Bias/variance   Training  error:   error   Cross  validaDon  error:   degree  of  polynomial  d   Andrew  Ng  
  • 18. Diagnosing  bias  vs.  variance   error   Suppose  your  learning  algorithm  is  performing  less  well  than   you  were  hoping.  (                          or                                    is  high.)    Is  it  a  bias   problem  or  a  variance  problem?   Bias  (underfit):   (cross  validaDon     error)   Variance  (overfit):   (training  error)   degree  of  polynomial  d   Andrew  Ng  
  • 19. Advice  for  applying   machine  learning   RegularizaDon  and   bias/variance   Machine  Learning  
  • 20. Linear  regression  with  regulariza5on   Price   Price   Price   Model:   Size   Size   Large  xx   High  bias  (underfit)   Intermediate  xx   “Just  right”   Size   Small  xx   High  variance  (overfit)   Andrew  Ng  
  • 21. Choosing  the  regulariza5on  parameter     Andrew  Ng  
  • 22. Choosing  the  regulariza5on  parameter     Model:   1.  Try   2.  Try   3.  Try   4.  Try   5.  Try     12. Try   Pick  (say)              .    Test  error:   Andrew  Ng  
  • 23. Bias/variance  as  a  func5on  of  the  regulariza5on  parameter   Andrew  Ng  
  • 24. Advice  for  applying   machine  learning   Learning  curves   Machine  Learning  
  • 25. error   Learning  curves   (training  set  size)   Andrew  Ng  
  • 26. error   price   High  bias   (training  set  size)   If  a  learning  algorithm  is  suffering   from   high   bias,   geJng   more   training   data   will   not   (by   itself)   help  much.   price   size   size   Andrew  Ng  
  • 27. High  variance   error   price   (and  small          )   (training  set  size)   If  a  learning  algorithm  is  suffering   from   high   variance,   geJng   more   training  data  is  likely  to  help.   price   size   size   Andrew  Ng  
  • 28. Advice  for  applying   machine  learning   Deciding  what  to   try  next  (revisited)   Machine  Learning  
  • 29. Debugging  a  learning  algorithm:   Suppose  you  have  implemented  regularized  linear  regression  to  predict   housing  prices.  However,  when  you  test  your  hypothesis  in  a  new  set   of  houses,  you  find  that  it  makes  unacceptably  large  errors  in  its   predicDon.  What  should  you  try  next?     -­‐  -­‐  -­‐  -­‐  -­‐  -­‐  Get  more  training  examples   Try  smaller  sets  of  features   Try  geJng  addiDonal  features   Try  adding  polynomial  features   Try  decreasing   Try  increasing   Andrew  Ng  
  • 30. Neural  networks  and  overfiBng   “Small”  neural  network   (fewer  parameters;  more   prone  to  underfiJng)   ComputaDonally  cheaper   “Large”  neural  network   (more  parameters;  more  prone   to  overfiJng)   ComputaDonally  more  expensive.     Use  regularizaDon  (      )  to  address  overfiJng.   Andrew  Ng