PeriodicExtrapolation#

class skfda.representation.extrapolation.PeriodicExtrapolation[source]#

Extend the domain range periodically.

Examples

>>> from skfda.datasets import make_sinusoidal_process
>>> from skfda.representation.extrapolation import (
...     PeriodicExtrapolation)
>>> fd = make_sinusoidal_process(n_samples=2, random_state=0)

We can set the default type of extrapolation

>>> fd.extrapolation = PeriodicExtrapolation()
>>> fd([-.5, 0, 1.5]).round(3)
array([[[-0.724],
        [ 0.976],
        [-0.724]],
       [[-1.086],
        [ 0.759],
        [-1.086]]])

This extrapolator is equivalent to the string “periodic”

>>> fd.extrapolation = 'periodic'
>>> fd([-.5, 0, 1.5]).round(3)
array([[[-0.724],
        [ 0.976],
        [-0.724]],
       [[-1.086],
        [ 0.759],
        [-1.086]]])

Methods