Functional data analysis

From testwiki
Jump to navigation Jump to search

Template:Short description Functional data analysis (FDA) is a branch of statistics that analyses data providing information about curves, surfaces or anything else varying over a continuum. In its most general form, under an FDA framework, each sample element of functional data is considered to be a random function. The physical continuum over which these functions are defined is often time, but may also be spatial location, wavelength, probability, etc. Intrinsically, functional data are infinite dimensional. The high intrinsic dimensionality of these data brings challenges for theory as well as computation, where these challenges vary with how the functional data were sampled. However, the high or infinite dimensional structure of the data is a rich source of information and there are many interesting challenges for research and data analysis.

History

Functional data analysis has roots going back to work by Grenander and Karhunen in the 1940s and 1950s.[1][2][3][4] They considered the decomposition of square-integrable continuous time stochastic process into eigencomponents, now known as the Karhunen-Loève decomposition. A rigorous analysis of functional principal components analysis was done in the 1970s by Kleffe, Dauxois and Pousse including results about the asymptotic distribution of the eigenvalues.[5][6] More recently in the 1990s and 2000s the field has focused more on applications and understanding the effects of dense and sparse observations schemes. The term "Functional Data Analysis" was coined by James O. Ramsay.[7]

Mathematical formalism

Random functions can be viewed as random elements taking values in a Hilbert space, or as a stochastic process. The former is mathematically convenient, whereas the latter is somewhat more suitable from an applied perspective. These two approaches coincide if the random functions are continuous and a condition called mean-squared continuity is satisfied.[8]

Hilbertian random variables

In the Hilbert space viewpoint, one considers an H-valued random element X, where H is a separable Hilbert space such as the space of square-integrable functions L2[0,1]. Under the integrability condition that 𝔼XL22=𝔼(01|X(t)|2dt)<, one can define the mean of X as the unique element μH satisfying

𝔼X,h=μ,h,hH.

This formulation is the Pettis integral but the mean can also be defined as Bochner integral μ=𝔼X. Under the integrability condition that 𝔼XL22 is finite, the covariance operator of X is a linear operator 𝒞:HH that is uniquely defined by the relation

𝒞h=𝔼[h,Xμ(Xμ)],hH,

or, in tensor form, 𝒞=𝔼[(Xμ)(Xμ)]. The spectral theorem allows to decompose X as the Karhunen-Loève decomposition

X=μ+i=1X,φiφi,

where φi are eigenvectors of 𝒞, corresponding to the nonnegative eigenvalues of 𝒞, in a non-increasing order. Truncating this infinite series to a finite order underpins functional principal component analysis.

Stochastic processes

The Hilbertian point of view is mathematically convenient, but abstract; the above considerations do not necessarily even view X as a function at all, since common choices of H like L2[0,1] and Sobolev spaces consist of equivalence classes, not functions. The stochastic process perspective views X as a collection of random variables

{X(t)}t[0,1]

indexed by the unit interval (or more generally interval 𝒯). The mean and covariance functions are defined in a pointwise manner as

μ(t)=𝔼X(t),Σ(s,t)=Cov(X(s),X(t)),s,t[0,1]

(if 𝔼[X(t)2]< for all t[0,1]).

Under the mean square continuity, μ and Σ are continuous functions and then the covariance function Σ defines a covariance operator 𝒞:HH given by Template:NumBlkThe spectral theorem applies to 𝒞, yielding eigenpairs (λj,φj), so that in tensor product notation 𝒞 writes

𝒞=j=1λjφjφj.

Moreover, since 𝒞f is continuous for all fH, all the φj are continuous. Mercer's theorem then states that

sups,t[0,1]|Σ(s,t)j=1Kλjφj(s)φj(t)|0,K.

Finally, under the extra assumption that X has continuous sample paths, namely that with probability one, the random function X:[0,1] is continuous, the Karhunen-Loève expansion above holds for X and the Hilbert space machinery can be subsequently applied. Continuity of sample paths can be shown using Kolmogorov continuity theorem.

Functional data designs

