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.pyprovides methods that prepare the experiment data. - The
bootstrap.pyimplements the bootstrap procedure including the extraploation approach. - The script
runs.pyhas 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
rffbootfolder is a reusable module that implements data generating methods, kernel related computations, and other util methods (such as plot). - The
kernel_ridgefolder has one scriptmain.pyand one implementation folderimpl. Run the script file usingpython main.pyto get the results of a KRR experiment. - The
mmdfolder also has one scriptmain.pyand one implementation folderimpl. Run the script file usingpython main.pyto 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)