This repository provides code for demonstrating how to apply bootstrap to obtain posteriori error estimation for random Fourier features. We study how the bootstrap method performs in various applications, such matrix approximation, kernel ridge regression, and hypothesis testing using maximum mean discrepancy. Experiments are conducted across multiple real and simulated datasets. All results presented in the paper are reproducible by running the corresponding code snippets. Following explains the organization and contents of this repository.
The matrix approximation
folder contains the code for the kernel matrix approximation experiments.
- The
genTestMatrix.py
provides methods that prepare the experiment data. - The
bootstrap.py
implements the bootstrap procedure including the extraploation approach. - The script
runs.py
has a complete list of Python commands that reproduce the experiment results.
The krr + mmd
folder contains the code for both KRR and MMD experiments.
- The
rffboot
folder is a reusable module that implements data generating methods, kernel related computations, and other util methods (such as plot). - The
kernel_ridge
folder has one scriptmain.py
and one implementation folderimpl
. Run the script file usingpython main.py
to get the results of a KRR experiment. - The
mmd
folder also has one scriptmain.py
and one implementation folderimpl
. Run the script file usingpython main.py
to get the results of an MMD experiment. - Note: Both KRR and MMD experiments are parallel programs. When running the experiment, make sure that the machine can handle the experiment configurations.
J. Yao, N. B. Erichson, and M. E. Lopes. Error Estimation for Random Fourier Features, AISTATIS,
2023.
(included in oral presentation, top 1.9% of submissions)