fs_components | R Documentation |
Obtain the components of the Fourier Series, in sine-cosine form. It is useful for linearising the relationship of a seasonal input time series (e.g. solar azimuth, solar elevation, calendar features, ...) to some output (energy consumption, indoor temperatures, ...). It basically decomposes a cyclic time series into a set of sine-cosine components that are used as inputs for the modelling of some output, each of the components linearly depends to the output.
fs_components(
data,
featuresNames,
nHarmonics,
mask = NULL,
inplace = T,
normMode = "divided_by_max_plus_one"
)
data |
<data.frame> containing the series to transform. This series must have a cyclic behaviour (e.g. hour of the day, day of the week, solar azimuth, day of the year, ...) in order to be correctly transformed. Optionally, other variables that are not declared in featuresNames can be bypassed to the output. |
featuresNames |
<array> of strings selecting the series to transform. |
nHarmonics |
<integer> defines the number of harmonics considered in the Fourier Series. A high number allows to model more precisely the relation, but it considerably increase the cost of computation. The number of harmonics is related with the number of features in the output matrix |
mask |
<array> of booleans containing the timestamps that should be accounted for the transformation. The timestamps set to false will consider 0's for all their related sine-cosine components. By default, all elements of the time series are considered. |
normMode |
<string> normalisation method to be used in features preprocessing. Supported scaling methods - divided_by_max_plus_one: Max+1 normalisation method - min_max_range: Min-max normalisation method - NULL: No normalisation applied |
inplace: |
<array> of booleans indicating if the output should be the original data argument, plus the transformed objects -True- , or only the transformed series -False. |
<data.frame> containing the same initial information of data input argument, plus the sine-cosine components of the Fourier Series as new columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.