JuliaGaussianProcesses / KernelFunctions.jl

Julia package for kernel functions for machine learning
https://juliagaussianprocesses.github.io/KernelFunctions.jl/stable/
MIT License
267 stars 32 forks source link

Does it make sense to replace custom ColVecs, RowVecs code with ArraysOfArrays library #516

Closed FelixBenning closed 1 year ago

FelixBenning commented 1 year ago

see https://juliaarrays.github.io/ArraysOfArrays.jl/stable/. This appears to do the same thing. Just more general. This would allow more than matrices to be passed. I.e. you could have more than 1-dimensional input vectors.

willtebbutt commented 1 year ago

It's an option. Taking a look at the code, the implementation looks reasonably complicated in comparison to our ColVecs / RowVecs, which makes me reluctant to adopt it.

That being said, there's nothing to stop you writing an extension to KernelFunctions which directly extends our kernels to interoperate nicely with those from ArrayOfArrays.jl, without us removing ColVecs / RowVecs.

devmotion commented 1 year ago

IIRC the idea (a while back) was rather to use eachrow and eachcol since starting from Julia 1.9 (?) they return an array and not an iterator anymore: https://github.com/JuliaLang/julia/pull/32310

devmotion commented 1 year ago

See eg https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/issues/394#issuecomment-956440820

FelixBenning commented 1 year ago

ah right eachrow and eachcol seems like the best solution