Generator

residual-backwards

One function in the tls library, called 4 times across 2 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 6 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws distance from the truth and residual, for both methods, with 100% of the noise in the matrix. Four bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.

residual-backwards is one function in lib/figures/tls.js — errors in the matrix too — where the residual orders two methods backwards. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

Distance from the truth and residual, for both methods, with 100% of the noise in the matrixFour bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.the upper pair is distance from the truth; the lower pair is ‖Ax − b‖least squares · error0.1098total least squares · error0.04436least squares · ‖Ax − b‖4.536total least squares · ‖Ax − b‖4.698two orderingserror ratio (ls ÷ tls)2.5residual ratio (tls ÷ ls)1seeds40no vector makes the residual smallernot even the one the problem was built from

Four bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.

share: 1

The arguments are the ones A small residual is not a small error passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Distance from the truth and residual, for both methods, with 100% of the noise in the matrixFour bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.the upper pair is distance from the truth; the lower pair is ‖Ax − b‖least squares · error0.1098total least squares · error0.04436least squares · ‖Ax − b‖4.536total least squares · ‖Ax − b‖4.698two orderingserror ratio (ls ÷ tls)2.5residual ratio (tls ÷ ls)1seeds40no vector makes the residual smallernot even the one the problem was built from

Four bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.

share: 0

The arguments are the ones When the matrix is wrong too passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Distance from the truth and residual, for both methods, with 0% of the noise in the matrixFour bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.the upper pair is distance from the truth; the lower pair is ‖Ax − b‖least squares · error0.04439total least squares · error0.1565least squares · ‖Ax − b‖4.734total least squares · ‖Ax − b‖4.971two orderingserror ratio (ls ÷ tls)0.28residual ratio (tls ÷ ls)1.1seeds40no vector makes the residual smallernot even the one the problem was built from

Four bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.

share: 0.6

The arguments are the ones When the matrix is wrong too passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Distance from the truth and residual, for both methods, with 60% of the noise in the matrixFour bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.the upper pair is distance from the truth; the lower pair is ‖Ax − b‖least squares · error0.05224total least squares · error0.03071least squares · ‖Ax − b‖3.398total least squares · ‖Ax − b‖3.467two orderingserror ratio (ls ÷ tls)1.7residual ratio (tls ÷ ls)1seeds40no vector makes the residual smallernot even the one the problem was built from

Four bars, medians over 40 seeds. The upper pair is how far each answer is from the coefficients the problem was built from; the lower pair is ‖Ax − b‖ on the problem as given. Ordinary least squares minimises the lower quantity by definition, so its bar is the shorter of the two whatever happens above — and at this share it is the less accurate answer.

What it checked while drawing

Every figure above asserted its own claims on the way to being drawn, and a claim that failed would have failed the build rather than drawn a wrong picture. Those assertions used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

6 distinct claims across 4 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

a noise level the fit survives

a share of the noise between none and all

and at this share the more accurate answer is the one with the larger residual

and at this share the residual and the error agree, which is the case that hides the trap

enough seeds for a median to mean something

the total least-squares residual is the larger, whatever the share

Against the rule

It draws a decomposition and prints its residual. It calls overSeeds, and every figure above carries the badge — which residualcheck verifies by looking for it in the emitted SVG rather than by finding the call that builds one. A badge that is constructed and then left out of the body is the failure that check exists for.

Across the library: the rule bites on 90 of 174 generators — 75 print a residual and 15 are exempt with a published reason; 84 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The whole library · All essays · What must fail