COMP9321 · 09 Choosing a model · Terms

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/41

encourage image

There's no tags or description

Looks like no tags are added yet.

42 Terms

1
New cards
Linear regression
Predicts a number as y = b₀ + b₁x₁ + … + bₙxₙ, fitted by least squares. Interpretable coefficients; assumes ___, outlier-sensitive. ✎ Exam: ___ fits fuel price against crude oil price; the coefficient shows the dollars added per $1 of crude.
2
New cards
Residual
Actual − predicted value for one example. ✎ Exam: A ___ of −3 means the model over-predicted by 3.
3
New cards
Least squares
Choose the coefficients that minimise the sum of ___ residuals (___ makes errors positive and punishes big misses more). ✎ Exam: ___ gives the one line with the smallest total ___ error.
4
New cards
Gradient descent
Iteratively step down the slope of the error to find its minimum; the learning rate sets the step size. ✎ Exam: ___ updates the weights a little each step.
5
New cards
Coefficient
b₁ = the change in y for +1 in x₁, holding the other features fixed. ✎ Exam: A ___ of 0.8 means +$1 crude → +80¢ fuel, other things equal.
6
New cards
MAE
Mean absolute error: the average size of the errors, in target units; easy to explain. ✎ Exam: ___ of $3 means predictions are typically $3 off.
7
New cards
RMSE
Root mean squared error: squares errors, so large errors count more heavily. ✎ Exam: I use ___ because big misses in demand forecasts are especially costly.
8
New cards
RMSLE
RMSE on log values = relative error; for targets spanning orders of magnitude (revenue). ✎ Exam: Revenue ranges from $1k to $1bn, so ___ judges relative error.
9
New cards
R²
Share of variance explained: 1 = perfect, 0 = no better than predicting the mean. ✎ Exam: ___ = 0.7: the model explains 70% of the variance.
10
New cards
Heteroscedasticity
Error variance isn't constant: the residual plot shows a funnel (errors grow with the prediction). Fix: log-transform the target. ✎ Exam: The residual funnel shows ___, so I log-transform revenue.
11
New cards
Multicollinearity
Features strongly correlated with each other, making coefficients unstable and misleading. Detect with a correlation matrix / VIF; fix by dropping/combining or ridge. ✎ Exam: Size in m² and number of rooms show ___ (high VIF), so I keep one.
12
New cards
VIF
Variance inflation factor: how much a coefficient's variance is inflated by multicollinearity (high = trouble). ✎ Exam: A ___ above 10 flags multicollinearity.
13
New cards
p-value
For a coefficient: low (< 0.05) means its relationship with the target is unlikely to be chance (significant). Not a measure of effect size. ✎ Exam: Contract type has p < 0.001, so it is a significant predictor.
14
New cards
Backward elimination
Start with all features; repeatedly remove the least significant (highest p-value above the threshold), refit, repeat. ✎ Exam: ___ removed three insignificant features.
15
New cards
Dummy-variable trap
With an intercept, including all one-hot columns makes them perfectly collinear; drop one (drop_first). ✎ Exam: To avoid the ___ I drop one contract-type column.
16
New cards
Ridge regression
L2 penalty: shrinks all coefficients to reduce overfitting; helps multicollinearity. Standardise first. ✎ Exam: ___ stabilises the correlated coefficients.
17
New cards
Lasso regression
L1 penalty: can shrink some coefficients to exactly 0, i.e. selects features. Standardise first. ✎ Exam: ___ set 12 of 30 coefficients to zero.
18
New cards
Decision tree
Predicts with a sequence of yes/no questions on features (nodes test, leaves give the class/number). Readable if–then rules, no scaling; but deep trees overfit and are unstable. ✎ Exam: A ___ gives managers readable rules like "monthly contract and > 3 support calls → churn".
19
New cards
Entropy
Impurity / uncertainty of a node: 0 when all examples share one class, highest when classes are evenly mixed. ✎ Exam: A node with 50/50 classes has maximum ___.
20
New cards
Information gain
Entropy before a split − weighted entropy after it = how much uncertainty the split removes. ID3 picks the highest. ✎ Exam: Contract type has the highest ___, so it becomes the root split.
21
New cards
Gini index
Another impurity measure (CART, scikit-learn); same idea as entropy. ✎ Exam: scikit-learn splits by Gini by default.
22
New cards
Regression tree
A tree predicting a number: splits to reduce the variance (squared error) of the target; a leaf predicts the mean. ✎ Exam: A ___ predicts house price as the mean of its leaf.
23
New cards
Pre-pruning
Stop growing early: max depth, minimum samples to split or per leaf, minimum gain. ✎ Exam: ___ with max_depth = 5 stops the tree memorising noise.
24
New cards
Post-pruning
Grow fully, then cut back branches that don't improve validation accuracy (reduced-error ___). ✎ Exam: ___ removed branches that didn't help on validation.
25
New cards
Occam's razor
When two models fit equally well, prefer the simpler one: more likely to generalise. ✎ Exam: By ___ I keep the depth-4 tree.
26
New cards
Ensemble
Combining many models so their errors cancel out (bagging, boosting, stacking). ✎ Exam: An ___ of trees is more stable than one tree.
27
New cards
Bagging
Bootstrap aggregation: train models in parallel on bootstrap samples (random rows with replacement), then vote/average. Reduces variance. ✎ Exam: ___ trains each tree on a different bootstrap sample, which reduces variance.
28
New cards
Boosting
Train models in sequence, each focusing on the previous one's errors; weighted vote. Reduces bias (and variance). AdaBoost, gradient ___, LightGBM. ✎ Exam: ___ adds trees one by one, each correcting the previous errors.
29
New cards
Stacking
Several different models; a meta-model learns how to combine their predictions. ✎ Exam: ___ feeds tree, k-NN and linear predictions into a logistic regression.
30
New cards
Random forest
Bagging of trees + a ___ subset of features at each split → decorrelated trees, stable vote. Robust, feature importances; less interpretable. ✎ Exam: A single tree is unstable; a ___ averages many decorrelated trees, reducing variance.
31
New cards
Bootstrap sample
A ___ of rows drawn at random with replacement, same size as the data (some rows repeat, some are left out). ✎ Exam: Each tree in the forest sees a different ___.
32
New cards
Feature importance
How much each ___ contributes to a tree ensemble's predictions; used to explain a forest. ✎ Exam: ___ ___ show contract type and tenure drive churn.
33
New cards
Linear regression
Scenario: Predict NSW fuel price from crude oil price; drivers look roughly ___ and managers want to read the effect. Why: ___: interpretable coefficients, fast; check ___ and outliers.
34
New cards
RMSE
Scenario: Large prediction errors are much worse than small ones. Why: ___ (or MSE): squaring punishes big errors.
35
New cards
RMSLE
Scenario: Film revenues range from thousands to billions. Why: ___: error on a log scale (relative).
36
New cards
Heteroscedasticity
Scenario: The residual plot fans out: errors grow as predictions grow. Why: ___: log-transform the target or use a robust model.
37
New cards
Multicollinearity
Scenario: Two features have correlation 0.95 and VIF above 10; coefficients flip sign between runs. Why: ___: drop or combine features, or use ridge.
38
New cards
Lasso regression
Scenario: You want a regularised linear model that also drops useless features automatically. Why: ___ (L1): sets some coefficients to exactly 0.
39
New cards
Decision tree
Scenario: A bank must explain loan ___ to managers; target is approve / reject. Why: ___: readable if–then rules (prune or use a forest for stability).
40
New cards
Bagging
Scenario: Train many trees in parallel on random resamples of the rows and average them, to reduce instability. Why: ___: reduces variance.
41
New cards
Boosting
Scenario: Each new model concentrates on the examples the previous models got wrong. Why: ___: sequential, reduces bias.
42
New cards
Random forest
Scenario: Trees are unstable and overfit; accuracy matters most on tabular churn data with mixed features. Why: ___: many decorrelated trees (bootstrap + ___ features) reduce variance.