Skip to content

Refactor KernelSum and KernelProduct? #68

@devmotion

Description

@devmotion

Copying from https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/pull/66/files#r399342003:

I have been thinking about restricting the KernelSum and the KernelProduct to only two kernels since

  1. that would easily allow to obtain a concretely typed fields (I don't like the fact that both types use abstract fields),
  2. that would make it trivial to check if the metric of both kernels (if existent) is the same and hence allow to optimize computations in such cases by only evaluating the metric once.

I guess the same could be achieved by considering tuples of kernels and checking all their metrics but it doesn't feel as clean.

I'm just copying @theogf's response as well:

Regarding 1. : that's a good point, that would avoid this weird thing I have to do with sums of scaled kernels.
For 2. I am not sure how this would go in terms of performance. An issue would be very welcome to explore the options

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions