rfflearn_logo

API Reference

The RFFLearn library consists of the several sub modules. Click the module name to see the details of each module.

Sub module name Description
rfflearn.cpu Regressors and classifiers of random Fourier features on CPU.
rfflearn.gpu Regressors and classifiers of random Fourier features on GPU.

rfflearn.cpu

This sub-module is a module for machine learning algorithms of random Fourier feature runnable on CPU. This sub-module contains machine learning algorithms (e.g. regressors, classifiers) that are designed to be run on CPU. The interfaces of classes and functions in this module are quite close to the scikit-learn library. Most (but not all) of the classes use the scikit-learn as a backend.

This sub-module contains three types of classes and functions: (1) ML models such as support vector machines with random Fourier features, (2) hyperparameter tuners that are wrapper functions of Optuna, and (3) ML model explainers that are wrapper functions of explainer functions in scikit-learn and SHAP.

ML class Description
rfflearn.cpu.RFFCCA Canonical correlation analysis with random Fourier features.
rfflearn.cpu.RFFGPC Gaussian process classification with random Fourier features.
rfflearn.cpu.RFFGPR Gaussian process regression with random Fourier features.
rfflearn.cpu.RFFPCA Principal component analysis with random Fourier features.
rfflearn.cpu.RFFRegression Regression with random Fourier features.
rfflearn.cpu.RFFSVC Support vector classification with random Fourier features.
rfflearn.cpu.RFFSVR Support vector regression with random Fourier features.
rfflearn.cpu.ORF* ORF (orthogonal random features) version of estimators. For example, rfflearn.cpu.ORFSVC is a support vector classifier with ORF. The arguments of constructor and member functions are the same as RFF version, so please see the document of rfflearn.cpu.RFF* for the details of the usage of each class.
rfflearn.cpu.QRF* QRF (quasi-random features) version of estimators. For example, rfflearn.cpu.QRFSVC is a support vector classifier with QRF. The arguments of constructor and member functions are the same as RFF version, so please see the document of rfflearn.cpu.RFF* for the details of the usage of each class.
Explainer function Description
rfflearn.cpu.permutation_feature_importance Calculate permutation importance, and set the feature importance (mean of permutation importance for each trial) as model.feature_importances_.
rfflearn.cpu.permutation_plot Visualize permutation importance as a box diagram.
rfflearn.cpu.shap_feature_importance Calculate SHAP values using shap library, and set the feature importance (absolute of SHAP values) as model.feature_importances_.
rfflearn.cpu.shap_plot Create a bar plot of SHAP values.
Tuner function Description
rfflearn.cpu.RFFRegressor_tuner Hyperparameter tuner for RFFRegressor models.
rfflearn.cpu.ORFRegressor_tuner Hyperparameter tuner for OFFRegressor models.
rfflearn.cpu.QRFRegressor_tuner Hyperparameter tuner for QFFRegressor models.
rfflearn.cpu.RFFSVC_tuner Hyperparameter tuner for RFFSVC models.
rfflearn.cpu.ORFSVC_tuner Hyperparameter tuner for ORFSVC models.
rfflearn.cpu.QRFSVC_tuner Hyperparameter tuner for QRFSVC models.
rfflearn.cpu.RFFGPC_tuner Hyperparameter tuner for RFFGPC models.
rfflearn.cpu.ORFGPC_tuner Hyperparameter tuner for ORFGPC models.
rfflearn.cpu.QRFGPC_tuner Hyperparameter tuner for QRFGPC models.
rfflearn.cpu.RFFGPR_tuner Hyperparameter tuner for RFFGPR models.
rfflearn.cpu.ORFGPR_tuner Hyperparameter tuner for ORFGPR models.
rfflearn.cpu.QRFGPR_tuner Hyperparameter tuner for QRFGPR models.

rfflearn.gpu

Sub module for regressors and classifiers of random Fourier feature runnable on GPU. This module is designed to have the same interface as rfflearn.cpu. See the API reference of rfflearn.cpu for the details of this module.