Functional data are considered as realizations of a stochastic process X(t), t[0,1] that is an L2 process on a bounded and closed interval [0,1] with mean function μ(t)=𝔼(X(t)) and covariance function Σ(s,t)=Cov(X(s),X(t)). The realizations of the process for the i-th subject is Xi(), and the sample is assumed to consist of n independent subjects. The sampling schedule may vary across subjects, denoted as Ti1,...,TiNi for the i-th subject. The corresponding i-th observation is denoted as Xi=(Xi1,...,XiNi), where Xij=Xi(Tij). In addition, the measurement of Xij is assumed to have random noise ϵij with 𝔼(ϵij)=0 and Var(ϵij)=σij2, which are independent across i and j.

1. Fully observed functions without noise at arbitrarily dense grid

Measurements Yit=Xi(t) available for all t,i=1,,n

Often unrealistic but mathematically convenient.

Real life example: Tecator spectral data.[7]

2. Densely sampled functions with noisy measurements (dense design)

Measurements Yij=Xi(Tij)+εij, where Tij are recorded on a regular grid,

Ti1,,TiNi, and Ni applies to typical functional data.

Real life example: Berkeley Growth Study Data and Stock data

3. Sparsely sampled functions with noisy measurements (longitudinal data)

Measurements Yij=Xi(Tij)+εij, where Tij are random times and their number Ni per subject is random and finite.

Real life example: CD4 count data for AIDS patients.[9]

Functional principal component analysis

Functional principal component analysis (FPCA) is the most prevalent tool in FDA, partly because FPCA facilitates dimension reduction of the inherently infinite-dimensional functional data to finite-dimensional random vector of scores. More specifically, dimension reduction is achieved by expanding the underlying observed random trajectories Xi(t) in a functional basis consisting of the eigenfunctions of the covariance operator on X. Consider the covariance operator 𝒞:L2[0,1]L2[0,1] as in (Template:EquationNote), which is a compact operator on Hilbert space.

By Mercer's theorem, the kernel function of 𝒞, i.e., the covariance function Σ(,), has spectral decomposition Σ(s,t)=k=1λkφk(s)φk(t), where the series convergence is absolute and uniform, and λk are real-valued nonnegative eigenvalues in descending order with the corresponding orthonormal eigenfunctions φk(t) . By the Karhunen–Loève theorem, the FPCA expansion of an underlying random trajectory is Xi(t)=μ(t)+k=1Aikφk(t), where Aik=01(Xi(t)μ(t))φk(t)dt are the functional principal components (FPCs), sometimes referred to as scores. The Karhunen–Loève expansion facilitates dimension reduction in the sense that the partial sum converges uniformly, i.e., supt[0,1]𝔼[Xi(t)μ(t)k=1KAikφk(t)]20 as K and thus the partial sum with a large enough K yields a good approximation to the infinite sum. Thereby, the information in Xi is reduced from infinite dimensional to a K-dimensional vector Ai=(Ai1,...,AiK) with the approximated process: Template:NumBlkOther popular bases include spline, Fourier series and wavelet bases. Important applications of FPCA include the modes of variation and functional principal component regression.

Functional linear regression models

Functional linear models can be viewed as an extension of the traditional multivariate linear models that associates vector responses with vector covariates. The traditional linear model with scalar response Y and vector covariate Xp can be expressed asTemplate:NumBlkwhere , denotes the inner product in Euclidean space, β0 and βp denote the regression coefficients, and ε is a zero mean finite variance random error (noise). Functional linear models can be divided into two types based on the responses.

Functional regression models with scalar response

Replacing the vector covariate X and the coefficient vector β in model (Template:EquationNote) by a centered functional covariate Xc(t)=X(t)μ(t) and coefficient function β=β(t) for t[0,1] and replacing the inner product in Euclidean space by that in Hilbert space L2, one arrives at the functional linear modelTemplate:NumBlkThe simple functional linear model (Template:EquationNote) can be extended to multiple functional covariates, {Xj}j=1p, also including additional vector covariates Z=(Z1,,Zq), where Z1=1, byTemplate:NumBlkwhere θ𝕢 is regression coefficient for Z, the domain of Xj is [0,1], Xjc is the centered functional covariate given by Xjc(t)=Xj(t)μj(t), and βj is regression coefficient function for Xjc, for j=1,,p. Models (Template:EquationNote) and (Template:EquationNote) have been studied extensively.[10][11][12]

Functional regression models with functional response

