Generator

cg-filter-shape

One function in the krylovreg library, called 5 times across 5 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 the filter 8 conjugate gradient steps apply, measured and predicted. Filter factors against the singular-value index. The factors measured off the iterate and the polynomial predicted from the recurrence coefficients agree to 6.9·10⁻¹⁴ and are drawn as one curve. It rises above one — 1.070 at its largest — and changes direction several times. Tikhonov's filter at the matching cutoff is monotone and never exceeds one.

cg-filter-shape is one function in lib/figures/krylovreg.js — iterative regularisation — a step count as the parameter, and the filter it applies. 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.

The filter 8 conjugate gradient steps apply, measured and predictedFilter factors against the singular-value index. The factors measured off the iterate and the polynomial predicted from the recurrence coefficients agree to 6.9·10⁻¹⁴ and are drawn as one curve. It rises above one — 1.070 at its largest — and changes direction several times. Tikhonov's filter at the matching cutoff is monotone and never exceeds one.081624324048566400.250.50.7511.25index kfilter factoronezeroCG, both routesTikhonovone of these is not a weightlargest CG factor1.1measured vs predicted6.9·10⁻¹⁴largest Tikhonov factor0.97two routes to the same curveand a curve that goes above one

Filter factors against the singular-value index. The factors measured off the iterate and the polynomial predicted from the recurrence coefficients agree to 6.9·10⁻¹⁴ and are drawn as one curve. It rises above one — 1.070 at its largest — and changes direction several times. Tikhonov's filter at the matching cutoff is monotone and never exceeds one.

m: 16

The arguments are the ones A parameter that counts steps 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.

The filter 16 conjugate gradient steps apply, measured and predictedFilter factors against the singular-value index. The factors measured off the iterate and the polynomial predicted from the recurrence coefficients agree to 1.2·10⁻¹¹ and are drawn as one curve. It rises above one — 1.203 at its largest — and changes direction several times. Tikhonov's filter at the matching cutoff is monotone and never exceeds one.081624324048566400.250.50.7511.25index kfilter factoronezeroCG, both routesTikhonovone of these is not a weightlargest CG factor1.2measured vs predicted1.2·10⁻¹¹largest Tikhonov factor1two routes to the same curveand a curve that goes above one

Filter factors against the singular-value index. The factors measured off the iterate and the polynomial predicted from the recurrence coefficients agree to 1.2·10⁻¹¹ and are drawn as one curve. It rises above one — 1.203 at its largest — and changes direction several times. Tikhonov's filter at the matching cutoff is monotone and never exceeds one.

m: 8

The arguments are the ones An orthogonalisation nobody calls one 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.

The filter 8 conjugate gradient steps apply, measured and predictedFilter factors against the singular-value index. The factors measured off the iterate and the polynomial predicted from the recurrence coefficients agree to 6.9·10⁻¹⁴ and are drawn as one curve. It rises above one — 1.070 at its largest — and changes direction several times. Tikhonov's filter at the matching cutoff is monotone and never exceeds one.081624324048566400.250.50.7511.25index kfilter factoronezeroCG, both routesTikhonovone of these is not a weightlargest CG factor1.1measured vs predicted6.9·10⁻¹⁴largest Tikhonov factor0.97two routes to the same curveand a curve that goes above one

Filter factors against the singular-value index. The factors measured off the iterate and the polynomial predicted from the recurrence coefficients agree to 6.9·10⁻¹⁴ and are drawn as one curve. It rises above one — 1.070 at its largest — and changes direction several times. Tikhonov's filter at the matching cutoff is monotone and never exceeds one.

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 3 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 size the SVD is affordable at

a step count the filter is still a filter at

Jacobi needs a symmetric matrix

most components have a coefficient worth dividing by

the measured and predicted factors agree at this step

Tikhonov's factors stay inside [0, 1]

Against the rule

It draws a decomposition and prints its residual. It calls cgls, 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 66 of 131 generators — 51 print a residual and 15 are exempt with a published reason; 65 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.

Methods that were designed apart

A parameter that counts steps

The regularisation field's knob is a positive real number chosen by one of three rules. The iterative field's is an integer nobody called a knob — where to stop. On the same problem the best step is 20 and the best λ is 0.025, and they reach 0.1426 and 0.1406.

Iterating, instead of factorising

An orthogonalisation nobody calls one

Conjugate gradients are derived as a minimisation and behave as an orthogonalisation, which is why the finite-termination property in every textbook is not a property the method has in floating point.

Regularisation, and the answer that is chosen

Choosing without knowing

Three published rules for choosing a regularisation parameter, scored against an oracle that requires the exact answer and is therefore not a method. Generalised cross-validation lands on the oracle's λ exactly; the discrepancy principle costs 6%; the L-curve costs 129%. And told a noise level ten times too small, the discrepancy principle's error goes from 0.112 to 10,449.

Eigenvalues, singular values, rank

Restarting is a filter

A restart throws away the Ritz values it does not want and begins again from a new starting vector. Written in the eigenbasis, that vector's components have been multiplied by a polynomial with its roots at the discarded values — measured component by component, and agreeing with the polynomial to rounding.

Regularisation, and the answer that is chosen

When the answer is a choice

A backward-stable least-squares solve of this problem returns an answer whose relative error is 5.5·10⁸. Nothing went wrong. The singular values decay exponentially with no gap anywhere in them, the data does not determine the answer, and something outside the data has to choose — which is the computation rather than a preliminary to it.

The whole library · All essays · What must fail