본문 바로가기

Functional Data

[FDA] 7. FPCA (more detailed)

2024. 4. 5.

 

 

In the second posting, I provided the brief explanation for Functional Principal Component Analysis (FPCA).

 

In this posting, I will explain the FPCA in detail.

The goal of FPCA is to reduce the dimension while preserving the sufficient information. Thus we approximate infinite dimensional objects with finite dimensional ones.

 

FPCA

Suppose $X\in\mathcal{H}$ is a mean zero square integrable random function. Our goal is to find a set of orthonormal functions $\{u_1,\dots,u_p\}$ such that

$$S(u_1,\dots,u_p) = E \lVert X-\sum_{k=1}^p \langle X, u_k \rangle u_k \rVert ^2$$

as small as possible. And $\sum_{k=1}^0 \langle X, u_k \rangle u_k$is a projection of $X$ onto the subspace spanned by the $\{u_1, \dots, u_p\}$. The above equation can be rephrased by

 

$$E \lVert X-\sum_{k=1}^P \langle X, u_k \rangle u_k \rVert ^2 = E\lVert X \rVert ^2 - \sum_{k=1}^p E\langle X, u_k \rangle ^2$$

Since $S$ is the function of $u_1,\dots, u_p$, minimizing $S$ is equivalent to maximizing the second term of second formula. And the below equation holds.

$$\sum_{k=1}^p E\langle X, u_k \rangle ^2 = \sum_{k=1}^p \langle C(u_k), u_k \rangle$$

The maximum can be derived when $u_i = v_i$, it is the i-th eigenfunction of $C$.

 

 

Explained variance

With FPCA (or just PCA), we can obtain the explanation ratio(explained variance) for each eigenfunctions(eigenvectors in PCA).

Plug in the $v_i$ in the place of $u_i$, then we can obtain below equation and it can be interpreted as variance of$X$ explained by the projections.

$$E\lVert X \rVert ^2 - \sum_{k=1}^p E\langle X, v_k \rangle ^2 = \sum_{k=1}^\infty \lambda_k - \sum_{k=1}^p \lambda_k = \sum_{k=p+1}^\infty \lambda_k$$

 

Also, it indicates the approximation error between infinite and finite dimensional objects.

Then, the explained variance is as follows:

$$\frac{\sum_{k=1}^p \lambda_k}{\sum_{k=1}^\infty \lambda_k}$$

 

'통계공부 > Functional Data Analysis' 카테고리의 다른 글

[FDA] 8. Inference  (2) 2024.04.05
[FDA] 6. Functional CLT  (4) 2024.04.04
[FDA] 5. Hilbert spaces  (2) 2024.04.02
[FDA] 4. Curve alignment  (2) 2024.03.17
[FDA] 3. Penalized smoothing  (3) 2024.03.15
댓글

[FDA] 6. Functional CLT

2024. 4. 4.

In statistics, Central Limit Theorem means the sample average connverges to normal distribution for cenrain random variables. We will discuss CLT in the functional spaces.

 

Expectation

Firstly, we need to define expectation in the functional space, $\mathcal{H}$.

Let $X$ be a random element of $\mathcal{H}$. We say that $\mu \in \mathcal{H}$ is the mean of $X$ if it satisfies
$$E \langle X, x \rangle = \langle \mu, x \rangle \ \text{for all} \ x\in \mathcal{H}$$

For example, Let $X \in \mathbb{R}^d$ be a random vector. Then we define $\mu \in \mathbb{R}^d$ as

$$E \langle X, x\rangle = E \sum_{i=1}^d X_i x_i = \sum_{i=1}^d E[X_i]x_i = \sum_{i=1}^d \mu_i x_i = \langle \mu, x \rangle.$$

Thus, $\mu$ is a d-dimensional vector whose element is $E[X_i]$.

 

And expectation has two following properties:

  •  $\lVert E X \rVert \le E \lVert X \rVert$ (contractive property)
  • if $L$ is a bounded linear operator, then $EL(X) = L(EX)$.

 

Covariances

In general Hilbert spaces, we say that $C$ is the covariance operator of $X$ if

$$C(x) = E[ \lVert X-EX,x \rVert (X-EX)]\ \text{for all} \ x\in\mathcal{H}.$$

It exists only when finite $E\lVert X \rVert ^2$.

 

Any covariance operator, $C$, also has some property.

  • $C$ is symmetric
  • $C$ is nonnegative-definite
  • $C$ is Hilbert-Schmidt
  • $C$ is also called nuclear or a trace class operator in that it satisfies $\sum \lambda_u < \infty$ ($\lambda_i$ are its eigenvalues).

 

Gaussian

We need to know how to define Gaussian in functional space. We say that a random function $X \in \mathcal{H}$ is Gaussian if $\langle X, y \rangle$ is normally distributed (with finite variance) for any $y\in\mathcal{H}$.

If $X$ is Gaussian, it has following properties:

  • $X$ is strongly integrable and so $EX$ exists.
  • $E\lVert X \rVert ^2 < \infty$ and so it has a covariance operator $C$.
  • $E\lVert X \rVert ^p < \infty$ for any positive p.

This means that

$$\langle X, x\rangle \sim  \mathcal{N} ( \langle \mu, x \rangle, \langle C(x), x \rangle).$$

 

Characteristic functions

Last one that is needed to understand and define functional CLT properly is Characteristic functions.

