Prestaties evalueren

Inzicht in Machine Learning

Hadrien Lacroix

Content Developer at DataCamp

Stap: Evalueren

Inzicht in Machine Learning

Overfitting

  • Doet het goed op trainingsdata
  • Doet het slecht op testdata
  • Model heeft trainingsdata gememoriseerd en generaliseert niet naar nieuwe data
  • Gebruik testset om prestatie te checken
Inzicht in Machine Learning

Overfitting illustreren

overfitting

Inzicht in Machine Learning

Nauwkeurigheid

  • Nauwkeurigheid = correct geclassificeerde observaties / alle observaties
  • 48 / 50 = 96%

lineaire classifier uit de eerste les

Inzicht in Machine Learning

Beperkingen van nauwkeurigheid: fraude

$$

Nauwkeurigheid van dit model:

$$\frac{28\ correctly\ classified}{30\ total\ points}=93.33\%$$

  • Mist het merendeel van de frauduleuze transacties
  • Betere maatstaf nodig
Inzicht in Machine Learning

Confusion matrix

verwarringsmatrix

Inzicht in Machine Learning

True positives

Inzicht in Machine Learning

True positives

Inzicht in Machine Learning

False negatives

Inzicht in Machine Learning

False negatives

Inzicht in Machine Learning

Onthouden: False Negatives

fp.jpg

Inzicht in Machine Learning

Vul de rest in...

Inzicht in Machine Learning

False positives, true negatives

Inzicht in Machine Learning

Onthouden: False Positives

fn2.jpg

Inzicht in Machine Learning

Sensitiviteit

Hoeveel fraudetransacties hebben we goed geclassificeerd?

$$Sensitivity = \frac{true\ positives}{true\ positives + false\ negatives} =1/3=33.33\% $$

  • Liever legitieme transacties als verdacht markeren dan frauduleuze autoriseren
Inzicht in Machine Learning

Specificiteit

$$Specificiteit = \frac{true\ negatives}{true\ negatives + false\ positives}$$

Spamfilter:

  • Liever spam in de inbox dan echte mails in de spambox
Inzicht in Machine Learning

Regressie evalueren

Inzicht in Machine Learning

Regressie evalueren

  • Fout = afstand tussen punt (werkelijk) en lijn (voorspeld)
  • Meerdere manieren om te meten, bv. root mean square error
Inzicht in Machine Learning

Unsupervised learning

kies je eigen avontuur

1 https://www.flickr.com/photos/micahdowty/8540188997
Inzicht in Machine Learning

Laten we oefenen!

Inzicht in Machine Learning

Preparing Video For Download...