MyNixOS website logo
Description

Curve Registration for Exponential Family Functional Data.

A method for performing joint registration and functional principal component analysis for curves (functional data) that are generated from exponential family distributions. This mainly implements the algorithms described in 'Wrobel et al. (2019)' <doi:10.1111/biom.12963> and further adapts them to potentially incomplete curves where (some) curves are not observed from the beginning and/or until the end of the common domain. Curve registration can be used to better understand patterns in functional data by separating curves into phase and amplitude variability. This software handles both binary and continuous functional data, and is especially applicable in accelerometry and wearable technology.

registr

AppVeyor buildstatus Codecov testcoverage DOI R-CMD-check

Registration for incomplete exponential family functional data.

What it does


Functional data analysis is a set of tools for understanding patterns and variability in data where the basic unit of observation is a curve measured over some domain such as time or space. An example is an accelerometer study where intensity of physical activity was measured at each minute over 24 hours for 50 subjects. The data will contain 50 curves, where each curve is the 24-hour activity profile for a particular subject.

Classic functional data analysis assumes that each curve is continuous or comes from a Gaussian distribution. However, applications with exponential family functional data – curves that arise from any exponential family distribution, and have a smooth latent mean – are increasingly common. For example, take the accelerometer data just mentioned, but assume researchers are interested in sedentary behavior instead of activity intensity. At each minute over 24 hours they collect a binary measurement that indicates whether a subject was active or inactive (sedentary). Now we have a binary curve for each subject – a trajectory where each time point can take on a value of 0 or 1. We assume the binary curve has a smooth latent mean, which in this case is interpreted as the probability of being active at each minute over 24 hours. This is a example of exponential family functional data.

Often in a functional dataset curves have similar underlying patterns but the main features of each curve, such as the minimum and maximum, have shifts such that the data appear misaligned. This misalignment can obscure patterns shared across curves and produce messy summary statistics. Registration methods reduce variability in functional data and clarify underlying patterns by aligning curves.

This package implements statistical methods for registering exponential family functional data. The basic methods are described in more detail in our paper and were further adapted to (potentially) incomplete curve settings where (some) curves are not observed from the very beginning and/or until the very end of the common domain. For details on the incomplete curve methodology and how to use it see the corresponding package vignette. Instructions for installing the software and using it to register simulated binary data are provided below.

Installation


To install from CRAN, please use:

install.packages("registr")

To install the latest version directly from Github, please use:

install.packages("devtools")
devtools::install_github("julia-wrobel/registr")

The registr package includes vignettes with more details on package use and functionality. To install the latest version and pull up the vignettes please use:

devtools::install_github("julia-wrobel/registr", build_vignettes = TRUE)
vignette(package = "registr")

How to use it


This example registers simulated binary data. More details on the use of the package can be found in the vignettes mentioned above.

The code below uses registr::simulate_unregistered_curves() to simulate curves for 100 subjects with 200 timepoints each, observed over domain (0, 1). All curves have similar structure but the location of the peak is shifted. On the observed domain t^* the curves are unregistered (misaligned). On the domain t the curves are registered (aligned).

library(registr)

registration_data = simulate_unregistered_curves(I = 100, D = 200, seed = 2018)

The plot below shows the unregistered curves and registered curves.

Continuously observed curves are shown above in order to illustrate the misalignment problem and our simulated data; the simulated dataset also includes binary values which have been generated by using these continuous curves as probabilities. The unregistered and registered binary curves for two subjects are shown below.

Our software registers curves by estimating t. For this we use the function registration_fpca().

binary_registration = register_fpca(Y = registration_data, family = "binomial", 
                                    Kt = 6, Kh = 4, npc  = 1)
## Running initial registration step
## current iteration: 1
## Running final FPCA step

The plot below shows unregistered, true registered, and estimated registered binary curves for two subjects after fitting our method.

Citation

If you like our software, please cite it in your work! To cite the latest CRAN version of the package with BibTeX, use

@Manual{,
    title = {registr: Registration for Exponential Family Functional Data},
    author = {Julia Wrobel and Alexander Bauer and Erin McDonnell and Jeff Goldsmith},
    year = {2022},
    note = {R package version 2.1.0},
    url = {https://CRAN.R-project.org/package=registr},
  }

To cite the 2021 Journal of Open Source Software paper, use

@article{wrobel2021registr,
  title={registr 2.0: Incomplete Curve Registration for Exponential Family Functional Data},
  author={Wrobel, Julia and Bauer, Alexander},
  journal={Journal of Open Source Software},
  volume={6},
  number={61},
  pages={2964},
  year={2021}
}

To cite the 2018 Journal of Open Source Software paper, use

@article{wrobel2018regis,
  title={registr: Registration for Exponential Family Functional Data},
  author={Wrobel, Julia},
  journal={The Journal of Open Source Software},
  volume={3},
  year={2018}
}

Contributions


If you find small bugs, larger issues, or have suggestions, please file them using the issue tracker or email the maintainer at [email protected]. Contributions (via pull requests or otherwise) are welcome.

Metadata

Version

2.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows