What is machine learning?
Machine learning is a way of building software by example. You give an algorithm data, it finds the patterns, and the result is a model that can be applied to new cases it has not seen. A spam filter is the classic case: nobody lists every spam phrase. The system is shown millions of emails labelled spam or not spam and learns what separates them.
How does machine learning work?
- Collect data. Past examples of the thing you want to predict, such as closed deals marked won or lost.
- Choose features. The inputs the model may use: company size, pages viewed, days since sign-up.
- Train. The algorithm adjusts the model until its predictions on the training examples are as accurate as it can make them.
- Test. The model is scored on examples held back from training. This shows whether it learned a general pattern or memorised the training set, a failure called overfitting.
- Deploy and monitor. The model scores live cases. Accuracy is tracked because the world shifts and models go stale.
What are the types of machine learning?
| Type | Learns from | Typical use |
|---|---|---|
| Supervised learning | Examples with the right answer attached | Lead scoring, churn prediction, spam detection |
| Unsupervised learning | Data with no labels | Customer segmentation, anomaly detection |
| Reinforcement learning | Trial and error with rewards | Game playing, robotics, bidding and pricing |
| Self-supervised learning | Raw data where part is hidden and predicted | Training large language models |
AI vs machine learning: what is the difference?
Artificial intelligence is the goal: machines doing tasks that need intelligence. Machine learning is the main method used to get there. All machine learning is AI, but not all AI is machine learning, because a system built from hand-written rules is AI too.
When is machine learning the wrong tool?
Machine learning is the wrong tool when a simple rule does the job, when there is too little data, or when a decision has to be explained step by step. "Flag any invoice over $10,000" needs no model. A useful test: if you cannot say what data the model would learn from and how you would know it was right, the project is not ready.