Checking your account

You can read the lesson while its saved answers and constructions load. Learning controls will open once that work is ready.

Numerical Methods for Modeling

Find the corner that a central difference concealed

Coding challenges

The loss changes to absolute error at its target

Botie’s symmetric gradient check conceals an absolute-loss corner behind a zero.

BOTIE

Does the central zero establish a classical derivative of zero?
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
Choose an explanation to test
The corner moves with the target

This check uses the pieces from “Keep the two local comparisons separate”.

BOTIE

The absolute test loss now has target 3 and is checked at weight 3 with step 0.25. Predict the two sides and their central estimate. A shifted target does not remove the corner.
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.

Continue the courseWhich Simulation Steps Need More Work? →
← A Perfect Fit Left Two Different Answers