Remove the features from a lagged training dataset to reduce memory consumption
Remove the features from a lagged training dataset to reduce memory consumption
create_skeleton() strips the feature data from a create_lagged_df() object but keeps the outcome column(s), any grouping columns, and meta-data which allows the resulting lagged_df to be used downstream in the forecastML pipeline. The main benefit is that the custom modeling function passed in train_model() can read data directly from the disk or a database when the dataset is too large to fit into memory.
create_skeleton(lagged_df)
Arguments
lagged_df: An object of class 'lagged_df' from create_lagged_df(..., type = 'train').
Returns
An S3 object of class 'lagged_df' or 'grouped_lagged_df': A list of data.frames with the outcome column(s) and any grouping columns but with all other features removed. A special attribute skeleton = TRUE is added.