Stochastic trace estimation for parameter-dependent matrices applied to spectral density approximation
Stochastic trace estimation is a well-established tool for approximating the trace of a large symmetric positive semi-definite matrix
To reproduce our results, you will need
Note
The commands git
and python
have to be discoverable by your terminal. To verify this, type [command] --version
in your terminal.
Clone this repository using
git clone https://github.com/FMatti/parameter-trace
cd parameter-trace
Install all the requirements with
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
Reproduce the whole project with the command
python -m reproduce.py -a
Note
Reproducing the whole project might around one hour!
To run the tests written for the algorithms developed and used in the paper, you will need to install pytest and run the command pytest
at the root of this project with the commands
python -m pip install pytest
pytest
We consider parameter-dependent matrices of the form
where
However, we assume that we only have access to products of this matrix with vectors for each
We can approximate the trace with the Girard-Hutchinson estimator: We take
where
Alternatively, the trace of a symmetric matrix whose singular values decay quickly can be approximated well by using a Gaussian sketching matrix
Then we can estimate the trace as
Finally, an estimator which corrects for inaccuracies in the Nyström approximation by estimating the trace of its residual using the Girard-Hutchinson estimator is
This is the parameter-dependent analogue of the Nyström++ estimator, which is based on the Hutch++ estimator.
The smoothed spectral density of a real symmetric matrix
for a Gaussian
which allows us to apply any of the above presented stochastic trace estimators to the parameter dependent matrix
whose coefficients
Finally the Chebyshev-Nyström++ estimator approximates the smoothed spectral density by applying the Nyström++ approximation to the Chebyshev interpolant
parameter-trace
│ README.md (file you are reading right now)
| requirements.txt (Python package requirements file)
| reproduce.py (script for easy reproduction of project)
|
└───paper (the LaTeX project for the paper)
└───reproduce (scripts which help setup and reproduce project)
└───algorithms (the algorithms introduced in the paper)
└───matrices (the example matrices used for the numerical results)
└───test (unit tests written for the algorithms)