NLA-lib Explorer

Test case: the Girard–Hutchinson trace estimator (visible randomness)

Library · Source module

Test case: the Girard–Hutchinson trace estimator (visible randomness)

hutch adds to the cell est the sum of gᵢᵀ (A gᵢ) over N probes. The algorithm itself draws each probe into its own scratch block g with the vector draw gauss, so the values are in its store and it computes with them: matvec, then dot of the probe with the product.

Main results

* NLAlib.Ops.Examples.integral_hutchF, variance_hutchF: mathematics. For probes whose decoded law is isotropic, 𝔼 Σᵢ gᵢᵀ A gᵢ = N tr A; the probes are independent (they are windows at disjoint positions), so the variance is N times that of one quadratic form. * NLAlib.Ops.Examples.runs_hutch: the run, for every interpretation satisfying the contracts and every tape: N calls of each operation, 2 n + 1 scratch cells and the workspace of one operation. * NLAlib.Ops.Examples.runsLaw_hutch: the abstract theorem: the estimate est / N is unbiased, 𝔼 est / N = tr A, and its variance is that of one quadratic form divided by N.

Declarations