BoundaryExtrapolation#

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

Extend the domain range using the boundary values.

Examples

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

We can set the default type of extrapolation

>>> fd.extrapolation = BoundaryExtrapolation()
>>> fd([-.5, 0, 1.5]).round(3)
array([[[ 0.976],
        [ 0.976],
        [ 0.797]],
       [[ 0.759],
        [ 0.759],
        [ 1.125]]])

This extrapolator is equivalent to the string “bounds”.

>>> fd.extrapolation = 'bounds'
>>> fd([-.5, 0, 1.5]).round(3)
array([[[ 0.976],
        [ 0.976],
        [ 0.797]],
       [[ 0.759],
        [ 0.759],
        [ 1.125]]])

Methods