Multivariable functions
A scalar multivariable function assigns one real output to each ordered vector in its domain.
On this page 9 sections
01Understand the idea#
A model can use several inputs to produce one number: features in, prediction out, or many weights in, loss out. A multivariable function describes that relationship. An ordered input is one complete setting of all its variables, not a list of separate trials.
In , the input has two coordinates. Assign and ; both belong to one evaluation.
For , substitute the coordinates before combining the terms. The output is a scalar.
If , the input means and . Substitute first: . Swapping to gives . The positions carry meaning, just as swapping two feature columns changes which coefficient multiplies them.
. Find .
Show answer and explanation
Substitute in order: .
02Coordinate order matters#
Coordinate order matters. For , swapping the input usually changes the result.
. A learner swaps . Find the actual .
Show answer and explanation
Use , : .
03More input coordinates still can produce one number#
More input coordinates still can produce one number. For , evaluate at by substituting all three entries.
Score . For , find .
Show answer and explanation
The scalar score is .
04A closer look#
When testing a model at a particular parameter vector, give every parameter its value before evaluating the scalar loss. Later, partial derivatives vary one parameter while holding the others fixed; the function you evaluate remains the same.
Match coordinates to arguments, then compute one output.
- Evaluate a scalar function at a vector input.
Further questions
Does a vector input force a vector output?
Sources & further reading
- [1]