GridFunctionalData#

class FDApy.representation.GridFunctionalData(argvals, values)[source]#

Represent discretised functional data.

Parameters:
  • argvals (Type[Argvals]) – Sampling points of the functional data.

  • values (Type[Values]) – Values of the functional data.

Attributes:
  • argvals_stand (Type[Argvals]) – Standardized sampling points of the functional data.

  • n_obs (int) – Number of observations of the functional data.

  • n_dimension (int) – Number of input dimension of the functional data.

  • n_points (Tuple[int, …] | Dict[int, Tuple[int, …]]) – Number of sampling points.

Methods

center([mean, method_smoothing])

Center the data.

concatenate(*fdata)

Concatenate FunctionalData objects.

covariance([points, method_smoothing])

Compute an estimate of the covariance.

inner_product([method_integration, ...])

Compute an estimate of the inner product matrix.

mean([points, method_smoothing])

Compute an estimate of the mean.

noise_variance([order])

Estimate the variance of the noise.

norm([squared, method_integration, ...])

Norm of each observation of the data.

normalize(**kwargs)

Normalize the data.

rescale([weights, method_integration, ...])

Rescale the data.

smooth([points, method, bandwidth, penalty])

Smooth the data.

standardize([center])

Standardize the data.

to_basis([points, method])

Convert the data to basis format.

to_long([reindex])

Convert the data to long format.

abstract center(mean=None, method_smoothing=None, **kwargs)[source]#

Center the data.

Parameters:
Return type:

FunctionalData

abstract static concatenate(*fdata)[source]#

Concatenate FunctionalData objects.

Parameters:

fdata (Type[FunctionalData]) – Functional data to concatenate.

Raises:
  • ValueError – When all fdata do not have the same dimension.

  • TypeError – When all fdata do not have the same type.

Return type:

Type[FunctionalData]

abstract covariance(points=None, method_smoothing=None, **kwargs)[source]#

Compute an estimate of the covariance.

Parameters:
Return type:

Type[FunctionalData]

abstract inner_product(method_integration='trapz', method_smoothing=None, noise_variance=None, **kwargs)[source]#

Compute an estimate of the inner product matrix.

Parameters:
  • method_integration (str)

  • method_smoothing (str | None)

  • noise_variance (float | None)

Return type:

ndarray[Any, dtype[float64]]

abstract mean(points=None, method_smoothing=None, **kwargs)[source]#

Compute an estimate of the mean.

Parameters:
Return type:

FunctionalData

abstract noise_variance(order=2)[source]#

Estimate the variance of the noise.

Parameters:

order (int)

Return type:

float

abstract norm(squared=False, method_integration='trapz', use_argvals_stand=False)[source]#

Norm of each observation of the data.

For each observation in the data, it computes its norm defined as

\[\| X \| = \left\{\int_{\mathcal{T}} X(t)^2dt\right\}^{\frac12}.\]
Parameters:
  • squared (bool)

  • method_integration (str)

  • use_argvals_stand (bool)

Return type:

ndarray[Any, dtype[float64]]

abstract normalize(**kwargs)[source]#

Normalize the data.

Return type:

FunctionalData

abstract rescale(weights=0.0, method_integration='trapz', use_argvals_stand=False, **kwargs)[source]#

Rescale the data.

Parameters:
  • weights (float)

  • method_integration (str)

  • use_argvals_stand (bool)

Return type:

Tuple[FunctionalData, float]

abstract smooth(points=None, method='PS', bandwidth=None, penalty=None, **kwargs)[source]#

Smooth the data.

Parameters:
Return type:

Type[FunctionalData]

abstract standardize(center=True, **kwargs)[source]#

Standardize the data.

Parameters:

center (bool)

Return type:

FunctionalData

abstract to_basis(points=None, method='PS', **kwargs)[source]#

Convert the data to basis format.

Parameters:
Return type:

BasisFunctionalData

abstract to_long(reindex=False)[source]#

Convert the data to long format.

Parameters:

reindex (bool)

Return type:

DataFrame

Examples using FDApy.representation.GridFunctionalData#

Representation of univariate and dense functional data

Representation of univariate and dense functional data

Representation of univariate and irregular functional data

Representation of univariate and irregular functional data

Representation of functional data using a basis

Representation of functional data using a basis

Representation of multivariate functional data

Representation of multivariate functional data

One-dimensional Basis

One-dimensional Basis

Two-dimensional Basis

Two-dimensional Basis