User's Manual
RFFLearn is a Python library of random Fourier features (hereinafter abbreviated as RFF) [1, 2] for kernel methods, like support vector machine [3, 4] and Gaussian process model [5]. Features of this module are:
- User-friendly interfaces: Interfaces of the rfflearn module are quite close to the scikit-learn library,
- Example code first: This repository provides plenty of example code to demonstrate that RFF is useful for actual machine learning tasks,
- GPU support: Some classes in the rfflearn module provides both GPU training and inference for faster computation,
- Wrapper to the other library: Interface to optuna and SHAP are provided for easier hyper-parameter tuning and feature importance analysis.
Tutorials
Setting Up
Build development environment for RFFLearn. The author recommend to use Docker, but you can build on your environment if you don't mind to pollute your environment.
Quick Start
Try RFFlearn from a tiny code (7 lines!). RFFLearn will be easily acceptable for many ML developers because the usage of RFFLearn is quite close to Scikit-learn.
Minimal Examples
Collection of code snippets for RFF-based models, hyperparameter tuners, and feature importance visualizers. See the section below for more practical examples.
Practical Examples
Least square regression with random Fourier features
Gaussian process regression with random Fourier features
Support vector classifier with random Fourier features for the MNIST dataset
Gaussian process classifier with random Fourier features for the MNIST dataset
Principal component analysis (PCA) with random Fourier features for Swiss roll dataset
Canonical correlation analysis (CCA) with random Fourier features
Automatic hyperparameter tuning for California housing dataset
Feature importance of RFF-based regressor for California housing dataset
API Reference
References
- [1] A. Rahimi and B. Recht, "Random Features for Large-Scale Kernel Machines", NIPS, 2007. PDF
- [2] F. X. Yu, A. T. Suresh, K. Choromanski, D. Holtmann-Rice and S. Kumar, "Orthogonal Random Features", NIPS, 2016. PDF
- [3] V. Vapnik and A. Lerner, "Pattern recognition using generalized portrait method", Automation and Remote Control, vol. 24, 1963.
- [4] B. Boser, I. Guyon and V. Vapnik, "A training algorithm for optimal margin classifiers", COLT, pp. 144-152, 1992. URL
- [5] C. Rasmussen and C. Williams, "Gaussian Processes for Machine Learning", MIT Press, 2006.