Skip to content

Instantly share code, notes, and snippets.

View gwgundersen's full-sized avatar

Gregory Gundersen gwgundersen

View GitHub Profile
@vvanirudh
vvanirudh / random_fourier_features.py
Created February 6, 2018 19:39
Random fourier features using both sines and cosines embedding for Gaussian kernel
from sklearn.base import BaseEstimator
from sklearn.exceptions import NotFittedError
import numpy as np
class IRFF(BaseEstimator):
'''
Random fourier features using the improved embedding
https://www.cs.cmu.edu/~schneide/DougalRandomFeatures_UAI2015.pdf
'''