Consider a functional response Y(s) on [0,1] and multiple functional covariates Xj(t), t[0,1], j=1,,p. Two major models have been considered in this setup.[13][7] One of these two models, generally referred to as functional linear model (FLM), can be written as:Template:NumBlkwhere α0(s) is the functional intercept, for j=1,,p , Xjc(t)=Xj(t)μj(t) is a centered functional covariate on [0,1], αj(s,t) is the corresponding functional slopes with same domain, respectively, and ε(s) is usually a random process with mean zero and finite variance.[13] In this case, at any given time s[0,1], the value of Y, i.e., Y(s), depends on the entire trajectories of {Xj(t)}j=1p. Model (Template:EquationNote) has been studied extensively.[14][15][16][17][18]

Function-on-scalar regression

In particular, taking Xj() as a constant function yields a special case of model (Template:EquationNote)Y(s)=α0(s)+j=1pXjαj(s)+ε(s), for s[0,1],which is a functional linear model with functional responses and scalar covariates.

Concurrent regression models

This model is given by,Template:NumBlkwhere X1,,Xp are functional covariates on [0,1], β0,β1,,βp are the coefficient functions defined on the same interval and ε(s) is usually assumed to be a random process with mean zero and finite variance.[13] This model assumes that the value of Y(s) depends on the current value of {Xj(s)}j=1p only and not the history {Xj(t):ts}j=1p or future value. Hence, it is a "concurrent regression model", which is also referred as "varying-coefficient" model. Further, various estimation methods have been proposed.[19][20][21][22][23][24]

Functional nonlinear regression models

Direct nonlinear extensions of the classical functional linear regression models (FLMs) still involve a linear predictor, but combine it with a nonlinear link function, analogous to the idea of generalized linear model from the conventional linear model. Developments towards fully nonparametric regression models for functional data encounter problems such as curse of dimensionality. In order to bypass the "curse" and the metric selection problem, we are motivated to consider nonlinear functional regression models, which are subject to some structural constraints but do not overly infringe flexibility. One desires models that retain polynomial rates of convergence, while being more flexible than, say, functional linear models. Such models are particularly useful when diagnostics for the functional linear model indicate lack of fit, which is often encountered in real life situations. In particular, functional polynomial models, functional single and multiple index models and functional additive models are three special cases of functional nonlinear regression models.

Functional polynomial regression models

Functional polynomial regression models may be viewed as a natural extension of the Functional Linear Models (FLMs) with scalar responses, analogous to extending linear regression model to polynomial regression model. For a scalar response Y and a functional covariate X() with domain [0,1] and the corresponding centered predictor processes Xc, the simplest and the most prominent member in the family of functional polynomial regression models is the quadratic functional regression[25] given as follows,𝔼(Y|X)=α+01β(t)Xc(t)dt+0101γ(s,t)Xc(s)Xc(t)dsdtwhere Xc()=X()𝔼(X()) is the centered functional covariate, α is a scalar coefficient, β() and γ(,) are coefficient functions with domains [0,1] and [0,1]×[0,1], respectively. In addition to the parameter function β that the above functional quadratic regression model shares with the FLM, it also features a parameter surface γ. By analogy to FLMs with scalar responses, estimation of functional polynomial models can be obtained through expanding both the centered covariate Xc and the coefficient functions β and γ in an orthonormal basis.[25][26]

Functional single and multiple index models

A functional multiple index model is given as below, with symbols having their usual meanings as formerly described,𝔼(Y|X)=g(01Xc(t)β1(t)dt,,01Xc(t)βp(t)dt)Here g represents an (unknown) general smooth function defined on a p-dimensional domain. The case p=1 yields a functional single index model while multiple index models correspond to the case p>1. However, for p>1, this model is problematic due to curse of dimensionality. With p>1 and relatively small sample sizes, the estimator given by this model often has large variance.[27][28]

Functional additive models (FAMs)

For a given orthonormal basis {ϕk}k=1 on L2[0,1], we can expand Xc(t)=k=1xkϕk(t) on the domain [0,1].

