@flxb I copy-pasted this code from kernel pca.