Learn R Programming

jointseg (version 1.0.2)

binMissingValues: binMissingValues

Description

Perform binning in order to remove missing values

Usage

binMissingValues(Y, verbose = FALSE)

Arguments

Y

A numeric matrix

verbose

A logical value: should extra information be output ? Defaults to FALSE.

Details

Some segmentation methods (in particular, GFLars) do not natively handle the situation when some observations have missing values in one or more dimensions. In order to avoid dropping the corresponding observations entirely, binMissingValues bins the signal values of the last complete observation before a (range of) observations with missing entries using the binMeans function.

In the specific case when the first row has NA values, the first non-missing entry is replicated in order to make smoothing possible. This choice is arbitrary but some arbitrary choice is needed in that case.

References

Bleakley, K., & Vert, J. P. (2011). The group fused lasso for multiple change-point detection. arXiv preprint arXiv:1106.4199.

Vert, J. P., & Bleakley, K. (2010). Fast detection of multiple change-points shared by many signals using group LARS. Advances in Neural Information Processing Systems, 23, 2343-2351.

Examples

Run this code
# NOT RUN {
sim <- randomProfile(10, 1, 0.1, 3)
Y <- sim$profile
Y[c(4, 8), 2] <- NA
Y[c(7, 8), 3] <- NA

res <- binMissingValues(Y)

Y <- sim$profile
Y[1:5, 2] <- NA
Yb <- binMissingValues(Y)

Y <- sim$profile
Y[3:5, 2] <- NA
Yb <- binMissingValues(Y)

# }

Run the code above in your browser using DataLab