feature(notizen): add notes from l2 morning
This commit is contained in:
@@ -152,7 +152,6 @@ Bewertung:
|
|||||||
- Beta < emphasize precision
|
- Beta < emphasize precision
|
||||||
- Beta > emphasize recall
|
- Beta > emphasize recall
|
||||||
|
|
||||||
|
|
||||||
### Other metrics
|
### Other metrics
|
||||||
|
|
||||||
- the generalization of our binary classifier result matrix (classification result vs. gold standard) is called a confusion matrix
|
- the generalization of our binary classifier result matrix (classification result vs. gold standard) is called a confusion matrix
|
||||||
@@ -160,3 +159,97 @@ Bewertung:
|
|||||||
- https.//en.wikipedia.org/wiki/Confusion_matrix
|
- https.//en.wikipedia.org/wiki/Confusion_matrix
|
||||||
- other widely used metrics include ROC, K-S, gail/lift, ...
|
- other widely used metrics include ROC, K-S, gail/lift, ...
|
||||||
- for specific ML problems and algorithms many additional metrics exists
|
- for specific ML problems and algorithms many additional metrics exists
|
||||||
|
|
||||||
|
## Automated Evaluation Workflow
|
||||||
|
|
||||||
|
- How can we automatie evaluation
|
||||||
|
1. define a controlled test set (benchmarks)
|
||||||
|
- collection of data (labeled)
|
||||||
|
- one or more tasks to be solved by the ML system
|
||||||
|
- expected results
|
||||||
|
- created by (typically) human domain experts
|
||||||
|
2. execute ML system for test set
|
||||||
|
3. compare computed results against expected results
|
||||||
|
|
||||||
|
### Evaluation Goals
|
||||||
|
|
||||||
|
- Compare a solution with ...
|
||||||
|
- different configuration options
|
||||||
|
- bspw. feingranulare parametrisierung in einem decision tree (gini parameter bspw)
|
||||||
|
- alternative solutions
|
||||||
|
- a basic solution ("baseline")
|
||||||
|
- abschätzung nach unten
|
||||||
|
- the industry and/or academic leader ("state-of-the-art")
|
||||||
|
- abschätzung nach oben
|
||||||
|
- human performance ("gold standard")
|
||||||
|
- auch eine abschätzung nach oben, welche man machen sollte
|
||||||
|
- Mensch macht auch 1-2% Fehler
|
||||||
|
- itself over time
|
||||||
|
|
||||||
|
## Using Data for Training and Testing
|
||||||
|
|
||||||
|
- ML Methods usually require fine-tuning for good quality
|
||||||
|
- Trainingsdaten dürfen nicht gleichzeitig zum Testen verwendet werden, es muss aufgeteilt werden
|
||||||
|
- Wie splitte ich in Trainingsdaten und Testdaten?
|
||||||
|
- Modell wird besser wenn mehr trainingsdaten gegeben werden
|
||||||
|
- aber man will auch möglichst viele Daten fürs Testen, damit Metrik verbessert wird
|
||||||
|
- Konflikt
|
||||||
|
- Einfache Methode: 80% Training 20% Testing
|
||||||
|
- Verteilung wichtig! Einfach die vorderen 80% fürs Training nehmen und die hinteren 20% als Test ist nicht gut
|
||||||
|
- Daten sind oft sortiert
|
||||||
|
- Beide Datenmengen müssen repräsentativ sein!
|
||||||
|
- Quick fix: Random Number generator verwenden (**rand-split** in scikit-learn)
|
||||||
|
- wenn die gesamtdatenmenge gross genug ist, geht das relativ gut auf
|
||||||
|
- im Mittel hat man eine gute Verteilung
|
||||||
|
- Problematisch wird das wenn das Klassifikationsproblem stark unbalanciert ist
|
||||||
|
- Websuche: Datenmenge 100k Webseiten, davon sind 20 relevant -> winzige relevante Menge (p class) und eine grosse (n class)
|
||||||
|
|
||||||
|
- Besser als Random-Split: K-Fold Cross Validation
|
||||||
|
|
||||||
|
|
||||||
|
### K-Fold Cross Validation
|
||||||
|
|
||||||
|
- Wie geht man möglichst effizient mit den gelabelten (gold standard) Daten um?
|
||||||
|
- Es geht nicht gleichzeitig aber nacheinander
|
||||||
|
- erst trainieren, dann testen
|
||||||
|
- How to split gold standard data into test and trainin set such that
|
||||||
|
- we have enough training data
|
||||||
|
- our test results are not biased
|
||||||
|
- k-fold cross validation
|
||||||
|
- split data into k folds (Aufteilung in k Teile)
|
||||||
|
- use (k-1) for training, 1 for testing
|
||||||
|
- repeat k times
|
||||||
|
- Siehe Grafik Skript Seite 14
|
||||||
|
|
||||||
|
- Aufteilung auf 3 Folds
|
||||||
|
- Jedes Sample wurde jeweils einmal zum training und zum testen verwendet
|
||||||
|
- Man hat ein Problem, wenn sich die Metriken (Fehlerquoten) beim Testen von Fold zu Fold sich stark unterscheiden
|
||||||
|
- Weiteres Problem: Modell sehr sensibel auf Trainingsdaten
|
||||||
|
- Zu wenig Trainingsdaten vorhanden
|
||||||
|
- Unterschiede von Fold zu Fold sehr gross -> Könnte heissen, dass das Modell nicht stabil ist
|
||||||
|
- Kommen von Fold zu Fold aber gleich gute Resultate zurück (Varianz und Standardabweichung gleich)
|
||||||
|
- Gutes Zeichen für das Modell
|
||||||
|
|
||||||
|
- In der Praxis arbeitet man nicht mit 3 sonder mit 10 Folds
|
||||||
|
- 10 fold cross validation
|
||||||
|
- 90/10
|
||||||
|
- Wird statistisch besser
|
||||||
|
- Setzt voraus, das man genug grosse Datenmengen hat
|
||||||
|
|
||||||
|
## Dataset Challenges
|
||||||
|
|
||||||
|
- Potential Problems: is the dataset...
|
||||||
|
- correct?
|
||||||
|
- large enough?
|
||||||
|
- representative?
|
||||||
|
- cause overfitting? -> Zu viele eintönige Daten, und das Modell lernt eine Niche
|
||||||
|
- for many application domains, large datasets are available
|
||||||
|
- not all free but still cost saving
|
||||||
|
- allows to compare approaches in a larger community
|
||||||
|
- where to search
|
||||||
|
- wikipedia
|
||||||
|
- kaggle
|
||||||
|
- research groups at universities
|
||||||
|
- conference series
|
||||||
|
- research articles
|
||||||
|
- data collecting companies and public administrations
|
||||||
|
|||||||
Reference in New Issue
Block a user