Part 3: Machine learning
How models learn from examples, the main types of problems (predict a number, pick a category, find groups, spot anomalies, forecast, recommend), the main algorithms, and how to measure and improve results.
Key terms in this part (32)
- Accuracy
- Bagging
- Anomaly detection
- AUC (area under the ROC curve)
- Classification
- Clustering
- Cold start
- Confusion matrix
- Cross-validation
- Decision tree
- Gradient boosting
- Hyperparameter
- Linear regression
- Logistic regression
- Loss
- MAE (mean absolute error)
- Named entity recognition (NER)
- Overfitting
- PCA (principal component analysis)
- Precision
- Random forest
- Recall
- Recommender system
- Regression
- Regularisation
- SHAP (Shapley values)
- Supervised learning
- Test set
- Time series
- Underfitting
- + 2 more in the glossary
How learning works
- How a model learns: loss, training and overfitting
Explain what a model, parameters and a loss are, how training reduces the loss step by step, and how to spot overfitting and underfitting.
- Regression: predicting a number
Train regression models that predict numbers, judge them with MAE, RMSE and R², and choose the right model complexity.
- Classification: picking a category
Train a classifier, read its probabilities and confusion matrix, and choose a decision threshold that fits the business.
- The main ML algorithms and when to use each
Explain in plain words how linear models, k-nearest neighbours, decision trees, random forests, gradient boosting, support vector machines and naive Bayes work, and choose between them.
- Unsupervised learning: groups, compression and anomalies
Group similar items with clustering, compress many columns with PCA, and flag unusual records with anomaly detection, all without labels.
Measure and improve
- Measuring models honestly
Choose the right metric for the problem, use cross-validation, read ROC and precision-recall results, and handle rare classes with thresholds and class weights.
- Improving and explaining models
Tune hyperparameters with grid, random and automated search, reduce overfitting with regularisation and ensembles, and explain predictions with feature importance and Shapley values.
Common industry problems
- Time-series forecasting
Forecast values over time with trend and seasonality, beat simple baselines, and always test on the future.
- Recommender systems
Build a collaborative-filtering recommender with matrix factorisation, compare it with simple baselines, and list the real-world issues (cold start, ranking, diversity).