Closed sivapvarma closed 7 years ago
Hi there
I'd be cautious with Pkg.checkout
, as it will pull the latest version of the package which may not be stable. I'm making a number of changes to the package, so I would recommend using the tagged versions you get from the Julia metadata repo.
It looks like X
is an array of integers. The kernel matrix methods only operate on floating points, so you can convert it to an array of floats instead:
kernelmatrix(gauss_kernel, convert(Matrix{eltype(gauss_kernel)}, X))
I'll add some methods to do this implicitly in the next release!
Working in master now:
using MLKernels
X = rand(Int64, 100, 5) % 5;
gauss_kernel = GaussianKernel(2);
K = kernelmatrix(gauss_kernel, X)
This only works in dev
for me. Maybe you forgot to push a commit?
I also get this error with
kernel
function sometimes.