Dataset#
- class gpjax.dataset.Dataset(X=None, y=None, n_total=None)[source]#
Bases:
objectBase class for datasets.
- Parameters:
X (Num[jaxlib._jax.Array, 'N D'] | Num[ndarray, 'N D'] | None) – input data.
y (Num[jaxlib._jax.Array, 'N Q'] | Num[ndarray, 'N Q'] | None) – output data.
n_total (int | None) – full-dataset size when this object is a minibatch view of a larger dataset (stamped by
gpjax.fit.get_batch);Nonemeans the dataset is self-describing (n_total == n).
Expand for references to
gpjax.dataset.DatasetMigrations / 0.18.x → 1.0.0 / OILMM joins the conditioning contract
- property full_size: int#
Size of the dataset this object is a view of.
When the dataset is a minibatch stamped by
gpjax.fit.get_batch(), this is then_totalof the parent dataset; otherwise it falls back ton. Minibatch objectives use the ratiofull_size / nto rescale the expected log-likelihood term so that a minibatch estimate is unbiased for the full-data objective:scale = data.full_size / data.nBoth
n_total(static pytree aux data) andn(an array shape) are static underjax.jit(), so this is always a concrete Python int and is safe to use in traced code.- Returns:
The full-dataset size.
- Return type: