Learning outcomes
After completing this lesson, you will be able to:
- Explain a model as a mapping from inputs to outputs.
- Distinguish input features, parameters, and predictions.
- Understand parameters through a simple linear model.
- Distinguish a model family from a specific trained model.
- Tell apart a model, a training algorithm, and an AI system.
- Explain why parameters alone do not establish causation.
1. A model maps inputs to outputs
A machine-learning model can be viewed as a mathematical rule that receives a description of an object and computes a result. Its inputs are features: measurements, properties, text, or image data. Its output may be a number, a class, a probability, a sequence, or another task-specific representation.
We use x for the input, θ (theta) for model parameters, and ŷ (“y-hat”) for a prediction. If the actual answer is known, we denote it by y. A prediction is not the same as the actual answer: a model can be wrong.
2. What are model parameters?
Parameters are numerical values that determine the specific behaviour of a model. In a simple linear model, they are the coefficient w and the intercept b. In a neural network, parameters include the weights and biases of many connections. Large models may contain millions or billions of parameters.
Different parameter sets define different functions even when the model family is the same. Saying “we use a linear model” or “we use a neural network” is therefore not enough to reproduce a prediction: we also need the particular parameter values.
3. One example, different models
Consider a teaching example: a model estimates energy use from the number of hours that equipment operates. Let x be operating hours and ŷ be illustrative energy units. The values below are hypothetical; they are not measurements or an engineering standard.
Model A uses w = 2.4 and b = 18, so five operating hours produce a prediction of 30. Model B uses w = 1.8 and b = 22, so the same input produces 31. The input is unchanged, but the parameters differ, so the prediction differs.
Changing w changes the slope; changing b shifts the line up or down. In more complex models, parameters may alter a decision boundary or interactions between features, but the general idea is the same.
4. Inputs and parameters are not the same
The input x usually changes for every new object. Parameters θ define a particular model and normally remain fixed across predictions. When a model receives a new object, it does not need to learn from that object again; it applies its existing parameters to the new input.
This does not mean parameters never change. They are selected during training and may be updated during fine-tuning or retraining. But during ordinary prediction, we treat a particular parameter set as fixed. Lesson 1.4.2 will explain how parameters are selected and what a loss function does.
5. Model, training algorithm, and AI system
These concepts are related but not interchangeable. A model is the rule that computes a prediction. A training algorithm is the procedure that selects parameters from data using a criterion. An AI system is broader: it may prepare data, call a model, apply a threshold rule, retrieve documents, display a result, and record events.
For example, a model may estimate the probability of a fault. A separate rule may create an engineer alert when that probability exceeds a chosen threshold. The threshold, interface, and operational workflow are not necessarily part of the model itself.
6. Mini-practice: change the parameters
In the example below, predict defines the model's mathematical form. model_a and model_b contain two parameter sets. We pass the same number of operating hours to both and get different predictions. The code does not train a model: the parameters are set manually to isolate the meaning of the concept.
Run the code, then change only rate or base. Observe how the result changes. Do not assume that a higher prediction is automatically better; that depends on the data, task, and evaluation criterion.
def predict(hours, rate, base):
return rate * hours + base
model_a = {"rate": 2.4, "base": 18.0}
model_b = {"rate": 1.8, "base": 22.0}
hours = 5
print(predict(hours, model_a["rate"], model_a["base"]))
print(predict(hours, model_b["rate"], model_b["base"]))Expected output: 30.0 and 31.0. In a real project, parameters are normally obtained through training and checked on data rather than chosen manually.
7. What parameters do not tell us by themselves
A parameter influences a prediction, but it cannot automatically be interpreted as the cause of a phenomenon. In a simple linear model, a coefficient can help describe the direction and scale of an association under specific assumptions. However, correlated features, measurement scales, data preparation, and model structure all affect interpretation.
In a neural network, an individual weight usually has no simple human-readable meaning on its own. Behaviour is determined jointly by many parameters. We should not claim that “one weight represents one concept” without a separate analysis.
8. Summary and what comes next
A model maps input features to a prediction. Parameters define a specific model instance. Different parameter values can produce different outputs even when the mathematical form is unchanged. A training algorithm selects parameters, while an AI system combines the model with data, rules, and software components.
Lesson 1.4.2 will explain parameter fitting and loss functions. Lesson 1.4.3 covers overfitting and underfitting, 1.4.4 covers generalisation, and 1.4.5 introduces hyperparameters and tuning. Model evaluation and metrics are covered in Theme 1.5.
Independent task
Describe a simple model that estimates travel time from distance. Identify the input feature, the prediction, two parameters, and what changes when each parameter increases. Then list two AI-system components that sit outside the model itself. Do not use real measurements or interpret parameters as causal effects.
All numerical values in the example are hypothetical. The example illustrates the role of parameters; it does not describe real energy use. A practical model requires data, evaluation, applicability checks, and error monitoring.
References and further reading
Lesson glossary
A rule that transforms input data into an output.
A numerical value that defines a particular model instance.
A property of an object supplied to a model.
The result computed for a given input.
A parameter that scales an input contribution.
The baseline offset in a linear relationship.
Models that share a form or architecture.
A specific structure with particular parameter values.
A procedure for selecting parameters from data.
A model together with data, rules, and software components.
Knowledge check
Question 1
What does a machine-learning model do?
Question 2
What does θ represent in ŷ = f(x; θ)?
Question 3
How does input x usually differ from parameters θ during prediction?
Question 4
If x = 4, w = 2, and b = 3, what is ŷ = wx + b?
Question 5
Two models share the same linear form but have different w and b. Which statement is correct?
Question 6
What does a training algorithm do?
Question 7
Which may be part of the AI system around a model? Select all that apply.
Question 8
Can an individual parameter automatically be treated as proof that a feature has a causal effect?