User:Iaosui/sandbox

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\in\mathbb{R}$$ and vector covariate $$X\in\mathbb{R}^p$$ can be expressed as

where $$\langle\cdot,\cdot\rangle$$ denotes the inner product in Euclidean space, $$\beta_0\in\mathbb{R}$$ and $$\beta\in\mathbb{R}^p$$ denote the regression coefficients, and $$\varepsilon$$ 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 $$\beta$$ in model ($$) by a centered functional covariate $$X^c(t) = X(t) - \mu(t)$$ and coefficient function $$\beta = \beta(t)$$ for $$t \in \mathcal{I} = [0,T]$$ and replacing the inner product in Euclidean space by that in Hilbert space $L^2$, one arrives at the functional linear model One ad hoc approach to estimating $$\beta_0$$ and $$\beta(t)$$ is to expand the covariate $$X^c$$ and the coefficient function $$\beta$$ in the same functional basis, such as the B-spline basis or the eigenbasis in (FPCA formula). Specially, consider an orthonormal basis, $$\{\phi_k\}_{k=1}^\infty$$, of the function space. Then expanding $$X^c$$ and $$\beta$$ in this basis leads to $$X^c(t) = \sum_{k=1}^\infty A_k\phi_k(t)$$, $$\beta(t) = \sum_{k=1}^\infty \beta_k \phi_k(t)$$ and model ($$) is seen to be equivalent to the traditional linear model ($$) of the formwhere in implementations the sum on r.h.s. is replaced by a finite sum that is truncated at the first K terms. In addition to the basis-expansion approach, a penalized approach using either P-splines or smoothing splines has also been studied can be applied. In special case where the basis functions $$\phi_k$$ are selected as the eigenfunctions $$\varphi_k$$ of $$X$$ (refers to ($$)), the basis representation approach in ($$) is equivalent to conducting a principal component regression, albeit with an increasing number of principal components.

The simple functional linear model ($$) can be extended to multiple functional covariates, $$\{X_j\}_{j=1}^p$$, also including additional vector covariates $$Z = (Z_1, \cdots,Z_q)$$, where $$Z_1=1$$, by

where $$\theta\in \mathbb{R^q}$$ is regression coefficient for $$Z$$, $$\mathcal{I_j}$$ is the interval where $$X_j$$ is defined, $$X^c_j$$ is the centered functional covariate given by $$X_j^c(t) = X_j(t) - \mu_j(t)$$, and $$\beta_j$$ is regression coefficient function for $$X_j^c $$, for $$j=1,\ldots,p$$. Model ($$) and ($$) have been studied extensively.

Functional regression models with functional response
For a functional response $$Y(s)$$ on $$\mathcal{I}_Y$$ and multiple functional covariates $$X_j(t)$$, $$t\in \mathcal{I}_{X_j}$$, two major models have been considered. One of these two models is generally referred to as functional linear model (FLM) which can be written as: where $$\alpha_0(s)$$ is the functional intercept, for $$j=1,\ldots,p$$, $$X_j^c(t)=X_j(t) - \mu_j(t)$$ is a centered functional covariate on $$\mathcal{I}_{X_j}$$, $$\alpha_j(s,t)$$ is the corresponding functional slopes with same domain, respectively, and $$\varepsilon(s)$$ is usually a random process with mean zero and finite variance. In this case, at any given time $$s\in\mathcal{I}_{Y}$$, the value of $$Y$$, i.e., $$Y(s)$$, depends on the entire trajectories of $$\{X_j(t)\}^p_{j=1}$$. In particular, taking $$X_j(\cdot)$$ as a constant function yields a special case of model ($$)$$Y(s) = \alpha_0(s)+\sum_{j=1}^p X_j \alpha_j(s) + \varepsilon(s),\ \text{for}\ s\in\mathcal{I}_Y,$$which is a functional linear model with functional responses and scalar covariates. Model ($$) are also studied extensively.

