Numerical Methods for Modeling
Find the corner that a central difference concealed
The loss changes to absolute error at its target
Botie’s symmetric gradient check conceals an absolute-loss corner behind a zero.
BOTIE
The inputs we are comparing
Weight being checked
A smooth quadratic
2
An absolute-loss corner trips the single-number check
0
Target weight for this test loss
Same in both cases
0
Positive perturbation
Same in both cases
0.1
Declared loss kind
A smooth quadratic
squared
An absolute-loss corner trips the single-number check
absolute
Result for a smooth quadratic
- left
- 3.9
- right
- 4.1
- central
- 4
The corner moves with the target
This check uses the pieces from “Keep the two local comparisons separate”.
BOTIE
- Weight being checked
3
- Target weight for this test loss
3
- Positive perturbation
0.25
- Declared loss kind
absolute
Use a number, text, or an array matching the requested result. A named result uses field names, such as {"count": 2}. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
Which changes to randomness or state would make these perturbations compare different losses?
Keep the loss definition, numerical scale and derivative convention attached to a gradient-check result.
The floor uses deterministic scalar losses so each slope can be followed directly. A finite-step comparison is a diagnostic; corners and rounded evaluations still need interpretation.