Functional Data Analysis for Density Functions by Transformation to a Hilbert Space
Published:
Goal
This is the report from my point of view on the paper Functional Data Analysis for Density Functions by Transformation to a Hilbert Space (Petersen and Müller 2016).
Functional data that are nonnegative and have a constrained integral can be considered as samples of one-dimensional density function.
The density function is nonnegative and has an integral of 1, hence commonly used Hilbert space based methods of functional data analysis are not applicable.
To address this issue, the paper proposes a new method which maps the densities to a Hilbert space, where the map is a continuous and invertible function.
Basic operations are implemented in the Hilbert space, then apply the inverse transformation to the density space.
Introduction
The functional modeling of density functions is difficult due to the two constrains
The key idea is to map probability densities into a linear function space by using a suitably chosen continuous and invertible map
Preliminaries
Density modelling
Assume that data consist of a sample of
Denote the space of continuous and strictly positive densities on
The sample consists of i.i.d. realizations of an underlying stochastic process, that is, each density is independently distributed as
A basic assumption we make on the space
Densities
- cumulative distribution functions (c.d.f.)
with domain , hazard functions (possibly on a subdomain of where ). - quantile functions
, with support . - Occasionally of interest is the equivalent notion of the quantile-density function
, from which we obtain .
All of these functions provide equivalent characterizations of distributions.
In many situations, the densities themselves will not be directly observed. Instead, for each
Thus, there are two random mechanisms at work that are assumed to be independent: the first generates the sample of densities and the second generates the samples of real-valued random data; one sample for each random density in the sample of densities.
Hence, the probability space can be thought of as a product space
Metrics in the space of density functions
In previous applied and methodological work, it was found that a metric
This quantile metric has connections to the optimal transport problem , and corresponds to the Wasserstein metric between two probability measures,
where the expectation is with respect to the joint distribution of
We will develop our methodology for a general metric, which will be denoted by
Density estimation
The densities themselves must first be estimated.
Consider the estimation of a density
For the theoretical results, a density estimator
- For a sequence
, the density estimator , based on an i.i.d. sample of size , satisfies , and
- For a sequence
and some , the density estimator , based on an i.i.d. sample of size , satisfies
✋ Note
The standard kernel density estimator does not satisfy these assumptions, due to boundary effects. Much work has been devoted to rectify the boundary effects, but the resulting estimators leave the density space and have not been shown to satisfy
Therefore, we introduce here a modified density estimator of kernel type that is guaranteed to satisfy
Let $$ be a kernel that corresponds to a continuous probability density function and
for
Here, the kernel
(K1) The kernel
is of bounded variation and is symmetric about .(K2) The kernel
satisfies , and , and are finite.
The weight function
is designed to remove boundary bias.
The following result demonstrates that this modified kernel estimator indeed satisfies conditions
Functional data analysis for density process
For a generic density function process
the mean function by
,the covariance function by
,the orthonormal eigenfunctions and eigenvalues of the linear covariance operator
by
If
where
The next part of this section is on the estimation of the mode of variation, i.e., the eigenfunctions. This part is the routine part of the FPCA, and I will skip it.
Transformation approach
The proposed transformation approach is to map the densities into a new space
via a functional transformation , where is a compact interval.Then we work with the resulting
processBy performing FPCA in the linear space
and then mapping back to density space, this transformation approach can be viewed as an intrinsic analysis, as opposed to ordinary FPCA.
In the new space
and denoting the mean and covariance functions, respectively, of the process . denoting the orthonormal eigenfunctions of the covariance is the corresponding eigenvalues,
The Karhunen–Loeve expansion for each of the transformed processes
with principal components
Our goal is to find suitable transformations
We begin with two specific examples of relevant transformations. For clarity, for functions in the native density space
The log hazard transformation
Since hazard functions diverge at the right endpoint of the distribution, which is 1, we consider quotient spaces induced by identifying densities which are equal on a subdomain
The log hazard transformation
Since the hazard function is positive but otherwise not constrained on
Solving the differential equation
Note that for this case one has a strict inverse only modulo the quotient space. However, in order to use metrics such as
The log quantile density transformation
For
It is then natural to define the inverse of a continuous function
where
In the transformation approach we construct modes of variation in the transformed space for processes
Estimation of these modes is done by first estimating the mean function
Estimated eigenvalues and eigenfunctions (
In contrast to the modes of variation resulting from ordinary FPCA in Section 3, the transformation modes are bona fide density functions for any value of
The truncated representations of the original densities in the sample are then given by
Utilizing (
whence
In practice, the truncation point
using an estimator
which is estimated by
The ratio
which is estimated by
As will be demonstrated in the data illustrations, this more general notion of variance explained is a useful concept when dealing with densities or other functions that are not in a Hilbert space. Specifically, we will show that density representations in
❗ Important
The R code for the transformation approach (only log density transformation) is available in the package fdadensity. There is no R code for the log hazard transformation.