Concurrent regression model
The second model assumes that $$\mathcal{I}_Y=\mathcal{I}_{X_1}=\ldots=\mathcal{I}_{X_p}=\mathcal{I}$$ and is most often referred to as "varying-coefficient" model. It can be written aswhere $$X_1,\ldots,X_p$$ are multiple functional covariates on $$\mathcal{I}$$, $$\beta_0,\beta_1,\ldots,\beta_p$$ are the coefficient functions defined on the same interval and $$\varepsilon(s)$$ is usually assumed to be a random process with mean zero and finite variance. This model assumes that the value of $$Y(s)$$ depends on the current value of $$\{X_j(s)\}^p_{j=1}$$ only and not the history $$\{X_j(t):t\le s\}^p_{j=1}$$ or future value, hence it is a "concurrent regression model". Various estimation methods can be applied to model ($$).

Clustering of functional data
For vector-valued multivariate data, hierarchical clustering and the k-means partitioning methods are two classical and popular approaches. Classical clustering concepts for vector-valued multivariate data can typically be extended to functional data, where various considerations arise, such as discrete approximations of distance measures, and dimension reduction of the infinite-dimensional functional data objects. Generally, k-means type clustering algorithms have been widely applied to functional data, and more popular than hierarchical clustering algorithms.

Mean functions as cluster centers
It is natural to view cluster mean functions as the clusters in functional clustering. Specifically, for a sample of functional data $$\{X_i(t) ;i=1,\ldots,n\}$$, the k-means functional clustering aims to find a set of cluster centers $$\{\mu^c;c=1,\ldots,L\}$$, assuming there are $$L$$ clusters, by minimizing the sum of the squared distances between $$\{X_i\}$$ and the cluster centers that are associated with their cluster labels $$\{C_i ;i=1,\ldots,n)\}$$, for a suitable functional distance $$d$$. The distance $$d$$ is often chosen as the $$L^2$$ norm. The traditional k-means clustering for vector-valued multivariate data has been extended to functional data using mean functions as cluster centers, and one can distinguish two typical approaches, as follows.

Functional clustering via functional basis expansion
Given a set of pre-specified basis functions $$\{\phi_1,\phi_2,\ldots\}$$ of the function space, the first $$K$$ projections $$\{B_{ik}\}$$ of the observed trajectories onto the space spanned by the set of basis functions can be used to represent the functional data, where $$B_{ik}=\langle X_i^c,\phi_k\rangle$$, $$k = 1,\ldots,K$$. The distributional patterns of $$\{B_{ik}\}$$ then reflect the clusters in function space. Then applying available clustering algorithms for multivariate data, such as the k-means algorithm, to partition the estimated sets of coefficients. Finally, one can obtain cluster centers $$\{\bar{B}^c_{k}\}^K_{k=1}$$ on the projected space, and thus the set of cluster centers in the function space $$\{\hat\mu^c;c=1,\ldots,L\}$$, where $$\hat\mu^c(t)=\sum^K_{k=1}\bar{B}^c_k\phi_k(t)$$. For good performance, this method requires a judicious choice of the basis function and researches corresponding to different choice of basis function are studied a lot, such as B-spline basis, Fourier basis , P splines basis , Gaussian orthonormalized basis and wavelet basis functions.

Functional clustering via FPCA
In contrast to the functional basis expansion approach that requires a pre-specified set of basis functions, the finite approximation FPCA approach ($$) using the FPCs employs data-adaptive basis functions that are determined by the covariance function of the functional data. Then the FPC scores $$\{A_{ik}\}$$ play a similar role as the basis coefficients $$\{B_{ik}\}$$ for clustering.

When the mean functions as the cluster centers are sufficient to define the clusters, this step is sufficient. However, when covariance structures also play a role to distinguish clusters, taking mean functions as cluster is not adequate, as will be discussed as followed.

