Learn R Programming

fdapace (version 0.1.1)

Sparsify: Sparsify densely observed functional data

Description

Given a matrix of densely observed functional data, make a sparsified sample.

Usage

Sparsify(samp, pts, sparsity, aggressive = FALSE, fragment = FALSE)

Arguments

samp
A matrix of densely observed functional data, with each row containing one sample.
pts
A vector of grid points corresponding to the columns of samp.
sparsity
A vector of integers. The number of observation per sample is chosen to be one of the elements in sparsity with equal chance.
aggressive
Sparsify in an "aggressive" manner making sure that near-by readings are excluded.
fragment
Sparsify the observations into fragments, which are (almost) uniformly distributed in the time domain. Default to FALSE as not fragmenting. Otherwise a positive number specifying the approximate length of each fragment.

Value

  • A list of length 2, containing the following fields:
  • tListA list of observation time points for each sample.
  • yListA list of values for each sample, corresponding to the time points.