Skip to content

Padding GP efficiently #106

@andrewfowlie

Description

@andrewfowlie

This is a great little library 👍 I’ve been playing around with jax.jit compiled tinygps.

Sometimes I want to run the tinygp again but change the length of my input coordinates, noise and observed data. That is, change N_data.

This obviously doesn’t work nicely with jax, as it means my model must be recompiled. In other contexts, the solution is ‘padding’ inputs so that they are of fixed size, and making sure padded values don’t impact the computation. See e.g. https://stackoverflow.com/a/68532890/2855071

Is there a sensible or recommended way to pad tinygp inputs?

To be clear, suppose x, y, noise etc are of length N_dim. I want to pad them to be of length > N_dim in such a way that tinygp computations/inferences are unaffected.

I tried padding my inputs with data very far away in input space from the rest of my data, and with very noisy measurements. It seemed to work. But it seems hacky and likely to be unreliable and computationally inefficient.

I tried padding with nans, but got nans back out.

It would be cool if there was an easy, efficient way of doing this. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions