Representation of functional Data#

Before beginning to use the functionalities of the package, it is necessary to represent the data in functional form, using one of the following classes, which allow the visualization, evaluation and treatment of the data in a simple way, using the advantages of the object-oriented programming.

Discrete representation#

A functional datum may be treated using a non-parametric representation, storing the values of the functions in a finite grid of points. The FDataGrid class supports multivariate functions using this approach. In the discretized function representation example it is shown the creation and basic visualisation of a FDataGrid.

skfda.representation.grid.FDataGrid(data_matrix)

Represent discretised functional data.

Functional data grids may be evaluated using interpolation, as it is shown in the interpolation example. The following class allows interpolation with different splines.

skfda.representation.interpolation.SplineInterpolation([...])

Spline interpolation.

Basis representation#

The package supports a parametric representation using a linear combination of elements of a basis function system.

skfda.representation.basis.FDataBasis(basis, ...)

Basis representation of functional data.

The following classes are used to define different basis for \(\mathbb{R} \to \mathbb{R}\) functions.

skfda.representation.basis.BSplineBasis([...])

BSpline basis.

skfda.representation.basis.FourierBasis([...])

Fourier basis.

skfda.representation.basis.MonomialBasis(*)

Monomial basis.

skfda.representation.basis.ConstantBasis([...])

Constant basis.

skfda.representation.basis.CustomBasis(*, fdata)

Basis composed of custom functions.

The following classes, allow the construction of a basis for \(\mathbb{R}^n \to \mathbb{R}\) functions.

skfda.representation.basis.TensorBasis(...)

Tensor basis.

skfda.representation.basis.FiniteElementBasis(...)

Finite element basis.

The following class, allows the construction of a basis for \(\mathbb{R}^n \to \mathbb{R}^m\) functions from several \(\mathbb{R}^n \to \mathbb{R}\) bases.

skfda.representation.basis.VectorValuedBasis(...)

Vector-valued basis.

All the aforementioned basis inherit the basics from an abstract base class Basis. Users can create their own basis subclassing this class and implementing the required methods.

skfda.representation.basis.Basis(*[, ...])

Defines the structure of a basis of functions.

Irregular representation#

In practice, many functional datasets do not contain functions evaluated uniformly over a fixed grid. In other words, it is paramount to be able to represent irregular functional data.

While the FDataGrid class could support these kind of datasets by filling a common grid with possibly emtpy (or nan) values, it is inefficient to store a complete grid with low data density. Furthermore, there are specific methods that can be applied to irregular data in order to obtain, among other things, a better conversion to basis representation.

The FDataIrregular class provides the functionality which suits these purposes.

skfda.representation.irregular.FDataIrregular(...)

Represent discretised functional data of an irregular or sparse nature.

Generic representation#

Functional objects of the package are instances of FData, which contains the common attributes and methods used in all representations. This is an abstract class and cannot be instantiated directly, because it does not specify the representation of the data. Many of the package’s functionalities receive an element of this class as an argument.

skfda.representation.FData(*[, ...])

Defines the structure of a functional data object.

Extrapolation#

All representations of functional data allow evaluation outside of the original interval using extrapolation methods.

Deprecated Classes#

skfda.representation.basis.BSpline([...])

BSpline basis.

skfda.representation.basis.Fourier([...])

Fourier basis.

skfda.representation.basis.Monomial(*[, ...])

Monomial basis.

skfda.representation.basis.Constant([...])

Constant basis.

skfda.representation.basis.Tensor(basis_list)

Tensor basis.

skfda.representation.basis.FiniteElement(...)

Finite element basis.

skfda.representation.basis.VectorValued(...)

Vector-valued basis.