tsterbak/kernel_eca

NotFittedError: This KernelCenterer instance is not fitted yet

Opened this issue · 0 comments

I am trying to run this simple code to perform Kernel ECA on a numpy array:

import numpy as np
from kernel_eca import KernelECA

x1 = np.random.rand(100, 60)
x2 = np.random.rand(100, 60)

kr_eca = KernelECA(n_components=20, kernel='poly', degree=3, 
                   eigen_solver='auto', random_state=74292)

x1_keca = kr_eca.fit_transform(x1)
x2_keca = kr_eca.transform(x2)

The last step of applying the transform throws this error:
NotFittedError: This KernelCenterer instance is not fitted yet. Call 'fit' with appropriate arguments before using this method.

Please let me know what could be causing this.

Regards,
Indrajit