Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign of mean function / kernel / cross-kernel evaluation #5

Closed
willtebbutt opened this issue Apr 28, 2018 · 1 comment
Closed

Comments

@willtebbutt
Copy link
Member

willtebbutt commented Apr 28, 2018

Problem

There are currently specialised implementations of mean for each MeanFunction, cov and xcov for each Kernel and CrossKernel, potentially for a variety of scenarios. This proposal is aims to sort out the interface to move towards a standard interface for new mean functions and kernels to implement which is more intuitive, and potentially removes some of the duplication in the code base at the minute.

Specification and Implementation

MeanFunctions / Kernels / CrossKernels must implement the following interface:

  • be callable. If you have a mean function, you should be able to invoke it on whatever it considers to be a single input (e.g. a Real)
  • colwise (a la Distances.jl) functionality.
  • pairwise (a la Distances.jl) functionality.

There will be fallbacks implemented for colwise and pairwise which just iterate over the data provided and require only that the mean function / kernel / cross-kernel is callable. It will be possible for any particular mean function / kernel / cross-kernel to override this functionality by implementing a custom version of colwise and / or pairwise. Indeed, it will often be preferable that a (cross-)kernel override the default pairwise implementation (e.g. EQ kernel).

mean, cov, and xcov will then simply have generic implementations in terms of the above. Additionally, it will be trivial to, for example, get only the diagonal / first row of a covariance matrix by the appropriate use of colwise.

@willtebbutt
Copy link
Member Author

This was resolved by a recent merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant