04_supervised concepts Flashcards

1
Q

What is the goal for supervised problems?

A

find function (task)
that relates input data (x)
to output data (y)
with hyperparameters (θ)

such that f(x;θ) = y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a hyperparameter?

A

a model parameter that the model does not learn (given by programmer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the traditional (rule-based) approach to a supervised learning setup?

A

The person has seen x and seen y, writes the function

gives the function to the model which tests with unseen x and unseen y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a machine-learning approach to a supervised learning setup?

A

the model finds the rules (function f) by itself

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What tasks can ML learn?

A
  • (multi-class) Classification
  • binary classification
  • multi-label classification
  • regression
  • object detection
  • semantic segmentation
  • instance segmentation
  • synthesis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is multi-class classification?

A

mapping input feature to discrete classes of a single label
(for one label multiple classes)

eg:
label: color
classes: red, green, blue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is binary classification?

A

mapping input features to a binary label

eg:
label: status
two classes: on, off

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is multi-label classification?

A

mapping input features to discrete classes of multiple labels (with multiple classes)

eg:
labels: color, sort, quality
with multiple classes per label,
eg red/green/blue for color or good/medium/bad for quality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is regression?

A

mapping input features to continuous variable

eg x = time, y = value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is object detection?

A

approximately localize features in image data with bounding boxes

eg: boxes in picture for cat and dog

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What types of segmentation are there?

A
  • semantic segmentation
  • instance segmentation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What types of classification are there?

A
  • multi-class classification
  • binary classification
  • multi-label classification
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is semantic segmentation?

A

assign class label to each pixel of an image based on what it is showing

eg what is part of cat? what is part of dog?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is instance segmentation?

A

assign class label to each pixel of an image based on what it is showing
AND discriminate different instances of the class

eg class animal, identifies two instances of class animal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is synthesis?

A

generate new data points based on a learned distribution

eg StyleGAN2 (creates faces) or Style Transfer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is iid?

A

independent and identically distributed data

–> individual samples in both data sets are produced by the same data generation process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is assumed when running an ML model on previously unseen data?

A

that unseen (new) data and the already seen (training) data are iid

–> the individual samples in both data sets are produced by the same data generation process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the lesson in iid?

A

for small sample sizes, data sets that are iid may still differ significantly!

if sample is big, they appear more identical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How will the distributions in real data sets look like?

What are the implications on the performance of the model?

A

will look different despite being iid, because of the limited extent (size)

successful training on one data set does not imply good performance on unseen data!
–> therefore, the model has to generalize well by preventing overfitting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a decision boundary?

A

the decision boundary separates the different classes
as learned by the trained model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is overfitting?

A

the model memorizes the structure of the training/seen data
–> as a result, it generalizes badly on the overall data distribution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What can we do against overfitting?

A

regularization methods

23
Q

When does a model generalize well?

A

when the decision boundary leads to equally good performance on both data sets

24
Q

How do we measure, if the model generalizes well?

A

We have to define a performance metric

25
Q

What does a performance metric do?

A

provide a quantitative assessment of how well our model performs

26
Q

Base on what does the performance metric provide an assessment on the model performance?

A
  • ML implementation (model type and loss function)
  • dataset
  • task to be learned
27
Q

What does the Performance metric need to be?

A

tailored to the model
and the task
and the dataset

28
Q

How can we identify overfitting?

A

By comparing the performance on the seen/training data and some previously unseen/test data

29
Q

What is usually done to the existing data in supervised learning?

A

the data is randomly split into three parts:

1) Training data set
2) Validation data set (hyperparameter-tuning)
3) Test data set (evaluate model performance)

30
Q

What are typical ratios for splitting the dataset?

A

Train: 0.7
Validate: 0.15
Test: 0.15

31
Q

What is a stratified split?

A

If we have more than one class, all the classes are split into train validate test on their own and according to the set ratios

–> preserves the class fractions in split data sets

