Chapter 1
Introduction to Machine Learning
Biological vs artificial neurons, what ML is, network architecture, the 10 characteristics of ML, and supervised vs unsupervised vs reinforcement learning.
From: Chapter 1_Introduction to Machine Learning.pptx
Biological neuron (slides 4–5)
- About 10 billion neurons in the human cortex, each connected to several thousand other neurons.
- Most neurons encode their output as a series of brief electrical pulses (spikes / action potentials).
- Dendrites: branches that receive signals from other neurons.
- Soma: the neuron's cell body. Nucleus: the command centre of the cell.
- Axon: nerve fibre that carries impulses away from the cell body.
- Axon terminal button: knobs at the end of the axon that release neurotransmitters.
Artificial neuron (slides 6–9)
An information-processing system with performance characteristics in common with biological neural networks: it takes many input signals, processes them, and outputs them to solve a task it was trained for. Also called connectionist models or parallel distributed processors.
ANNs are based on five assumptions:
- Information processing occurs at neurons (nodes, processing elements, units).
- Signals are passed over connection links.
- Each link has an associated weight (synapse) that multiplies the signal.
- Each neuron applies an activation function (usually nonlinear) to its net input to get its output.
- A learning rule adapts the weights to solve a task.
| Part | Role |
|---|---|
| Input layer | Receives the inputs |
| Hidden layer | No direct connection with the outside; computes and passes information from input to output nodes |
| Output layer | Computes and transfers information from the network to the outside |
| Connection weight | Strength of the connection between nodes |
| Biological | Artificial |
|---|---|
| Dendrites (receive) | Inputs |
| Soma (process) | Neuron / node (net input + activation) |
| Axon (transmit) | Output |
| Synapse | Weight |
What is machine learning? (slides 11–15)
- AI: area of computer science that creates intelligent machines that think, work and react like humans.
- Machine learning gives computers “the ability to learn without being explicitly programmed” (Arthur Samuel, 1959).
- ML is a subset of AI that extracts patterns from data. It can find rules for optimal behaviour and adapt to changes.
- Born from pattern recognition and the idea that computers can learn from data.
- Examples: self-driving Google car, Amazon/Netflix recommendations, sentiment on Twitter, fraud detection.
Typical architecture (slides 17–18)
- Single layer network: input layer (layer 0) → output layer (layer 1). Only one processing layer.
- Multi layer network: input layer (layer 0) → hidden layer (layer 1) → output layer (layer 2).
- The input layer does no processing, so it is not counted as a processing layer.
10 characteristics of ML (slide 20)
| Characteristic | Meaning |
|---|---|
| 1. Data-driven | Learns patterns from data, not hand-written rules. Data quality and quantity drive performance |
| 2. Learning from experience | Improves as it sees more data (training, updating parameters) |
| 3. Generalization | Predicts well on unseen data; otherwise it is just memorising (overfitting) |
| 4. Adaptability | Adapts to new patterns, e.g. retraining when new data arrives |
| 5. Pattern recognition | Finds hidden patterns: image recognition, speech, anomaly detection |
| 6. Automation of decision-making | Decides without humans: spam filtering, credit scoring, recommendations |
| 7. Dependence on features | Relies on input variables; feature selection/engineering matters |
| 8. Iterative process | Collect → preprocess → train → evaluate → tune, repeated |
| 9. Performance measured empirically | Accuracy, precision, recall, F1 (classification); MSE, RMSE (regression) |
| 10. Black-box model | You see input and output, but the internal decision process is hard to interpret |
Criteria for a good ML system (slide 22)
- Data preparation capabilities.
- Algorithms, basic and advanced.
- Automation and iterative processes.
- Scalability: handles growing data, features or users without a big drop in speed. Three kinds: data (growing dataset), computational (efficient CPU/GPU/memory use), model (more features or complex structures).
- Ensemble modelling: combining multiple models for a better overall prediction.
Types of learning (slides 26–30)
| Supervised | Unsupervised | Reinforcement | |
|---|---|---|---|
| Data | Labelled (input + known output) | Unlabelled (input only) | Interaction with an environment |
| Nickname | Learning with a teacher | Learning without a teacher | Learning from rewards/penalties |
| Goal | Predict the correct output | Explore the data's structure | Improve decisions over time |
| Tasks | Classification (discrete, e.g. spam/not spam); regression (continuous, e.g. house price) | Clustering (customer segmentation); dimensionality reduction (visualisation) | Agent, environment, state, action, reward |
- Supervised learning (slide 27): adjust weights using a learning algorithm while the desired output for each training input is presented. Many iterations may be needed. Designed for pattern classification. Example data: the Iris data set (UCI).
- Unsupervised learning (slide 29): draws inferences from input data without labelled responses. The most common method is cluster analysis; clusters use a similarity measure such as Euclidean or probabilistic distance.
- Slide 30 shows a SOM improving from the 1st to the 5000th iteration: QE (quantization error) 1.80 → 0.48 and TE (topographic error) 0.32 → 0.1467. Lower is better.
Learning in the human sense (slide 25): a process, not a product; a change in knowledge, beliefs, behaviours or attitudes, done by the learner (Ambrose et al., 2010).