The characteristic function of a random function $X$ is defined as

$$\psi(x) = E \exp({i\langle X,x\rangle})$$

We know that $X$ and $Y$ have the same distribution if and only if they have the same characteristic functions. And if $X$ is Gaussian with mean $\mu$ and covariance $C$, then

$$\psi(x) = \exp(i \langle \mu,x\rangle - \frac{1}{2} \langle C(x), x \rangle ).$$

 

Central Limit Theorem

Finally, we can reach functional CLT. Until now, we build backgrounds for proper understanding of functional CLT (especially in Hilbert spaces).

Suppose $\{Y_n:n=1,2,\dots \}$ is an iid sequence of random functions in $\mathcal{H}$ which are square integrable, $E\lVert Y_n \rVert ^2 < \infty.$ Let $\mu$ denote their mean and $C$ their covariance. Then we have
$$ \frac{1}{\sqrt{N}} \sum_{i=1}^N (Y_n -\mu) \overset{\mathcal{D}}{\to} \mathcal{N} (0, C)$$

 

Intuitively, the different thing compared to the CLT we know earlier is that 'random variables' is replaced with 'random functions'. To prove this, there are several concepts such as Karhunen-Loéve expansion, Pracevals theorem, and Markov inequality etc. I will skip the proof.

 

After making our random functions to follow the Gaussian distribution asymptotically, our next interests will be hypothesis test, confindence interval etc. Thus, I will introduce some of these concepts.

'통계공부 > Functional Data Analysis' 카테고리의 다른 글

[FDA] 8. Inference  (2) 2024.04.05
[FDA] 7. FPCA (more detailed)  (2) 2024.04.05
[FDA] 5. Hilbert spaces  (2) 2024.04.02
[FDA] 4. Curve alignment  (2) 2024.03.17
[FDA] 3. Penalized smoothing  (3) 2024.03.15
댓글

[FDA] 0. What is Functional Data Analysis (FDA)?

2024. 3. 5.

Here's an introduce about Functional Data Anlalysis (FDA).

 

1. Functional Data란?

Functional Data란 'infinite dimensional space에서 값을 갖는 Data, 특정 domain에서 정의된 함수로 구성된 Data' 등을 의미하며, 조금 더 직관적으로는 '시간, 공간 또는 다른 연속적인 독립 변수에 대한 연속적인 변화를 나타내는 데이터'를 의미한다. 시간에 따른 온도 변화 등이 가장 typical한 예시이다.

 

infinite dimensional이라는 용어와의 관련성은 무엇일까? FDA에서 만들어내는 함수들은 결국 유한개의 basis를 사용해서 만든 approximation일 뿐이며, 정확한 함수는 누구도 알 수 없다. 이 말은 즉 함수를 정확히 표현하기 위해서는 무수히 많은 basis를 사용해야 한다는 것이며, 이것이 infinite dimensional 용어와의 관련성이라고 할 수 있겠다.

 

FDA에서는 특정 domain에서 온전하게(completely) 혹은 온전하지 않게 관측된 sample 함수에 대한 통계적 분석을 한다. 시간이라는 특정 domain에 대한 온도 데이터가 있을때, 이것을 하나의 함수 또는 여러개 함수의 결합으로 보고 함수를 추정하고 통계적 분석을 하는 과정이라고 할 수 있겠다.

 

이러한 FDA를 가지고 우리가 답해나갈 것들은

i. infinite dimensional data를 어떻게 다룰 것인가?

ii. domain을 incorporate하는 model을 어떻게 정의할 것인가?

iii. functional data와 다른 변수들을 관련짓는 모델을 어떻게 만들 것인가?

에 대한 것이다.

 

 

2. FDA의 기본 notation

기본적으로 데이터는 아래와 같은 형태를 띄며, 각 notation의 의미는 다음과 같다.

$$X_n(t_{jn})\quad n=1,\dots,N\quad j=1,\dots,J_n\quad t_{jn}\in \mathcal{T}$$

한마디로 n은 curve 수 (함수 수), j는 각 함수의 observed point를 나타낸다

 

- $\mathcal{T}$는 $\mathbb{R}$의 어느 닫힌 구간 (보통 0~1)

- $X_n(t_{jn})$는 subject/unit specific random function

- $t_{jn}$은 unit n의 j번째 관측 포인트 (curve n의 j번째 observed point)

- N은 sample size

- $J_n$은 n번째 curve에 대한 관측 포인트의 수 (각 curve에 따른 observed point의 수)

 

위에서 정의한 $X_n(t)$를 데이터 t를 input한 함수의 값으로 보면, 우리가 관심있는 것은 '$X_n(t)$를 어떻게 다양한 함수의 선형결합으로 표현할까?' 이며, basis function $B_m$의 선형결합으로 이를 다음과 같이 나타낸다.

$$X_n(t) \approx \sum_{m=1}^M c_{nm}B_m(t)$$

 

Basis function을 선택하는 방법은 다양하지만 일반적으로

일정 주기를 가지는 데이터(계절, 시간적 특성을 가진)는 이러한 특성을 capture할 수 있는 Fourier Basis를 사용

그렇지 않다면 Spline Basis를 사용한다.

Fourier Basis는 성분들이 서로 orthonormal한 성질을 가지는 특징이 있다

 

다음 글에서는 Mean function, Covariance function, Principal Component에 대해서 설명해보도록 하겠다.

 

댓글