Subspaces as cluster centers
Since functional data are realizations of random functions, it is natural to use differences in the stochastic structure of random functions for clustering. This idea is particularly sensible in functional data clustering, utilizing the truncated Karhunen&#x2013;Loève representation in ($$). Then the subspace spanned by the components of the expansion, the mean function and the set of the eigenfunctions, can be used to characterize clusters. Therefore, clusters of the data set are identified via subspace projection such that cluster centers hinge on the stochastic structure of the random functions, rather than the mean functions only.

The FPC subspace-projected k-centers functional clustering approach uses subspaces as cluster centers. Let $$C$$ be the cluster membership variable, and the FPC subspace $$\mathcal{S}^c=\{\mu^c,\varphi^c_1,\ldots,\varphi^c_{K_c}\}$$, $$c=1,\ldots,L$$, assuming that there are $$L$$ clusters. The projected function of $$X_i$$ onto the FPC subspace $$\mathcal{S}^c$$ can be written asOne aims to find the set of cluster centers $$\{\mathcal{S}^c;c=1,\ldots,L\}$$, such that the best cluster membership of $$X_i$$, $$c^*(X_i)$$, is determined by minimizing the discrepancy between the projected function $$\tilde X_i^c$$ and the observation $$X_i$$,In contrast, k-means clustering aims to find the set of cluster sample means as the cluster centers, instead of the subspaces spanned by $$\mathcal{S}^c=\{\mu^c,\varphi^c_1,\ldots,\varphi^c_{K_c}\}$$. The initial step of the subspace-projected clustering procedure uses only $$\mu^c$$, which reduces to the k-means functional clustering. In the subsequent iteration steps, the mean function and the set of eigenfunction for each cluster is updated and used to identify the set of cluster subspaces $$\{\mathcal{S}^c\}$$, until iterations converge. This functional clustering approach simultaneously identifies the structural components of the stochastic representation for each cluster.

Functional clustering with mixture models
Model-based clustering based on mixture models is widely used in clustering vector-valued multivariate data and has been extended to functional data clustering. In this approach, similarly to the k-means type of functional data clustering, typical mixture model-based approaches to functional data clustering in a first step project the infinite dimensional functional data onto low-dimensional subspaces. For example, we can apply functional clustering models based on Gaussian mixture  distributions to the natural cubic spline basis coefficients, with emphasis on clustering sparsely sampled functional data. Furthermore, random effects modeling also provides a model-based clustering approach, using mixed effects models with B-splines or P-splines. For clustering longitudinal data, a linear mixed model for clustering using a penalized normal mixture as random effects distribution has been studied. Bayesian hierarchical clustering also plays an important role in the development of model-based functional clustering.

