Sparsify {fdapace} | R Documentation |
Sparsify densely observed functional data
Description
Given a matrix of densely observed functional data, create a sparsified sample for experimental purposes
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 |
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:
Lt |
A list of observation time points for each sample. |
Ly |
A list of values for each sample, corresponding to the time points. |