Below is an example of using an approximate function map here . This is for the RBF core, but it works the same.
The above example uses a βpipelineβ, but you can also just apply the transformation to your data before passing it to a linear class, since AdditiveChi2Sampler actually not fit to the data in any way.
Keep in mind that this is a fair and approximation of the kernel map (which I found to work quite well), and if you want to use the exact kernel, you have to go with ogrisel anwser.
source share