A functional linear model with scalar responses (see (Template:EquationNote)) can thus be written as follows,𝔼(Y|X)=𝔼(Y)+k=1βkxk.One form of FAMs is obtained by replacing the linear function of xk in the above expression ( i.e., βkxk) by a general smooth function fk, analogous to the extension of multiple linear regression models to additive models and is expressed as,𝔼(Y|X)=𝔼(Y)+k=1fk(xk),where fk satisfies 𝔼(fk(xk))=0 for k.[13][7] This constraint on the general smooth functions fk ensures identifiability in the sense that the estimates of these additive component functions do not interfere with that of the intercept term 𝔼(Y). Another form of FAM is the continuously additive model,[29] expressed as,𝔼(Y|X)=𝔼(Y)+01g(t,X(t))dtfor a bivariate smooth additive surface g:[0,1]× which is required to satisfy 𝔼[g(t,X(t))]=0 for all t[0,1], in order to ensure identifiability.

Generalized functional linear model

An obvious and direct extension of FLMs with scalar responses (see (Template:EquationNote)) is to add a link function leading to a generalized functional linear model (GFLM)[30] in analogy to the generalized linear model (GLM). The three components of the GFLM are:

  1. Linear predictor η=β0+01Xc(t)β(t)dt; [systematic component]
  2. Variance function Var(Y|X)=V(μ), where μ=𝔼(Y|X) is the conditional mean; [random component]
  3. Link function g connecting the conditional mean μ and the linear predictor η through μ=g(η). [systematic component]

Clustering and classification of functional data

For vector-valued multivariate data, k-means partitioning methods and hierarchical clustering are two main approaches. These classical clustering concepts for vector-valued multivariate data have been extended to functional data. For clustering of functional data, k-means clustering methods are more popular than hierarchical clustering methods. For k-means clustering on functional data, mean functions are usually regarded as the cluster centers. Covariance structures have also been taken into consideration.[31] Besides k-means type clustering, functional clustering[32] based on mixture models is also widely used in clustering vector-valued multivariate data and has been extended to functional data clustering.[33][34][35][36][37] Furthermore, Bayesian hierarchical clustering also plays an important role in the development of model-based functional clustering.[38][39][40][41]

Functional classification assigns a group membership to a new data object either based on functional regression or functional discriminant analysis. Functional data classification methods based on functional regression models use class levels as responses and the observed functional data and other covariates as predictors. For regression based functional classification models, functional generalized linear models or more specifically, functional binary regression, such as functional logistic regression for binary responses, are commonly used classification approaches. More generally, the generalized functional linear regression model based on the FPCA approach is used.[42] Functional Linear Discriminant Analysis (FLDA) has also been considered as a classification method for functional data.[43][44][45][46][47] Functional data classification involving density ratios has also been proposed.[48] A study of the asymptotic behavior of the proposed classifiers in the large sample limit shows that under certain conditions the misclassification rate converges to zero, a phenomenon that has been referred to as "perfect classification".[49]

Time warping

Motivations

Illustration of the motivation of time warping in the sense of capturing cross-sectional mean.
Structures in cross-sectional mean destroyed if time variation is ignored. On the contrary, structures in cross-sectional mean is well-captured after restoring time variation.

In addition to amplitude variation,[50] time variation may also be assumed to present in functional data. Time variation occurs when the subject-specific timing of certain events of interest varies among subjects. One classical example is the Berkeley Growth Study Data,[51] where the amplitude variation is the growth rate and the time variation explains the difference in children's biological age at which the pubertal and the pre-pubertal growth spurt occurred. In the presence of time variation, the cross-sectional mean function may not be an efficient estimate as peaks and troughs are located randomly and thus meaningful signals may be distorted or hidden.

Time warping, also known as curve registration,[52] curve alignment or time synchronization, aims to identify and separate amplitude variation and time variation. If both time and amplitude variation are present, then the observed functional data Yi can be modeled as Yi(t)=Xi[hi1(t)],t[0,1], where XiiidX is a latent amplitude function and hiiidh is a latent time warping function that corresponds to a cumulative distribution function. The time warping functions h are assumed to be invertible and to satisfy 𝔼(h1(t))=t.

The simplest case of a family of warping functions to specify phase variation is linear transformation, that is h(t)=δ+γt, which warps the time of an underlying template function by subjected-specific shift and scale. More general class of warping functions includes diffeomorphisms of the domain to itself, that is, loosely speaking, a class of invertible functions that maps the compact domain to itself such that both the function and its inverse are smooth. The set of linear transformation is contained in the set of diffeomorphisms.[53] One challenge in time warping is identifiability of amplitude and phase variation. Specific assumptions are required to break this non-identifiability.

