Kernel wishlist: categorical variants and other useful kernels

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python

Research direction

No files, tests, or implementation entry points are named. Start by narrowing the wishlist to one proposed categorical or continuous kernel, then review the existing kernel implementations and determine the expected parameterization and validation. Done should mean a specific kernel is selected with an agreed implementation scope.

Written by the indexing model from the issue text.

Description

roadmap

Collecting ideas for new kernels. ptgp currently ships:

Stationary: ExpQuad, Matern52, Matern32, Matern12
Categorical: Overlap, LowRankCategorical
Non-stationary: RandomWalk, Gibbs, WarpedInput

Categorical kernels

There's a lot of room to grow here. Some ideas:

  • FullCategorical — a full-rank PSD level covariance matrix, parameterized via pm.LKJCholeskyCov or a user-supplied PSD matrix. Proper LKJ prior on the level correlation structure.
  • LowRankCategorical identifiability fixes — the current eta**2 * LowRankCategorical(W, kappa) has a scalar non-identifiability (eta and W/kappa can trade scale). Diagonal normalization (force unit diagonal on B, delegate all amplitude to eta) is the intended structural fix.
  • GroupedCategorical — sum or product of per-column ICM kernels for rows with multiple categorical features (e.g. country, device type, experiment arm). Mostly sugar over composing LowRankCategorical instances, but the parameter setup gets repetitive without it.
  • HierarchicalCategorical — for nested categorical columns (country > region > city). Covariance is a sum where each level's contribution is gated by shared ancestry. Sharing across related groups regularizes sparse leaves.

Continuous kernels

What other continuous kernels would be useful? Some starting points:

  • Periodic / locally periodic
  • Spectral mixture
  • Polynomial
  • Linear
  • Changepoint / switching kernels
  • Rational quadratic

Open questions

  • What other kernels are people using that would be worth adding?
  • Are there kernels that would be useful but are tricky to implement or experiment with?
Dominant language
Jupyter Notebook
Stars
16
Forks
5
Avg merge
2d 49m
Merged PRs (30d)
6

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from pymc-devs/ptgp

All issues in pymc-devs/ptgp

Similar issues

More Machine Learning issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.