The paper K-Means Kernel Classifier provides the details.
Download the repository and unzip the data.
For the classifier with raw and fft features run:
python k_means_kernel_raw_fft.py
For the classifier with raw patch features run:
python k_means_kernel_raw_patches.py