Cyclic#

class gpjax.xarray.Cyclic(name, period)[source]#

Bases: InputTransform

Encode a periodic input as a point on a circle.

The column is replaced by {name}_sin and {name}_cos of 2 pi value / period, so values one period apart get the same encoding. Datetime inputs are days since their time origin: Cyclic("time", 365.25) encodes the seasonal cycle, and Cyclic("lon", 360.0) removes the seam in longitude.

Parameters:
name#

The column to encode.

Type:

str

period#

The period, in the units of the column.

Type:

float