DoDataPartition | R Documentation |
This function will take one dataset and return data for training and testing
DoDataPartition(
DATA_DT,
DATE_COLUMN = "SalesDate",
TARGET_COLUMN = "Sales",
WHICH_FEATURES = NULL,
TRAIN_RATIO = 0.8,
PARTITION_TYPE = "time",
DEBUG = TRUE
)
DATA_DT |
A data.table which contains the main dataset |
DATE_COLUMN |
The variable which contains date values |
TARGET_COLUMN |
The variable which contains the target variable |
WHICH_FEATURES |
The variables that will need to be in the final dataset |
TRAIN_RATIO |
Percentage of rows that will be in the dataset |
PARTITION_TYPE |
Partition by time or randomly |
DEBUG |
If TRUE, the function will be run in debug mode |
Abraham Mathew
Other Data Preparation:
AddDays()
,
AddMissingDates()
,
AddMonths()
,
AddWeeks()
,
AggregateTimeSeriesData()
,
CheckForMissingDates()
,
CreateOutputDates()
,
FakeDataGenerator()
,
FlattenLongData()
,
RemoveSpecialChars()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.