ML Model Analysis Flashcards

(96 cards)

1
Q

What does it mean to train / fit a model?

A

Letting an algorithm look at your data repeatedly and adjust its internal numbers for more accurate predictions

You provide examples, and the model learns the rule by itself.

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

In the context of training a model, what is RMSE?

A

Root Mean Squared Error

RMSE summarizes errors into one number; smaller RMSE indicates a better fit.

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

What are the parameters in the model equation y = mx + c?

A
  • m (slope)
  • c (intercept)

Parameters are values learned directly from the data during training.

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

Fill in the blank: A hyperparameter is something the algorithm cannot learn from the data by itself and must be chosen by the _______.

A

data scientist

Examples include the number of clusters or the depth of a decision tree.

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

True or false: The algorithm learns hyperparameters directly from the data.

A

FALSE

Hyperparameters are set by the human and cannot be learned by the algorithm.

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

What is the process of how a machine learns during training?

A
  • Draw a line (choose m and c)
  • Check how wrong the line is
  • Change m and c a little
  • Try again
  • Repeat many times

This repeated adjusting is called training or fitting the model.

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

What is the goal of the algorithm during training?

A

Find m and c that give the smallest RMSE

The smaller the RMSE, the better the fit.

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

What is an example of a simple relationship used in training a model?

A

Temperature → ice-cream revenue

This relationship can be modeled using a straight line.

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

What does the error represent in the context of model training?

A

The distance between the real value and the predicted value

These vertical distances are used to calculate RMSE.

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

What is the first step in the training process of a model?

A

Choose a model (for example, a straight line)

This sets the foundation for adjusting parameters during training.

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

What is the training set used for in model development?

A

Learning pile

This is where the model tries rules, makes mistakes, and fixes itself.

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

What is the purpose of the validation set?

A

Choosing and tuning pile

It is used to answer questions about model performance and settings.

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

True or false: Once data is used for validation, it can still be considered unseen data.

A

FALSE

Validation data is no longer ‘unseen’ after it is used.

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

What is the test set meant to simulate?

A

Real-world check

It is used to evaluate the model after training and validation.

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

Why do we keep some data hidden during model training?

A

To prevent overfitting

Models can perform well on training data but poorly on new data.

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

In supervised learning, what is a common split for the data?

A
  • 60–70% for training
  • 10–20% for validation
  • 20–30% for test

Exact numbers may vary, but the concept remains the same.

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

What is the difference between validation and test sets?

A
  • Validation: used while building
  • Test: used only once at the end

Testing on validation data can lead to biased results.

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

In unsupervised learning, what is the typical data split?

A
  • ~70–80% to fit the model
  • The rest to test generalization

Validation is often skipped in unsupervised learning.

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

Ultra-short summary: What does each data set represent?

  1. Training set
  2. Validation set
  3. Test set
A
  1. Learn
  2. Tune and choose
  3. Final honest check

This summarizes the purpose of each data set in model development.

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

What is a performance metric?

A

A number that tells you how wrong your model is or how often it is right

Performance metrics are essential for evaluating model effectiveness.

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

Name the two cases for performance metrics.

A
  • Regression
  • Classification

Regression predicts a number, while classification predicts a class or label.

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

In regression, what does MAE stand for?

A

Mean Absolute Error

MAE answers the question: ‘On average, how wrong am I?’

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

What is the purpose of MSE in regression?

A

Mean Squared Error

MSE emphasizes larger errors more than smaller ones.

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

What does RMSE represent?

A

Root Mean Squared Error