Clustering of functional data
For vector-valued multivariate data, k-means partitioning methods and hierarchical clustering are two main approaches. Classical clustering concepts for vector-valued multivariate data can typically be extended to functional data, where various considerations arise, such as discrete approximations of distance measures, and dimension reduction of the infinite-dimensional functional data objects. Generally, k-means type clustering algorithms have been widely applied to functional data, and more popular than hierarchical clustering algorithms. For k-means clustering, mean functions are usually viewed as the cluster centers. Specifically, for a sample of functional data $$\{X_i(t) ;i=1,\ldots,n\}$$, the k-means functional clustering aims to find a set of cluster centers $$\{\mu^c;c=1,\ldots,L\}$$, assuming there are $$L$$ clusters, by minimizing the sum of the squared distances between $$\{X_i(t) \}$$ and the cluster centers that are associated with their cluster labels $$\{C_i ;i=1,\ldots,n)\}$$, for a suitable functional distance $$d$$. Typically, functional basis expansion  or FPCA is used for dimension reduction. However, when covariance structures also play a role to distinguish clusters, taking mean functions as center is not adequate and FPC subspace-projected k-centers functional clustering approach, who uses subspaces as cluster centers, is taken into consideration. Specifically, the Let $$C$$ be the cluster membership variable, and the FPC subspace $$\mathcal{S}^c=\{\mu^c,\varphi^c_1,\ldots,\varphi^c_{K_c}\}$$, $$c=1,\ldots,L$$, assuming that there are $$L$$ clusters. The projected function of $$X_i$$ onto the FPC subspace $$\mathcal{S}^c$$ can be written as $$\tilde X_i^c(t)=\mu^c (t)+\sum^{K_c}_{k=1}A_{ik}^c\varphi^c_k(t).$$ One aims to find the set of cluster centers $$\{\mathcal{S}^c;c=1,\ldots,L\}$$, such that the best cluster membership of $$X_i$$, $$c^*(X_i)$$, is determined by minimizing the discrepancy between the projected function $$\tilde X_i^c$$ and the observation $$X_i$$. The initial step of the subspace-projected clustering procedure uses only $$\mu^c$$, which reduces to the k-means functional clustering. In the subsequent iteration steps, the mean function and the set of eigenfunction for each cluster is updated and used to identify the set of cluster subspaces $$\{\mathcal{S}^c\}$$, until iterations converge. This functional clustering approach simultaneously identifies the structural components of the stochastic representation for each cluster. Furthermore, model-based clustering based on mixture models is widely used in clustering vector-valued multivariate data and has been extended to functional data clustering. In this approach, similarly to the k-means type of functional data clustering, typical mixture model-based approaches to functional data clustering in a first step project the infinite dimensional functional data onto low-dimensional subspaces. For example, we can apply functional clustering models based on Gaussian mixture  distributions to the natural cubic spline basis coefficients, with emphasis on clustering sparsely sampled functional data. Furthermore, random effects modeling also provides a model-based clustering approach, using mixed effects models with B-splines or P-splines. For clustering longitudinal data, a linear mixed model for clustering using a penalized normal mixture as random effects distribution has been studied. Bayesian hierarchical clustering also plays an important role in the development of model-based functional clustering.

Most recent developments in FDA

 * Functional designs
 * Domain selection problems
 * Dependent functional data, such as functional time series
 * Multivariate functional data
 * Spatially indexed functional data
 * “Second Generation” functional data

Applications

 * Continuous tracking and monitoring of movement and health data
 * Traffic flow data continuously recorded over time by arrays of sensors
 * Continuously recorded climate and weather data
 * Transcription factor count modeling along the genome
 * Analysis of auction data
 * Volatility data

Functional data analysis (FDA) is a branch of statistics that analyzes 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 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. 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. More recently in the 1990s and 2000s the field has focused more on application and understanding the effects of dense and sparse observations schemes. The term "Functional Data Analysis" was coined by James O. Ramsay.

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.

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 $$L^2[0,1]$$. Under the integrability condition that $$\mathbb E\|X\|_{L^2}^2 = \mathbb{E} (\int^1_0 |X(t)|^2 dt) < \infty$$, one can define the mean of $$X$$ as the unique element $$\mu\in H$$ satisfying

\mathbb E\langle X, h \rangle = \langle \mu,h\rangle ,\qquad h\in H. $$ This formulation is the Pettis integral but the mean can also be defined as $$\mu=\mathbb EX$$ the Bochner sense. Under the integrability condition that $$\mathbb E\|X\|^2_{L^2}$$ is finite, the covariance operator of $$X$$ is a linear operator $$\mathcal{C}:H\to H$$ that is uniquely defined by the relation

\mathcal{C} h = \mathbb E[\langle h,X-\mu\rangle (X-\mu)],\qquad h\in H, $$ or, in tensor form, $$\mathcal{C} = \mathbb E[(X-\mu)\otimes(X-\mu)]$$. The spectral theorem allows to decompose $$X$$ as the Karhunen-Loève decomposition

