Estimates the diagonal of a matrix that is available only through
products \(A X\), using the XDiag estimator, which applies the same
low-rank-plus-correction and leave-one-out ideas as trace_est().
Arguments
- A
A square matrix, a function computing \(A X\) for a matrix \(X\), or a lazy kernel from
kernel_matrix().- m
Number of matrix-vector products to spend.
- n
Dimension of \(A\). Required only when
Ais a function.- adjoint
For a non-symmetric
Agiven as a function, a function computing \(A^\top X\). When omitted,Ais assumed symmetric.
References
Epperly, E. N., Tropp, J. A. & Webber, R. J. (2024) XTrace: making the most of every sample in stochastic trace estimation. SIAM Journal on Matrix Analysis and Applications 45, 1-23. doi:10.1137/23m1548323
