| clear_outcome | R Documentation |
Partially clear outcome variable in new data by overriding with NA values
clear_outcome(data, index, outcome, timesteps, key = NULL)
data |
( |
index |
Date variable |
outcome |
Outcome (target) variable |
timesteps |
( |
key |
A key (id) to group the data.frame (for panel data) |
tarnow_temp <-
weather_pl %>%
filter(station == "TRN") %>%
select(date, tmax_daily, tmin_daily, press_mean_daily)
TIMESTEPS <- 20
HORIZON <- 1
data_split <-
time_series_split(
tarnow_temp, date,
initial = "18 years",
assess = "2 years",
lag = TIMESTEPS
)
cleared_new_data <-
testing(data_split) %>%
clear_outcome(date, tmax_daily, TIMESTEPS)
head(cleared_new_data, TIMESTEPS + 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.