ts_dataset | R Documentation |
torch_tensor
matrixCreate a time series dataset from a torch_tensor
matrix
ts_dataset( data, timesteps, horizon, index, jump = horizon, past_spec = list(x = NULL), future_spec = list(y = NULL), categorical = NULL, sample_frac = 1, device = "cpu", extras = NULL, ... )
data |
( |
timesteps |
( |
horizon |
( |
jump |
( |
past_spec |
( |
future_spec |
( |
categorical |
( |
extras |
( |
sample_fram |
( |
If scale
is TRUE, only the input variables are scale and not the outcome ones.
library(dplyr, warn.conflicts = FALSE) library(torchts) tarnow_temp <- weather_pl %>% filter(station == 'TRN') %>% arrange(date) weather_pl_dataset <- ts_dataset( data = tarnow_temp, timesteps = 28, horizon = 7, past_spec = list(x_num = c('tmax_daily', 'tmin_daily')), future_spec = list(y = 'tmax_daily') ) debugonce(weather_pl_dataset$.getitem) weather_pl_dataset$.getitem(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.