Machine Learning Deep Dive
Introduction to Machine Learning
Section titled “Introduction to Machine Learning”- What is ML?
- Types of ML
- ML workflow
- Evaluation metrics
Supervised Learning
Section titled “Supervised Learning”- Linear regression
- Logistic regression
- Decision trees
- Random forests
- SVM
Unsupervised Learning
Section titled “Unsupervised Learning”- K-means clustering
- Hierarchical clustering
- PCA
- t-SNE
Neural Networks
Section titled “Neural Networks”- Perceptrons
- Backpropagation
- Activation functions
- Regularization
Deep Learning
Section titled “Deep Learning”- CNNs
- RNNs
- LSTMs
- Transformers
- GANs
Practical ML
Section titled “Practical ML”- Feature engineering
- Hyperparameter tuning
- Model deployment
- MLOps
See Also
Section titled “See Also”Worked Examples
Section titled “Worked Examples”Example 1: Bias-Variance Trade-off
Section titled “Example 1: Bias-Variance Trade-off”A model with high bias (underfitting) makes strong assumptions and misses relevant patterns. A model with high variance (overfitting) captures noise along with signal. The total error decomposes as:
A linear regression on non-linear data has high bias. A decision tree with no depth limit has high variance. Regularisation (L1/L2) and ensemble methods (bagging, boosting) navigate this trade-off.
Example 2: Cross-Validation
Section titled “Example 2: Cross-Validation”K-fold cross-validation splits data into K folds, training on K-1 and testing on 1, rotating through all folds. This gives a more reliable estimate of generalisation performance than a single train/test split, especially with limited data.
Common Pitfalls
Section titled “Common Pitfalls”- Evaluating on training data: Always use a held-out test set or cross-validation. Training accuracy is not generalisation accuracy.
- Ignoring class imbalance: 99% accuracy on a dataset with 99% negative class means the model learned nothing. Use precision, recall, F1, or AUC.
- Feature scaling for distance-based methods: KNN, SVM, and k-means require normalised features. Tree-based methods do not.
Summary
Section titled “Summary”Machine learning encompasses supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), and reinforcement learning. Model selection requires understanding the bias-variance trade-off, regularisation, and proper evaluation via cross-validation. Deep learning extends classical ML with neural networks (CNNs, RNNs, Transformers) for unstructured data. Practical ML requires feature engineering, hyperparameter tuning, and deployment pipelines (MLOps).
Detailed Content
Section titled “Detailed Content”Core Concepts
Section titled “Core Concepts”Worked Examples
Section titled “Worked Examples”Common Mistakes
Section titled “Common Mistakes”- Rushing through foundational material
- Not practising problems after reading
- Failing to connect concepts across topics