X=\mu+\sum_{i=1}^\infty \langle X,\varphi_i\rangle \varphi_i, $$ where $$\varphi_i$$ are eigenvectors of $$\mathcal S$$, corresponding to the nonnegative eigenvalues of $$\mathcal S$$, 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 $$L^2[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\in [0,1]} $$ indexed by the unit interval (or more generally some compact metric space $$K$$). The mean and covariance functions are defined in a pointwise manner as

\mu(t) = \mathbb EX(t),\qquad \Sigma(s,t) = \textrm{Cov}(X(s), X(t)),\qquad s,t\in [0, 1] $$ (if $$\mathbb E[X(t)^2]<\infty$$ for all $$t\in [0,1]$$). We can hope to view $$X$$ as a random element on the Hilbert function space $$H=L^2[0,1]$$. However, additional conditions are required for such a pursuit to be fruitful, since if we let $$X(t)$$ be Gaussian white noise, i.e. $$X(t)$$ is standard Gaussian and independent from $$X(s)$$ for any $$s, t \in [0, 1]$$, it is clear that we have no hope of viewing this as a square integrable function.

A convenient sufficient condition is mean square continuity, stipulating that $$\mu$$ and $$c$$ are continuous functions. In this case $$c$$ defines a covariance operator $$\mathcal{C}:H\to H$$ by

(\mathcal{C} f)(t) =\int_K \Sigma(s,t)f(s) \, \mathrm{d}s. $$ The spectral theorem applies to $$\mathcal{C}$$, yielding eigenpairs $$(\lambda_j,\varphi_j)$$, so that in tensor product notation $$\mathcal{C}$$ writes

\mathcal{C}=\sum_{j=1}^\infty \lambda_j \varphi_j\otimes\varphi_j. $$ Moreover, since $$\mathcal Sf$$ is continuous for all $$f\in H$$, all the $$\varphi_j$$'s are continuous. Mercer's theorem then states that the covariance function $$c$$ admits an analogous decomposition

\sup_{s,t\in [0,1]} \left|c(s,t) - \sum_{j=1}^K \lambda_j \varphi_j(s)\varphi_j(t)\right|\to0,\qquad K\to\infty. $$ Finally, under the extra assumption that $$X$$ has continuous sample paths, namely that with probability one, the random function $$X:[0,1]\to\mathbb R$$ 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\in[0,1]$$ that is an $$L^2$$ process on a bounded and closed interval $$[0,1]$$ with mean function $$\mu(t)=\mathbb{E}(X(t))$$ and covariance function $$\Sigma(s,t)=\textrm{Cov}(X(s),X(t))$$. The realizations of the process for the i-th subject is $$X_i(\cdot)$$, and the sample is assumed to consist of $$n$$ independent subjects. The sampling schedule may vary across subjects, denoted as $$T_{i1},..., T_{iN_i}$$ for the i-th subject. The corresponding i-th observation is denoted as $$\textbf{X}_i = (X_{i1},..., X_{iN_i}) $$, where $$X_{ij} = X_i(t_{ij})$$. In addition, the measurement of $$X_{ij} $$ is assumed to have random noise $$\epsilon_{ij}$$ with $$\mathbb{E}(\epsilon_{ij})=0$$ and $$\textrm{Var}(\epsilon_{ij})=\sigma^2_{ij}$$, which are independent across $$i$$ and $$j$$.

1. Fully observed functions without noise at arbitrarily dense grid
Measurements $$ Y_{it}=X_i(t) $$ available for all $$ t\in \mathcal{I},\, i=1,\ldots,n $$

Often unrealistic but mathematically convenient.

Real life example: Tecator spectral data.

2. Dense design with noisy measurements
Measurements $$ Y_{ij}=X_i(T_{ij}) + \varepsilon_{ij} $$, where $$ T_{ij} $$ are recorded on a regular grid,

$$ T_{i1},\ldots,T_{iN_i} $$, and $$ N_{i}\rarr\infty $$ applies to typical functional data.

Real life example: Berkeley Growth Study Data and Stock data

