.nixtla_data_prep {nixtlar} | R Documentation |
Prepares data for 'TimeGPT”s 'API' This is a private function of 'nixtlar'
Description
Prepares data for 'TimeGPT”s 'API' This is a private function of 'nixtlar'
Usage
.nixtla_data_prep(df, freq, id_col, time_col, target_col)
Arguments
df |
A tsibble or a data frame with time series data. |
freq |
Frequency of the data. |
id_col |
Column that identifies each series. Should be named unique_id. |
time_col |
Column that identifies each timestep. Should be named ds. |
target_col |
Column that contains the target variable. Should be named y. |
Value
A list with the given or inferred frequency, the prepared data, and the original data frame renamed.
Examples
df <- nixtlar::electricity
data <- .nixtla_data_prep(df, freq="H")
[Package nixtlar version 0.5.2 Index]