Machine Learning
Learning patterns from data instead of hand-coding rules — supervised, unsupervised and reinforcement learning, and the habit of testing on data the model has never seen.
Machine learning is what you reach for when the rules are too fiddly to write by hand. Instead of coding “if the email mentions a prize and has three exclamation marks, it’s spam”, you show a model thousands of labelled emails and let it fit the pattern itself. It runs through my degree (AI and machine learning was the thread of my final year), my dissertation, and most of what I read about AI today.
Three families
| Supervised | Unsupervised | Reinforcement | |
|---|---|---|---|
| Data | inputs with known labels | inputs only | an environment that hands out rewards |
| Goal | predict the label for new inputs | find structure | learn a policy that maximises reward |
| Typical tasks | classification, regression | clustering, dimensionality reduction, topic modelling, anomaly detection | games, robotics, control |
| Example algorithms | decision trees, random forests, SVMs, naive Bayes, k-nearest neighbours, neural networks | k-means, hierarchical clustering, PCA, LDA topic models | Q-learning, PPO |
Semi-supervised and self-supervised learning sit in between. Self-supervision — predicting the next word, or a masked word — is how modern language models pre-train on oceans of unlabelled text. More on the third column in Reinforcement Learning, and on layered neural networks in Deep Learning.
The idea that matters most: generalisation
A model that scores 100% on its training data may have learnt nothing except the training data. So you split:
- Training set — the model learns from it.
- Validation set — you tune choices (depth of a tree, learning rate) against it.
- Test set — touched once, at the end, to estimate how the model will do on data it has never seen.
Overfitting is memorising noise; underfitting is a model too simple to capture the signal. The bias–variance trade-off is the tension between them. Accuracy alone also lies on imbalanced data — a fraud model that always says “not fraud” is 99.9% accurate and useless — which is why precision, recall and confusion matrices exist.
A small example
Say you want to group support tickets without labels. An unsupervised topic model might discover clusters that turn out to be “billing”, “login problems” and “feature requests”. Once a human names those clusters and labels a few hundred tickets, you can train a supervised classifier to route new tickets automatically. Unsupervised to explore, supervised to automate — a pattern I used on forum data at university (Pathways into Cybercrime).
In practice
Most of the ML I touch now is through pre-trained models rather than training my own, but the fundamentals keep paying off: be suspicious of a demo that was only evaluated on the examples it was tuned on, ask what the model was rewarded for, and remember that the hardest part is usually the data, not the algorithm. When I evaluate an LLM feature, I’m still doing train/test hygiene — just with prompts and eval sets instead of decision trees.
- #machine-learning
- #supervised-learning
- #unsupervised-learning
- #ai
↩ Linked from (4)
- Deep LearningSeed
Deep learning is Machine Learning with many stacked layers of artificial neurons, trained end to end. The big shift from classic ML is that you stop hand-crafting features. You don't tell the network what an edge or a wh…
Natural language processing (NLP) is the part of Machine Learning that deals with text. The core problem never changes: language is messy, ambiguous and context-dependent, and models need numbers. Every NLP technique is…
- Pathways into CybercrimeGrowing
…ble thing I learnt. Classification: supervised models to label posts or accounts once topics were understood (Machine Learning, Natural Language Processing). Change-point analysis: finding the moments a time series of to…
- Topic Modelling with LDAGrowing
…ps them into topics: clusters of words that characterise what the collection is about. No labels needed. It's unsupervised learning for text.
↪ Links to (3)
Related by topic
- Growingcase study
Building a Low-Code BPMN Workflow Platform
Frontend craft - Growing
Calisthenics Programming: Skill vs Hypertrophy Phases
Calisthenics Lab - Seed
Convex
Frontend craft - Growingmetaphor
Deloads Are Tech-Debt Sprints
Calisthenics Lab