ExceptionExtrapolation#
- class skfda.representation.extrapolation.ExceptionExtrapolation[source]#
Raise an exception.
Examples
>>> from skfda.datasets import make_sinusoidal_process >>> from skfda.representation.extrapolation import ( ... ExceptionExtrapolation) >>> fd = make_sinusoidal_process(n_samples=2, random_state=0)
We can set the default type of extrapolation
>>> fd.extrapolation = ExceptionExtrapolation() >>> try: ... fd([-.5, 0, 1.5]).round(3) ... except ValueError as e: ... print(e) Attempt to evaluate points outside the domain range.
This extrapolator is equivalent to the string “exception”.
>>> fd.extrapolation = 'exception' >>> try: ... fd([-.5, 0, 1.5]).round(3) ... except ValueError as e: ... print(e) Attempt to evaluate points outside the domain range.
Methods