question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move lengthscale outside of kernel

See original GitHub issue

Proposal: kernels are not responsible for lengthscales. We can introduce a separate scaling module that divides the data by lengthscales before feeding the data into the kernel

Reasoning: we do some batch-dimension hacking to get fast kernel diagonals, as well as fast batch kernels. For kernel diags - we transform the n x d data into n x 1 x d data, which then only computes kernel diagonals. For additive/multiplicative kernels, we transform the n x d data into d x n x 1 data.

There is a problem when we are using an ARD option for kernels, or when we have separate lengthscales for the different batches. If this lengthscale scaling happens before the data enters the kernel, this problem is mitigated.

In general - this would introduce a convention that kernels should not define their own parameters (which is already the case with output scales).

Rolling in the change: if we’re all on board with this, we will deprecate kernel lengthscales. We will encourage users to use the lengthscale module and initialize kernels with lengthscale=False. When we’re ready for a major release (and remove lengthscales completely from kernels), then the lengthscale=False kwarg won’t be necessary any more.

cc/ @Balandat @darbour @jacobrgardner

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Balandatcommented, Sep 7, 2018

So one use-case is to have different length-scales for different tasks in a multi-task GP. Do you think it would be easy to implement this under the new proposal?

cc @rajkumarkarthik, @darbour

0reactions
Balandatcommented, Sep 11, 2018

Why would an LCM kernel be less computationally burdensome than having task-wise lengthscales? In terms of Kernel evaluation the task-specific lengthscales should not make any difference, only hyperparameter space would be higher dimensional in the fitting.

Regardless, having an LCM kernel would be useful, if anything as a baseline to compare against. #261

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kernel Cookbook
The lengthscale ℓ determines the length of the 'wiggles' in your function. ... Every kernel has this parameter out in front; it's just...
Read more >
Intuition behind the length-scale of the Rational Quadratic ...
The rational quadratic kernel follows from taking a gamma distribution over τ with shape parameter α and mean 1/ℓ2. That is, ℓ in...
Read more >
issues with inference on lengthscale parameter of gaussian ...
I find that this sometimes produces relatively poor inference on the covariance kernel's lengthscale parameter ("rho_sq"), and am wondering if I'm making ...
Read more >
Gaussian Processes and Kernels
The lengthscale indicates the typical distance between turning points in the function. Often a good value is comparable to the range of a...
Read more >
GPyTorch, how to set initial value for "lengthscale ...
covar_module gets your entire kernel and the base_kernel gets you your RBF kernel. You want to fix your lengthscale as some constant value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found