IvanoLauriola / MKLpy

A package for Multiple Kernel Learning in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having problems with using MKLpy

KARTHEEKCIC opened this issue · comments

Hi,

I am working on a project related to multiple kernel learning and I wanted to use the MKLpy library. I am currently trying to run the small example given in the MKLpy paper on a dataset with 750 instances. In my program, I am creating a list of kernels using my custom kernel function. So, the shape of my training set is (11, 384, 600) where 11 is the number of kernels and (384, 600) is the size of each kernel (the kernel is obtained by the random fourier features). I am using this list of kernels to train an EasyMKL model from the library. Running this program gives me the error MKLpy.utils.exceptions.SquaredKernelError: K is not squared: torch.Size([384, 600]).
Can anyone help me out with this? I am not able to understand why it should be a squared matrix if the library allows any custom kernel.

Here is the code example for reference -
Screen Shot 2022-04-07 at 16 56 13