trthatcher / MLKernels.jl

Machine learning kernels in Julia.
http://trthatcher.github.io/MLKernels.jl/dev/
MIT License
78 stars 37 forks source link

Random Fourier Features #48

Open kskyten opened 7 years ago

kskyten commented 7 years ago

Random Fourier features is a technique for approximating inner products in the RKHS using a randomized feature map. It would be great to have this in MLKernels.

Here's a paper introducing them: Random Features for Large-Scale Kernel Machines

A blog post demonstrating their use: Random Fourier Features for Kernel Density Estimation

The kernel being approximated needs to have some specific properties. Mainly it needs to be stationary (shift-invariant) and scaled properly.

I need to look into this a bit more, but it seems like it might not be too difficult to implement. The main part being a function spectraldensity, which takes a kernel as an argument and returns a distribution to sample from.