# NOT RUN {
# Load Data
data(ex_sales)
# Create RT Data
rt_data <- rtCreateTrans(trans_df = ex_sales,
prop_id = 'pinx',
trans_id = 'sale_id',
price = 'sale_price',
periodicity = 'monthly',
date = 'sale_date')
# Create folds
k_folds <- split(x = 1:nrow(rt_data),
f = sample(1:10, nrow(rt_data), replace = TRUE))
# Create data from folds
kfold_data <- createKFoldData(score_ids = k_folds[[1]],
full_data = rt_data,
pred_df = rt_data)
# }
Run the code above in your browser using DataLab