psf | R Documentation |
Takes an univariate time series as input. Optionally, specific internal parameters of the PSF algorithm can be also specified.
psf(data, k = seq(2, 10), w = seq(1, 10), cycle = 24)
data |
Input univariate time series, in any format (time series (ts), vector, matrix, list, data frame). |
k |
The number of clusters, or a vector of candidate values to search for the optimum automatically. |
w |
The window size, or a vector of candidate values to search for the optimum automatically. |
cycle |
The number of values that conform a cycle in the time series (e.g. 24 hours per day). Only used when input data is not in time series format. |
An object of class 'psf' with 7 elements:
original_series |
Original time series stored to be used internally to build further plots. |
train_data |
Adapted and normalized internal time series used to train the PSF model. |
k |
Number of clusters used |
w |
Window size used |
cycle |
Determined cycle for the input time series. |
dmin |
Minimum value of the input time series (used to denormalize internally further predictions). |
dmax |
Maximum value of the input time series (used to denormalize internally further predictions). |
## Train a PSF model from the univariate time series 'nottem' (package:datasets). p <- psf(nottem) ## Train a PSF model from the univariate time series 'sunspots' (package:datasets). p <- psf(sunspots)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.