preproc: Preprocess a time series

Description Usage Arguments Value Examples

Description

Center and scale a time series

Usage

1
2
3
4
5
preproc(x, method = c("center", "scale"), useCenter = NULL,
  useScale = NULL)

## S3 method for class 'voila_preproc'
predict(object, input, inverse = FALSE, ...)

Arguments

x

time series to preprocess

method

Vector with the preprocessing methods to apply.

useCenter, useScale

Numeric value specifying the center/scale to use for the preprocessing instead of learning these values from the time series x

object

A voila_preproc object

input

The input to be transformed using object

inverse

Logical value: Is the data being trasformed back?

...

Additional parameters (currently ignored)

Value

preproc returns a voila_preproc object that can be used to transform new data using predict.

Examples

1
2
3
4
5
6
7
data("do_events")
plot(do_events, main = "DO events")
pp = preproc(do_events)
scaled_do_events = predict(pp, do_events)
plot(scaled_do_events, main = "Scaled DO events")
# recover the original DO events
original_do_events = predict(pp, scaled_do_events, inverse = TRUE)

citiususc/voila documentation built on May 13, 2019, 7:30 p.m.