JuliaGaussianProcesses / JuliaGaussianProcesses/KernelFunctions.jl

Designing some test fakes

Open
#464 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
275
Forks
41
PR merge metrics
No merged PRs in 30d

Description

We have decent enough interface tests in this package, but we don't have good choices for test fakes. See this blog for a description of what they are / why they're useful. The reason I think they're likely useful here is that if you're a package that consumes kernels, you currently have to pick a kernel + inputs to the kernel. Often, as for the tests involving a GP in AbstractGPs, it would be really useful if KernelFunctions just gave you a kernel and some collections of valid inputs for that kernel for which you could be confident that

  1. the kernel matrix produced is going to be positive definite (numerically)
  2. the kernel doesn't satisfy any more properties than the interface specifies. i.e. you probably want to be testing with a non-stationary kernel, that doesn't have unit variance etc to avoid accidentally depending on an edge case

Maybe we should publish in the TestUtils module some kind of weird composite kernel that we know isn't stationary etc, and that does play nicely with AD, in addition to some collections of inputs to the kernel that a downstream user can make use of.

Any thoughts as to whether this would be useful?

edit: link to blog post added

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked interface-testing blog post and reviewing the package's TestUtils module, along with the GP-related tests mentioned in AbstractGPs. Define the proposed composite kernel and valid input collections so they support AD, produce numerically positive-definite kernel matrices, and avoid properties not guaranteed by the interface. Done means the reusable fakes and inputs are published for downstream tests with coverage of those requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.