Methods

Earlier approaches include dynamic time warping (DTW) used for applications such as speech recognition.[54] Another traditional method for time warping is landmark registration,[55][56] which aligns special features such as peak locations to an average location. Other relevant warping methods include pairwise warping,[57] registration using 2 distance[53] and elastic warping.[58]

Dynamic time warping

The template function is determined through an iteration process, starting from cross-sectional mean, performing registration and recalculating the cross-sectional mean for the warped curves, expecting convergence after a few iterations. DTW minimizes a cost function through dynamic programming. Problems of non-smooth differentiable warps or greedy computation in DTW can be resolved by adding a regularization term to the cost function.

Landmark registration

Landmark registration (or feature alignment) assumes well-expressed features are present in all sample curves and uses the location of such features as a gold-standard. Special features such as peak or trough locations in functions or derivatives are aligned to their average locations on the template function.[53] Then the warping function is introduced through a smooth transformation from the average location to the subject-specific locations. A problem of landmark registration is that the features may be missing or hard to identify due to the noise in the data.

Extensions

So far we considered scalar valued stochastic process, {X(t)}t𝒯, defined on one dimensional time domain.

Multidimensional domain of X()

The domain of X() can be in Rp, for example the data could be a sample of random surfaces.[59][60]

Multivariate stochastic process

The range set of the stochastic process may be extended from R to Rp[61][62][63] and further to nonlinear manifolds,[64] Hilbert spaces[65] and eventually to metric spaces.[59]

Python packages

There are Python packages to work with functional data, and its representation, perform exploratory analysis, or preprocessing, and among other tasks such as inference, classification, regression or clustering of functional data.

R packages

Some packages can handle functional data under both dense and longitudinal designs.

See also

Further reading

Category:Regression analysis

References

Template:Reflist

  1. Template:Cite journal
  2. Template:Cite journal
  3. Template:Cite journal
  4. Template:Cite book
  5. Template:Cite journal
  6. Template:Cite journal
  7. 7.0 7.1 7.2 7.3 7.4 Template:Cite book
  8. Template:Cite book
  9. Template:Cite journal
  10. Template:Cite journal
  11. Template:Cite journal
  12. Template:Cite book
  13. 13.0 13.1 13.2 13.3 Template:Cite journal
  14. Template:Cite journal
  15. Template:Cite journal
  16. Template:Cite journal
  17. 17.0 17.1 Template:Cite journal
  18. Template:Cite journal
  19. Template:Cite journal
  20. Template:Cite journal
  21. Template:Cite journal
  22. Template:Cite journal
  23. Template:Cite journal
  24. Template:Cite journal
  25. 25.0 25.1 Yao, F; Müller, HG. (2010). "Functional quadratic regression". Biometrika. 97 (1):49–64.
  26. Template:Cite journal
  27. Chen, D; Hall, P; Müller HG. (2011). "Single and multiple index functional regression models with nonparametric link". The Annals of Statistics. 39 (3):1720–1747.
  28. Jiang, CR; Wang JL. (2011). "Functional single index models for longitudinal data". he Annals of Statistics. 39 (1):362–388.
  29. Template:Cite journal
  30. Template:Cite journal
  31. Template:Cite journal
  32. Template:Cite journal
  33. Template:Cite journal
  34. Template:Cite journal
  35. Template:Cite journal
  36. Template:Cite journal
  37. Template:Cite journal
  38. Template:Cite journal
  39. Template:Cite journal
  40. Template:Cite journal
  41. Template:Cite journal
  42. Template:Cite journal
  43. Template:Cite journal
  44. Template:Cite journal
  45. Template:Cite journal
  46. Template:Cite journal
  47. Template:Cite journal
  48. Template:Cite journal
  49. Template:Cite journal
  50. Template:Cite journal
  51. Template:Cite journal
  52. Template:Cite journal
  53. 53.0 53.1 53.2 Template:Cite journal
  54. Template:Cite journal
  55. Template:Cite journal
  56. Template:Cite journal
  57. Template:Cite journal
  58. 58.0 58.1 Template:Cite journal
  59. 59.0 59.1 Template:Cite journal
  60. Template:Cite journal
  61. Template:Cite journal
  62. Template:Cite journal
  63. Template:Cite journal
  64. Template:Cite journal
  65. Template:Cite journal