3. Sparse design with noisy measurements (longitudinal data)
Measurements $$ Y_{ij}=X_i(T_{ij}) + \varepsilon_{ij} $$, where $$ T_{ij} $$ are random times and their number $$ N_{i} $$ per subject is random and finite.

Real life example: CD4 count data for AIDS patients.

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 expansion the underlying observed random trajectories $$X_i(t)$$ in a functional basis that consists of the eigenfunctions of the (auto)-covariance operator on $$X$$. Consider the (auto)-covariance operator $$\mathcal{C}: L^2[0,1] \rightarrow L^2[0,1]$$, $$(\mathcal{C} X)(t)=\int_0^1\Sigma(s,t)X(s)ds$$, which is a compact operator on Hilbert space. By Mercer's theorem, the kernel of $$\mathcal{C}$$, i.e., the covariance function $$\Sigma (\cdot, \cdot)$$, has spectral decomposition $$\Sigma(s,t)=\sum^{\infty}_{k=1}\lambda_k\varphi_k(s)\varphi_k(t)$$, where the series convergence is absolute and uniform, and $$\lambda_k$$ are real-valued nonnegative eigenvalues in descending order with the corresponding orthonormal eigenfunctions $$\varphi_k(t)$$. By the Karhunen–Loève theorem, the FPCA expansion of an underlying random trajectory is $$X_i(t) =\mu(t)+\sum^{\infty}_{k=1} A_{ik}\varphi_k(t)$$, where $$A_{ik}=\int_0^1(X_i(t)-\mu(t))\varphi_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., $$\sup_{t\in[0,1]} \mathbb{E}[X_i(t)-\mu(t)-\sum^{K}_{k=1}A_{ik}\varphi_k(t)]^2 \rightarrow 0$$ as $$K \rightarrow \infty$$ and thus the partial sum with a large enough $$K$$ yields a good approximation to the infinite sum. Thereby, the information in $$X_i$$ is reduced from infinite dimensional to a $$K$$-dimensional vector $$A_i=(A_{i1},...,A_{iK})$$ with the approximated process： Other 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\in\mathbb{R}$$ and vector covariate $$X\in\mathbb{R}^p$$ can be expressed aswhere $$\langle\cdot,\cdot\rangle$$ denotes the inner product in Euclidean space, $$\beta_0\in\mathbb{R}$$ and $$\beta\in\mathbb{R}^p$$ denote the regression coefficients, and $$\varepsilon$$ 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 $$\beta$$ in model ($$) by a centered functional covariate $$X^c(t) = X(t) - \mu(t)$$ and coefficient function $$\beta = \beta(t)$$ for $$t \in [0,1]$$ and replacing the inner product in Euclidean space by that in Hilbert space $L^2$, one arrives at the functional linear modelThe simple functional linear model ($$) can be extended to multiple functional covariates, $$\{X_j\}_{j=1}^p$$, also including additional vector covariates $$Z = (Z_1, \cdots,Z_q)$$, where $$Z_1=1$$, bywhere $$\theta\in \mathbb{R^q}$$ is regression coefficient for $$Z$$, the domain of $$X_j$$ is $$[0,1]$$, $$X^c_j$$ is the centered functional covariate given by $$X_j^c(t) = X_j(t) - \mu_j(t)$$, and $$\beta_j$$ is regression coefficient function for $$X_j^c $$, for $$j=1,\ldots,p$$. Model ($$) and ($$) have been studied extensively.

Functional regression models with functional response
For a functional response $$Y(s)$$ on $$[0,1]$$ and multiple functional covariates $$X_j(t)$$, $$t\in [0,1]$$, two major models have been considered. One of these two models is generally referred to as functional linear model (FLM) which can be written as:where $$\alpha_0(s)$$ is the functional intercept, for $$j=1,\ldots,p$$, $$X_j^c(t)=X_j(t) - \mu_j(t)$$ is a centered functional covariate on $$[0,1]$$, $$\alpha_j(s,t)$$ is the corresponding functional slopes with same domain, respectively, and $$\varepsilon(s)$$ is usually a random process with mean zero and finite variance. In this case, at any given time $$s\in[0,1]$$, the value of $$Y$$, i.e., $$Y(s)$$, depends on the entire trajectories of $$\{X_j(t)\}^p_{j=1}$$. Model ($$) are also studied extensively.

