Skip to content

Dataset

gpjax.dataset

__all__ = ['Dataset'] module-attribute
Dataset dataclass

Bases: Pytree

Base class for datasets.

Attributes
X (Optional[Num[Array, "N D"]]): input data.
y (Optional[Num[Array, "N Q"]]): output data.
X: Optional[Num[Array, 'N D']] = None class-attribute instance-attribute
y: Optional[Num[Array, 'N Q']] = None class-attribute instance-attribute
n: int property

Number of observations.

in_dim: int property

Dimension of the inputs, XX.

__init__(X: Optional[Num[Array, 'N D']] = None, y: Optional[Num[Array, 'N Q']] = None) -> None
__post_init__() -> None

Checks that the shapes of XX and yy are compatible, and provides warnings regarding the precision of XX and yy.

__repr__() -> str

Returns a string representation of the dataset.

is_supervised() -> bool

Returns True if the dataset is supervised.

is_unsupervised() -> bool

Returns True if the dataset is unsupervised.

__add__(other: Dataset) -> Dataset

Combine two datasets. Right hand dataset is stacked beneath the left.