Learning outcomes
After studying this lesson, you will be able to:
- Define the key concepts accurately
- Distinguish methods and system components
- Explain the main workflow using diagrams
- Identify limitations and describe validation
1. AI is the broad field
Artificial Intelligence includes rule-based systems, search, planning, symbolic reasoning, machine learning and combinations of these methods. The defining feature is the task and capability being engineered—not the presence of a neural network.
2. Machine Learning
Machine Learning (ML) uses data to estimate patterns or decision rules instead of relying only on manually written rules for every case. Training adjusts parameters to reduce an objective such as prediction error. The learned relationship is then applied to new inputs.
3. Deep Learning
Deep Learning (DL) is a part of machine learning based on neural networks with multiple layers of parameterized transformations. These layers learn representations from data. DL is influential in vision, speech and language, but often needs substantial data, computation and evaluation.
4. The nested relationship
Every deep-learning method is machine learning, and machine learning is part of AI. The reverse is not true: many AI systems do not learn from data, and many ML methods are not deep neural networks. Think of nested sets, not interchangeable labels.
5. Compare mechanisms
A rule-based filter applies explicit conditions. A decision tree learns feature tests from examples. A neural network learns numerical weights across layers. These systems may solve similar tasks, but their training needs, transparency and failure modes differ.
6. Classification examples
A chess engine using search and hand-designed evaluation may be AI without ML. A spam filter trained on labelled messages is ML. A transformer language model is DL, and therefore also ML and AI.
7. Review
Draw nested circles for AI, ML and DL. Place a rule-based expert system, a random forest and a transformer language model in the correct regions. Explain why not all AI is deep learning.
Review
Define the key terms in your own words, give a real-world example and explain how you would validate the system's output.
Key terminology
- AI
- The broad field of intelligent systems, including learning and non-learning methods.
- Machine Learning (ML)
- Methods that estimate patterns or decision functions from data.
- Deep Learning (DL)
- ML based on neural networks with multiple parameterized layers.
- Representation
- A numerical or structured form in which a system encodes useful information about an input.
Comparison table
| Approach | Where the behaviour comes from | Example |
|---|---|---|
| Rules | Explicit human-authored conditions | Safety checklist |
| Classical ML | Parameters estimated from examples | Random forest classifier |
| Deep learning | Layered neural representations learned from data | Transformer language model |
Learning paradigms within ML
Supervised learning uses labelled examples. Unsupervised learning searches for structure without target labels. Reinforcement learning trains an agent through interaction and reward signals. These are learning settings, not synonyms for particular model architectures: neural networks can be used in more than one setting.
Feature engineering and representation learning
In classical workflows, people often design features from domain knowledge—for example, rolling averages or calendar indicators. Deep learning can learn internal representations from raw or lightly processed inputs. Learned representations can reduce manual feature design, but they do not remove the need for sound data, evaluation and domain understanding.
Choosing an approach
Model choice depends on available data, the target task, explainability needs, deployment hardware, latency, maintenance and the cost of mistakes. A simple rule or linear model may be preferable when transparency and reliability matter more than a small gain in benchmark score.
8. Complete lesson: the AI–ML–DL relationship
Three levels, not three competing labels
Artificial Intelligence is the broadest term in this lesson. It describes the field of building systems that perform tasks associated with intelligent behaviour. Machine Learning is one approach within AI: instead of specifying every decision rule by hand, a training procedure estimates patterns or parameters from examples. Deep Learning is a family within Machine Learning that uses neural networks with multiple layers to learn representations from data. The relationship is therefore nested: DL is part of ML, and ML is part of AI.
This hierarchy is conceptual, not a ranking of quality. A deep neural network is not automatically more accurate, safer or more suitable than a rule-based system or a small statistical model. The appropriate choice depends on the task, data volume and quality, required latency, available hardware, interpretability, maintenance and consequences of error.
Why not every AI system uses ML
A rule-based diagnostic assistant can apply expert-authored conditions without estimating parameters from a dataset. A path planner can search a graph of possible routes. A constraint solver can find a schedule that satisfies explicit requirements. These systems may be considered AI because of the tasks they perform, even though their central logic is not learned from examples. They can also be combined with ML—for example, a learned model estimates travel time while a search algorithm chooses a route.
Why not every ML system uses deep learning
Classical ML includes linear and logistic regression, decision trees, random forests, support-vector machines and gradient-boosted trees. These methods often work well with structured tables and moderate datasets. They may require feature engineering, but can be easier to train, inspect and deploy than a large neural network. Deep learning is especially useful when inputs are high-dimensional or unstructured, such as images, audio, video and natural language, and when enough representative data and computing resources are available.
Learning settings are different from model families
- Supervised learning: examples include input features and a target label or value. The model learns to predict the target.
- Unsupervised learning: examples have no target label; methods search for clusters, low-dimensional structure or unusual observations.
- Self-supervised learning: training targets are derived from the data itself, for example predicting masked words or missing parts of an input.
- Reinforcement learning: an agent interacts with an environment and learns from rewards or penalties over sequences of actions.
These are learning settings, not exclusive neural-network types. A neural network can be trained in supervised, self-supervised or reinforcement-learning settings. A decision tree is commonly trained with supervised examples.
Feature engineering and representation learning
In a tabular energy dataset, an engineer might create features such as outdoor temperature, hour of day, occupancy and a rolling average of previous consumption. This is feature engineering: domain knowledge shapes the input representation. Deep learning can learn useful internal representations from raw or lightly processed data. For an image, early layers may respond to edges and textures, while later layers combine them into more complex patterns. Learned representations do not eliminate data preparation, validation or domain knowledge; they change where some of the representation work happens.
Generative AI is not a synonym for Deep Learning
Generative AI refers to systems that create new content, such as text, images, audio or code. Many current generative systems use deep neural networks, including transformers and diffusion models, but the terms describe different things: “generative” describes the task or capability, while “deep learning” describes a family of methods. A deep-learning model may classify an image without generating anything. A generative system may also include retrieval, tools, rules and human review around its neural model.
How to classify a real system
For each product, ask four questions: What task does it perform? Which component produces the decision? Are its rules authored explicitly or estimated from data? What kind of input and output does it handle? A spam filter may use supervised ML; a fixed safety interlock may use rules; a route planner may use search; a modern assistant may combine a language model, retrieval, external tools and policy checks. Avoid classifying a whole product by its marketing label alone.
Practical task
Choose three systems: a thermostat with fixed thresholds, a bank transaction classifier and a language assistant. For each, identify the task, likely approach, training data requirements, one strength, one limitation and one reason a different approach might be preferable. Then explain why “uses AI” does not tell you whether the system uses ML or DL.
9. Case study: selecting an approach for a building task
Consider three requirements in one building. First, a safety interlock must stop equipment when a measured value crosses a certified limit. Explicit rules are a strong candidate because the condition is known and must be auditable. Second, an engineer wants to estimate tomorrow's energy demand from weather, occupancy and historical readings. A supervised regression model is appropriate because past examples include the target value. Third, the facility team wants to group buildings with similar consumption profiles without predefined labels. An unsupervised clustering method may help explore the data, but the resulting groups still need domain interpretation.
These components can coexist in one product. A forecasting model may provide an estimate, a rule-based layer may enforce safety limits, and a dashboard may show uncertainty and allow an engineer to review the result. The product is an AI-enabled system, but it does not have one single “AI algorithm”.
Decision questions
- Are reliable labelled examples available?
- Can the task be described by stable, explicit rules?
- Is the input structured data, an image, audio or text?
- Must a person inspect the reasoning or approve an action?
- What is the cost of a false alarm or a missed event?
Answering these questions is more useful than choosing a technique because it is fashionable.
A parameterized computational model composed of connected layers or units.
A measurable property of an object used as a model input.
Preparing and transforming raw data into useful model inputs.
An internal model value adjusted during training, such as a coefficient or weight.
The process of fitting model parameters or structure using data.
Applying a model to input data to produce an output.
An internal encoding of an object or its properties.
Systems that create new text, images, audio, video, or other data.
A broadly pretrained model that can be adapted to many tasks.
A defined sequence of computational steps.
Practice checks
Question 1
Which statement best describes the relationship between the concepts?
Answer and explanation
Correct: B. AI is the broad field; ML is one approach within it; DL is a branch of ML based on multilayer neural networks.
Question 2
A recommendation system follows expert rules written in advance. Must it use ML?
Answer and explanation
No. If decisions are produced only by explicit rules and parameters are not learned from data, the system can be AI without an ML component.
Question 3
A gradient-boosting model was trained on a large table. Does that make it Deep Learning?
Answer and explanation
No. Gradient boosting is machine learning, but it does not require a deep multilayer neural network. Dataset size does not change the method family.
Question 4
A neural network classifies images. Is it necessarily generative AI?
Answer and explanation
Not necessarily. Classification predicts a class; a generative system creates new content samples.
Question 5
Why is “we use AI” insufficient as a technical description?
Answer and explanation
It does not identify the mechanism. A useful description names rules, search, traditional ML, DL, a generative model or a hybrid, as well as inputs, outputs, training and limitations.