Mean functions: better defaults and a formula interface
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start by reviewing ptgp's current Zero mean function and how VFE accepts its mean argument. Compare the proposed constant or linear default with the Formula interface and resolve the open questions about class design versus Python callables; the work is done when the project has a decided default and a defined formula approach.
Written by the indexing model from the issue text.
Description
Most GP libraries treat the mean function as an afterthought. The default is usually zero, and most examples never change it. But for practitioners, the mean function matters:
- A zero mean function means the GP reverts to zero away from data, which is rarely what you want in practice
- A constant mean is a better default (the GP reverts to the data mean), but still leaves trend on the table
- A linear mean function captures obvious trends and lets the kernel focus on residual structure, which is the semi-parametric GP pattern that works well in practice
ptgp currently has a Zero mean function. Some things to consider:
Better default
Should the default mean function be a constant (estimated from data) rather than zero? This is a small change that would make out-of-the-box behavior much more reasonable for practitioners who don't think about mean functions.
Formula interface
A random idea that might be interesting: a Wilkinson-style formula language (like R's lm) for specifying mean functions:
gp = pg.VFE(kernel=k, mean=pg.mean.Formula("1 + x1 + C(x2)"), ...)
Open questions
- What should the default mean function be? Constant or linear?
- Do mean functions need their own class, or can they just be a Python callable?
- What do people actually use for mean functions in practice?
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pymc-devs/ptgp
-
Difficulty 5/5 Over a week Newbie friendliness 22/100
-
Expose and document VGP variational parameters for fit diagnosticsPossibly taken @bwengals claimed this 58 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Add VGP: variational Gaussian inference for non-Gaussian likelihoods without inducing pointsPossibly taken @bwengals claimed this 156 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
pymc
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
[Bug]: MLX text downloads omit the requested Hub token and cache directoryPossibly taken @abhijithneilabraham claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/vllm-metal#1423 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CyberTimon/RapidRAW#2303 ·
Maintainers usually reply within 1 day
-
area:asr good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
dmunasingha/lingo-overlay#13 ·
-
wave-followup
Difficulty 2/5 1-3 hours Newbie friendliness 79/100