bundles / scipy 1.17.1 / scipy / sparse / linalg / _expm_multiply / traceest
function
scipy.sparse.linalg._expm_multiply:traceest
Signature
def traceest ( A , m3 , seed = None ) Summary
Estimate np.trace(A) using 3*m3 matrix-vector products.
Extended Summary
The result is not deterministic.
Parameters
A: LinearOperatorLinear operator whose trace will be estimated. Has to be square.
m3: intNumber of matrix-vector products divided by 3 used to estimate the trace.
seed: optionalSeed for numpy.random.default_rng. Can be provided to obtain deterministic results.
Returns
trace: LinearOperator.dtypeEstimate of the trace
Notes
This is the Hutch++ algorithm given in [1].
Aliases
-
scipy.sparse.linalg._expm_multiply.traceest