Function-on-scalar regression
In particular, taking $$X_j(\cdot)$$ as a constant function yields a special case of model ($$)$$Y(s) = \alpha_0(s)+\sum_{j=1}^p X_j \alpha_j(s) + \varepsilon(s),\ \text{for}\ s\in[0,1],$$which is a functional linear model with functional responses and scalar covariates.

Concurrent regression models
This model is given by,where $$X_1,\ldots,X_p$$ are multiple functional covariates on $$[0,1]$$, $$\beta_0,\beta_1,\ldots,\beta_p$$ are the coefficient functions defined on the same interval and $$\varepsilon(s)$$ is usually assumed to be a random process with mean zero and finite variance. This model assumes that the value of $$Y(s)$$ depends on the current value of $$\{X_j(s)\}^p_{j=1}$$ only and not the history $$\{X_j(t):t\le s\}^p_{j=1}$$ or future value, hence it is a "concurrent regression model", which also has been referred to as "varying-coefficient" model. Various estimation methods have been proposed.

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(\cdot)$$ with domain $$[0,1]$$ and the corresponding centered predictor processes $$X^c$$, the simplest and the most prominent member in the family of functional polynomial regression models is the quadratic functional regression given as follows,$$\mathbb{E}(Y|X) = \alpha + \int_0^1\beta(t)X^c(t)\,dt + \int_0^1 \int_0^1 \gamma(s,t) X^c(s)X^c(t) \,ds\,dt $$where $$X^c(\cdot) = X(\cdot) - \mathbb{E}(X(\cdot))$$ is the centered functional covariate, $$\alpha$$ is a scalar coefficient, $$\beta(\cdot)$$ and $$\gamma(\cdot,\cdot)$$ are coefficient functions with domains $$[0,1]$$ and $$[0,1]\times[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 $$X^c$$ and the coefficient functions $$\beta$$ and $$\gamma$$ in an orthonormal basis.

Functional single and multiple index models
A functional multiple index model is given as below, with symbols having their usual meanings as formerly described,$$ \mathbb{E}(Y|X) = g\left(\int_0^1X^c(t) \beta_1(t)\,dt, \ldots, \int_0^1X^c(t) \beta_p(t)\,dt \right) $$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.

Functional additive models (FAMs)
Let $$X(t) = \sum_{k=1}^\infty x_k \phi_k(t)$$ denote an expansion of a functional covariate $$X$$ with domain $$[0,1]$$ in an orthonormal basis $$\{\phi_k\}_{k=1}^\infty$$.

A functional linear model with scalar responses [as shown in model ($$) of FLM] can be thus be written as follows,$$\mathbb{E}(Y|X)=\mathbb{E}(Y) + \sum_{k=1}^\infty \beta_k x_k.$$One form of FAMs is obtained by replacing the linear function of $$x_k$$ in the above expression ( i.e., $$\beta_k x_k$$) by a general smooth function $$f_k$$, analogous to the extension of multiple linear regression models to additive models and is expressed as,$$\mathbb{E}(Y|X)=\mathbb{E}(Y) + \sum_{k=1}^\infty f_k(x_k),$$where $$f_k$$ satisfies $$\mathbb{E}(f_k(x_k))=0$$ for $$k\in\mathbb{N}$$. This constraint on the general smooth functions $$f_k$$ ensures identifiability in the sense that the estimates of these additive component functions do not interfere with that of the intercept term $$\mathbb{E}(Y)$$.

Another form of FAM is the continuously additive model, expressed as,$$\mathbb{E}(Y|X) = \mathbb{E}(Y) + \left(\int_0^1 g(t,X(t)) dt\right)$$for a bivariate smooth (i.e. twice differentiable) additive surface g : $$[0,1]\times\mathbb{R} \longrightarrow \mathbb{R}$$ which is required to satisfy $$\mathbb{E}[g(t,X(t))]=0$$ for all t in $$[0,1]$$ in order to ensure identifiability.

Generalized functional linear model
An obvious and direct extension of FLMs with scalar responses [shown in model ($$)] is to add a link function so as to create a generalized functional linear model (GFLM) by analogy to extending linear model to generalized linear model (GLM), of which the three components are:


 * 1) Linear predictor $$\eta = \beta_0 + \int_0^1 X^c(t)\beta(t)\,dt$$;  [systematic component]
 * 2) Variance function $$\text{Var}(Y|X) = V(\mu)$$, where $$\mu = \mathbb{E}(Y|X)$$ is the conditional mean;  [random component]
 * 3) Link function $$g$$ connecting the conditional mean $$\mu$$ and the linear predictor $$\eta$$ through $$\mu=g(\eta)$$.  [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. Besides k-means type clustering, functional clustering based on mixture models is also widely used in clustering vector-valued multivariate data and has been extended to functional data clustering. Furthermore, Bayesian hierarchical clustering also plays an important role in the development of model-based functional clustering. 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 response, are commonly used classification approaches. More generally, the generalized functional linear regression model based on the FPCA approach is used. Functional Linear Discriminant Analysis (FLDA) has also been considered as a classification method for functional data. Functional data classification involving density ratios has also been proposed. 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".

Motivations


In addition to amplitude variation, 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 Berkeley Growth Study Data, 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, cross-sectional mean function may 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, curve alignment or time synchronization, aims to identify and separate amplitude variation and time variation. If assume both components exist, then the functional data are viewed as a result of an underlying template function "warped" non-linearly in time by a smooth random process, known as time warping function. Let $$Y_i$$ denote the observed functions with both phase and amplitude variability and $$X_i$$ to be the underlying functions where only the amplitude variation is present. The time warping function $$h_i$$ removes the time variation such that $$Y_i(t)=X_i[h_i^{-1}(t_j)], t\in [0,1]$$, where $$h_i$$ are the realizations of an underlying time warping function that transforms the subject-specific time to the time scale of the template. The time warping functions $$h_i$$ are assumed to be invertible and have average identity $$\mathbb{E}(h(t))=t$$. In most cases, the time is assumed to flow forward, so $$h_i$$ are assumed to be strictly monotonic increasing. One exception where the time can flow backward has been presented in the context of modeling the declines in house price as time reversals.

The simplest case of a family of warping functions to specify phase variation is linear transformation, that is $$h(t)=\delta+\gamma 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. One challenge in time warping is identifiability of amplitude and phase variation. To break the non-identifiability requires specific assumptions.

Methods
Earlier approaches include dynamic time warping (DTW) for applications such as speech recognition. Another traditional method for time warping is landmark registration, which aligns special features such as peak locations to an average location. Other relevant warping methods include pairwise warping, registration using $$\mathcal{L}^2$$ distance and elastic warping.

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 algorithm. 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 valley locations or derivatives on the observed sample functions are aligned to their average locations on the template function. 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\in \mathcal T} $$, defined on one dimensional time domain.

Extension 1: The dimension of time domain
The time domain of $$ X(t) $$ can be extended from one dimension to multiple dimensions.

Extension 2: The range of the stochastic process
The range set of the stochastic process may be extended from scalar values to vector values and further to nonlinear manifolds and then to Hilbert spaces and eventually to metric spaces.

R packages
While the presentation of the models above assumes fully-observed functions, software is available for fitting the models with discretely-observed functions in software such as R.


 * fda
 * refund
 * fdapace
 * FDboost
 * classiFunc
 * fda.usc
 * dtw
 * fdasrvf