COMP9321 · 08 ML workflow and metrics · Lists & facts
0.0(0)
Studied by 0 people
Call Kai
Learn
Practice Test
Spaced Repetition
Match
Flashcards
Knowt Play
Card Sorting
1/12
There's no tags or description
Looks like no tags are added yet.
13 Terms
1
New cards
The four types of analytics with the sales example.
Descriptive: sales per month. Diagnostic: why sales dropped in March. Predictive: predict May sales. Prescriptive: increase ads in May.
2
New cards
Pick the task from the target.
Category → classification. Number → regression. No target, find groups → clustering. Suggest items → recommendation.
3
New cards
The ML workflow (wrap-up slide).
Define and initialise the model (after preparing data) → train on the training set → validate on unseen data → use it (explore or deploy as an API) → update and re-validate as new data arrives.
4
New cards
Rules for honest evaluation.
Train/validation/test split; tune on validation or CV; test once at the end; fit preprocessing (scaler, imputer, encoder) on training data only; stratify for imbalanced data.
5
New cards
Overfitting vs underfitting: train score, test score, fix.
Overfit: very high train, much lower test → simpler model, pruning, regularisation, more data, CV, ensembles. Underfit: both low → more features, more complex model.
6
New cards
k-NN: the four things you must specify.
A distance metric, k, optional weighting (closer counts more), how to aggregate (majority vote).
7
New cards
k-NN properties (six).
Non-parametric; instance-based/lazy; slow at prediction; needs scaling; sensitive to noise with small k; curse of dimensionality.
8
New cards
Choosing k in k-NN.
k = 1 overfits (noise-sensitive); large k underfits (blurs boundaries). Pick k by cross-validation; odd k for two classes to avoid ties.
9
New cards
Write the formulas: accuracy, precision, recall, F1.
Random undersampling, random oversampling, cluster-based oversampling, SMOTE; class weights; stratified splits; judge by F1/recall. Resample only the training data.
13
New cards
Feature engineering checklist.
Derive variables (tenure, ratios, date parts); encode categories (one-hot/ordinal); scale for distance-based models; log-transform skewed values; remove leakage and IDs.