A model’s output came out wrong, and you want to know how much its input is to blame. Nudge the input by a tiny amount and watch the output: the nudge passes through stages, and each stage multiplies whatever change reaches it by its rate. paths lists every route from the input to the output, each as its stages’ rates in order. Write effect(paths): how much the output moves per 1 unit of nudge at the input.
Nudge the input up by 1. The nudge travels down every route at once, and each stage changes what reaches it by its rate. How far does the output move?
effect(paths)| paths | every route from the input to the output, each a list of its stages' rates, in order | e.g. [[4]] |
| returns | how much the output moves per 1 unit of nudge at the input | |