-
Notifications
You must be signed in to change notification settings - Fork 24
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
Spectral time kernel #256
Spectral time kernel #256
Conversation
) | ||
|
||
covar_modules[name] = ProductKernel( | ||
SpectralMixtureKernel(num_mixtures=5, active_dims=time_dim), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GPyTorch recommends to initialize SMK from data. For example, from code in the paper above:
if enable_time:
smk = SpectralMixtureKernel(num_mixtures=num_smk_mixtures, ard_num_dims=1, active_dims=(dx.shape[-1] - 1,))
smk.initialize_from_data(dx, dy)
covar_module = ProductKernel(smk, regular_kernel)
subset_batch_dict = {
"likelihood.noise_covar.raw_noise": -2,
"covar_module.base_kernel.kernels.1.raw_outputscale": -1,
"covar_module.base_kernel.kernels.1.base_kernel.raw_lengthscale": -3,
}
The subset dict part is not used by us, but initialization should be helpful. Looking at source of that heuristic, it has some statistical tests and shouldn't be a performance problem. So, maybe just do it here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I found 3 components a more stable choice generally.
- also change the default number of mixtures to 3
@nikitakuklev thanks for your comments, lmk if these changes address them properly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to leave init as choice. LGTM.
use_spectral_mixture_kernel=False