Inputs, Parameters, and Outputs
Every model computation has three roles.
The input is the data given to the model.
The parameters are the learned values stored by the model.
The output is the value computed by the model.
For a tiny model:
y_hat = wx + b
the roles are:
x input
w, b parameters
y_hat output or prediction
The input is not learned. It is supplied.
The parameters are learned. They are changed by training.
The output is computed from the input and parameters.
One example
Suppose:
x = 3
w = 2
b = 1
Then:
y_hat = wx + b
= 2 x 3 + 1
= 7
The model predicted 7 for input 3.
Let y_hat = wx + b, with x = 4, w = 3, and b = -2. What is y_hat?
Compute it first, then check your number.
HintSubstitute the values
Compute 3 x 4 + (-2).
SolutionWork it out
y_hat = 3 x 4 - 2 = 12 - 2 = 10.
In y_hat = wx + b, enter 1 if x is learned during training, or 0 if it is supplied as data.
Compute it first, then check your number.
HintSeparate data from parameters
The model receives x. It stores and learns w and b.
SolutionWork it out
x is the input. It changes from example to example, but it is not learned
by the model. The learned values are w and b.