32
Q

How can the data be validated if the data set available is not big enough to perform a meaningful split?

A

“recycle” data by using cross-validation to get a better estimate

33
Q

How is the k-fold cross-validation carried out?

A

1) split shuffled data set into three parts
2) train with two parts and test with the third
3) repeat with reassigning test and train
–> in independent runs
4) results in k performance metrics
–> report: avg + std / best-of k

34
Q

Does the k-fold cross-validation improve the models performance?

A

No

Because it uses independent runs, which means that they don’t build up on each other

it just gives a more reliable estimate of the model’s performance

35
Q

What are methods to force the model to generalize? (6)

A
  • limiting model capacity
  • introducing uncertainty
  • dropout (only NN)
  • introducing noise
  • early stopping (only NN)
  • Bagging / Ensembling
36
Q

What is the usual general supervised learning pipeline?

A

1) feature engineering
2) data scaling
3) data splitting
4) define hyperparameters
5) train model on training data for fixed hyperparameters
6) evaluate model on validation data
7) repeat 4 to 6 until performance on validation data maximised
8) evaluate trained model on test data and report the test data performance

–> performance metrics should be similar between test and validation data before showing the model the test data

37
Q

How do we measure the performance of our model?

A

Benchmarking

38
Q

What is benchmarking?

A

refers to the process of quantitatively assessing your ML model’s performance

39
Q

What is a metric?

A

measure for performance, depends on the task and the data set

40
Q

What are the two most important regression task metrics?

What is the intuition behind the calculations?

A
  • MAE (mean absolute error)
    1/N Summe I yi’ -y^iI
  • RMSE (root mean square error)
    Wurzel 1/N Summe (yi’ - y^i)^2

Intuition: by how much deviates your model prediction from the ground-truth on average

41
Q

What is the difference between MAE and RMSE for small datasets?

A

RMSE is more sensitive to outliers

it depends on the model and the problem if this is beneficial or not

42
Q

What are (binary) classification metrics?

A
  • Accuracy
  • Precision
  • Recall
43
Q

What is the Accuracy Metric and how is it calculated?

A

What is the overall fraction of correct predictions?

Accuracy = (TP + TN) / (TN + TP + FP + FN)

we correctly identified 95% of all dogs in the image

44
Q

What is the Precision Metric and how is it calculated?

A

What fraction of our positive predictions is truly positive? (quantifies “correctness”)

Precision = TP / (TP + FP)

95% of the dogs we predicted are actual dogs

45
Q

What is the Recall Metric and how is it calculated?

A

What fraction of actual positives has been identified? (quantifies “completeness”)

Recall = TP / (TP + FN)

we correctly found 95% of the dogs that are in the image

46
Q

What is the issue with Accuracy/Precision/Recall as Classification Metrics?

A

Class imbalance!

eg “Will this asteroid impact Earth”
here, Recall is the most important because we don’t want to miss any hitting asteroids

47
Q

What is the confusion matrix?

A

a common way to visualize the performance of a classification model

provides information on systematic confusion learned by the classifier

all elements in one row must sum up to unity

48
Q

What is a sign for a well-trained classifier regarding the confusion matrix?

A

the diagonal values should be as high as possible while off-diagonal elements should be as low as possible

49
Q

Is accuracy a good metric for object detection?

A

No

would be very high by looks at all individual pixels. no indication if the correct pixels were identified correctly

50
Q

What is a good metric for object detection and image segmentation?

A

Intersection over union metric

51
Q

What is IoU and how is it calculated?

A

Intersection over union metric

IoU = intersection / union = (AnB)/(AuB)

A is prediction-Shape, B is ground-truth

52
Q

Where is the IoU undefined?

A

Where there is no ground truth

53
Q

How to report metrics?

A
  • individual metric
  • best-of-n (eg with cross-validation)
  • averaging results (average metric over n model runs + standard deviation)

best choice depends on the specific problem and use case