RMSE is preferred in practice as it returns to normal units.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What does **R² (R-squared)** indicate?
How well the line fits the dots ## Footnote A value close to 1 indicates a good fit, while close to 0 indicates a poor fit.
26
In regression, what does a R² value above ~0.8 indicate?
Decent fit ## Footnote This is a rule of thumb for evaluating model performance.
27
What is the **confusion matrix** used for in classification?
Counts predicted vs actual ## Footnote It helps derive important metrics for evaluating classification models.
28
What does **TP** stand for in the confusion matrix?
True Positive ## Footnote TP indicates predicted sunny days that were actually sunny.
29
What does **Accuracy** measure in classification?
How many did I get right overall? ## Footnote Accuracy is useful only if classes are balanced.
30
What is **Recall** in classification?
Of all real sunny days, how many did I actually catch? ## Footnote Recall measures the ability to identify true positives.
31
What does **Precision** indicate?
When I said 'sunny', how often was I right? ## Footnote Precision assesses the reliability of positive predictions.
32
What is the **F1 score**?
A balance between precision and recall ## Footnote Use the F1 score when both precision and recall are important.
33
What does **Specificity** measure?
Of all real NOT-sunny days, how many did I correctly detect? ## Footnote Specificity evaluates the model's ability to identify true negatives.
34
True or false: There is a universal 'good' error metric.
FALSE ## Footnote Acceptable error metrics depend on the specific problem being addressed.
35
In regression, what do **MAE** and **RMSE** measure?
How wrong the model is ## Footnote They provide insight into the model's prediction accuracy.
36
In classification, what do **Accuracy**, **Precision**, and **Recall** represent?
* Accuracy: overall right * Precision: trust my positives * Recall: did I miss real positives ## Footnote These metrics are crucial for evaluating classification performance.
37
What is the ultra-short summary for regression metrics?
* MAE, RMSE → how wrong * R² → how well it fits ## Footnote This summarizes the key points for regression evaluation.
38
What is the ultra-short summary for classification metrics?
* Accuracy → overall right * Precision → trust my positives * Recall → did I miss real positives * F1 → balance ## Footnote This summarizes the key points for classification evaluation.
39
In **unsupervised learning**, what do you measure to determine if your groups make sense?
Silhouette score ## Footnote It assesses how well data points fit within their clusters and how distinct those clusters are from one another.
40
What are the **features** used in the fish data example?
* Eye size * Length * Weight ## Footnote These features are used to group fish into clusters without predefined labels.
41
What is the **main metric** used in unsupervised learning to evaluate clustering?
Silhouette score ## Footnote It measures the compactness of clusters and their separation from each other.
42
What does a **silhouette score** close to +1 indicate?
Very good clustering ## Footnote It means points fit well within their cluster and clusters are well separated.
43
What does a **silhouette score** close to 0 indicate?
Overlapping groups ## Footnote It suggests that a point is sitting between clusters.
44
What does a **negative silhouette score** indicate?
Point probably belongs to a different cluster ## Footnote This suggests poor clustering performance.
45
What does a **good cluster** mean in the context of silhouette score?
* Points inside are close together * Different clusters are far apart ## Footnote Silhouette score checks for these conditions to evaluate clustering quality.
46
What is a **silhouette plot** used for?
* Shows silhouette score of every point * Grouped by cluster ## Footnote It helps visualize clustering performance and identify issues with cluster sizes or averages.
47
True or false: The silhouette score tells you the true grouping of data.
FALSE ## Footnote It only indicates whether the grouping is compact and well separated, not the actual true grouping.
48
In unsupervised learning, what does the silhouette score help check?
* Fit inside your cluster * Separation from other clusters ## Footnote This is essential for evaluating the effectiveness of clustering without labels.
49
What is the range of the **silhouette score**?
+1 to -1 ## Footnote A score close to +1 indicates good clustering, while a negative score indicates poor clustering.
50
**Bias** refers to what aspect of a model?
how wrong the model is ## Footnote Bias occurs because the model is too simple.
51
High bias indicates what kind of learning issue?
under-learning ## Footnote This happens when the model cannot capture the underlying pattern of the data.
52
**Variance** refers to what aspect of a model?
how much the performance changes ## Footnote Variance measures the difference in performance between training data and new data.
53
High variance indicates what kind of learning issue?
over-learning ## Footnote This occurs when the model is too complex and memorizes the training data.
54
What happens to bias and variance as model complexity increases?
* Bias goes down * Variance goes up ## Footnote This relationship is crucial for understanding model performance.
55
What is the **goal** in terms of bias and variance?
* Low bias * Low variance ## Footnote Achieving this means the model learns the real pattern and performs well on new data.
56
What is the trade-off picture in model complexity?
Total error is smallest somewhere in the middle ## Footnote As complexity increases, bias decreases and variance increases.
57
What does **underfitting** mean?
too simple, high bias ## Footnote An example is a straight line model that misses the pattern.
58
What does **overfitting** mean?
too complex, high variance ## Footnote An example is a zig-zag line model that memorizes the data.
59
In the ice-cream example, what does Model 1 represent?
a straight line ## Footnote This model is too simple and cannot follow the real shape of the data.
60
In the ice-cream example, what does Model 2 represent?
a crazy zig-zag line ## Footnote This model is too complicated and performs poorly on new data.
61
What is the **difference** between train performance and test performance indicative of?
variance problem ## Footnote This highlights the issue of overfitting when a model performs well on training data but poorly on test data.
62
What is **underfitting**?
Too simple model that fails to learn the real pattern ## Footnote Underfitting results in bad performance on both training and test data.
63
What is **overfitting**?
Too complex model that memorizes training data but fails on new data ## Footnote Overfitting results in very good training performance but bad test performance.
64
What is the real goal of a model in machine learning?
Works well on new (unseen) data ## Footnote This is referred to as generalisation.
65
What does **underfitting** indicate about a model's performance?
* Training performance: bad * Test performance: bad ## Footnote The model is not smart enough for the problem.
66
What are common causes of **underfitting**? List them.
* Not enough data * Model too simple * Not enough useful features * Bad hyperparameters ## Footnote Underfitting is associated with a high bias problem.
67
What does **overfitting** indicate about a model's performance?
* Training performance: very good * Test performance: bad ## Footnote The model learned noise instead of the real pattern.
68
What are common causes of **overfitting**? List them.
* Model too complex * Too many features * Too little useful data * Bad hyperparameters * Not enough variety in data ## Footnote Overfitting is associated with a high variance problem.
69
What is the most important test to remember in model evaluation?
Compare training score and test score ## Footnote This helps identify underfitting, overfitting, or a good fit.
70
What does a **good fit** look like in model evaluation?
* Training performance: good * Test performance: slightly worse ## Footnote This indicates a normal and healthy model.
71
True or false: Your job is to make the training error as small as possible.
FALSE ## Footnote The goal is to achieve good performance on unseen data, not perfect training fit.
72
What is a potential issue with some datasets in machine learning?
The data may not contain a useful pattern ## Footnote Not every dataset can predict the future.
73
Ultra-short summary: Underfitting = _______.
Too simple ## Footnote Underfitting results in bad performance on both training and test data.
74
Ultra-short summary: Overfitting = _______.
Too complex ## Footnote Overfitting results in great performance on training but bad on test.
75
Ultra-short summary: Best model = _______.
In the middle ## Footnote A good model generalises well.
76
What is the purpose of **cross-validation**?
To compare models more fairly by using multiple splits of the data ## Footnote It helps avoid relying on a single validation split that may be misleading.
77
What is the **risk** of training and validating on just one chunk of data?
You may choose the wrong model due to a lucky or weird validation chunk ## Footnote This can lead to unreliable model selection.
78
What is **hold-out cross-validation**?
Using a single validation set to test different models and settings ## Footnote It is fast but has high variance due to relying on one try.
79
Describe the **k-fold cross-validation** process.
* Split data into k equal parts * Use k-1 folds for training and 1 fold for validation * Rotate folds for validation ## Footnote This method averages scores for a more reliable comparison.
80
What are the advantages of **k-fold cross-validation**?
* Every data point gets to be a validation point * Lower variance * More trustworthy comparison ## Footnote It avoids reliance on a single lucky split.
81
What is the **important rule** regarding the test set in cross-validation?
Keep a separate test set used only at the very end ## Footnote Cross-validation is done on training and validation data only.
82
What are typical values for **k** in k-fold cross-validation?
* k = 5 * k = 10 ## Footnote More k values provide more reliability but increase computation time.
83
What is **Leave-One-Out Cross-Validation (LOOCV)**?
Each run uses 1 data point for validation and all others for training ## Footnote It is very low variance but extremely expensive in terms of computation.
84
What is the **Leave-P-Out Cross-Validation** method?
Leave out p points for validation each time ## Footnote It is a compromise between LOOCV and k-fold.
85
Compare **Hold-out** and **k-fold** cross-validation.
| Method | Good | Bad | |-----|-----|-----| | Hold-out | fast, cheap | only one try → unreliable | | k-fold | much more reliable | slower (run k times) | ## Footnote This table summarizes the pros and cons of each method.
86
What is cross-validation used for?
* Choosing the best algorithm * Choosing the best hyperparameters ## Footnote It is not used for final performance reporting.
87
Ultra-short summary of cross-validation: Cross-validation = _______.
compare models more fairly ## Footnote k-fold involves rotating the validation set and averaging scores while keeping the test set untouched.
88
What is the **big idea** behind an ML project?
* outcomes * metrics * outputs * heuristics * data ## Footnote An ML project is not about models but about agreeing on these aspects with the client.
89
What are the **outcomes** in an ML project?
What do we want to achieve? ## Footnote Examples include predicting revenue, detecting spam, approving/rejecting requests, and grouping customers.
90
How do we measure **success** in an ML project?
It depends on the type of problem: * Regression: MAE, MSE, RMSE, R² * Classification: accuracy, precision, recall, F1, specificity * Clustering: silhouette score ## Footnote Each metric measures different aspects of prediction accuracy.
91
What are the **outputs** that a customer may want from an ML project?
* a number (e.g. predicted revenue) * a label (go/no-go, spam/not spam) * a cluster ID ## Footnote The output determines the model used and the necessary inputs.
92
Define a **heuristic** in the context of ML.
A simple rule of thumb that is fast, cheap, and not perfect ## Footnote Example: 'If an email is from this address → it’s spam.'
93
What is a **key idea** regarding heuristics in ML?
If your fancy ML system is no better than your heuristic, keep the heuristic ## Footnote It is often cheaper.
94
What are some potential **data sources** for an ML project?
* databases (SQL, NoSQL) * APIs * CSV/Excel * JSON * text files * images * video * audio * cloud storage * GitHub ## Footnote Data can be structured or unstructured.
95
What are common **problems** you should expect in data?
* errors * missing values * bad formatting * corrupt files * inconsistent types * out-of-date data ## Footnote Always check data quality as old data can be stale.
96
Before building any model, what should be agreed upon with the client?
* what outcome you want * which metric defines success * what output the system must give * whether a heuristic is already good enough * where the data comes from and how reliable it is ## Footnote These agreements are crucial for project success.