# NOT RUN {
# Create simulated data
data <- RemixAutoML::FakeDataGenerator(
ChainLadderData = TRUE)
# Build model
RemixAutoML::CLTrainer(
# Data Arguments----
data = data,
PartitionRatios = c(0.70,0.20,0.10),
BaseFunnelMeasure = "Leads",
ConversionMeasure = "Appointments",
ConversionRateMeasure = NULL,
CohortPeriodsVariable = "CohortDays",
CalendarDate = "CalendarDateColumn",
CohortDate = "CohortDateColumn",
TruncateDate = NULL,
TimeUnit = "days",
TransformTargetVariable = TRUE,
TransformMethods = c("Identity","BoxCox","Asinh",
"Asin","LogPlus1","Logit",
"YeoJohnson"),
AnomalyDetection = list(tstat_high = 3,
tstat_low = -2),
# MetaData Arguments----
Jobs = c("eval","train"),
SaveModelObjects = TRUE,
ModelID = "ModelTest",
ModelPath = getwd(),
MetaDataPath = NULL,
TaskType = "GPU",
NumGPUs = 1,
DT_Threads = max(1L, parallel::detectCores() - 2L),
EvaluationMetric = "RMSE",
LossFunction = "RMSE",
NumOfParDepPlots = 1L,
MetricPeriods = 50L,
# Feature Engineering Arguments----
ImputeRollStats = -0.001,
CalendarTimeGroups = c("days","weeks","months"),
CohortTimeGroups = c("days", "weeks"),
CalendarVariables = c("wday","mday","yday","week",
"month","quarter","year"),
HolidayGroups = c("USPublicHolidays","EasterGroup",
"ChristmasGroup","OtherEcclesticalFeasts"),
HolidayLookback = NULL,
CohortHolidayLags = c(1L,2L,7L),
CohortHolidayMovingAverages = c(3L,7L),
CalendarHolidayLags = c(1L,2L,7L),
CalendarHolidayMovingAverages = c(3L,7L),
CalendarLags = list("day" = c(1L,2L,7L,35L,42L),
"week" = c(5L,6L,10L,12L,25L,26L)),
CalendarMovingAverages = list("day" = c(7L,14L,35L,42L),
"week" = c(5L,6L,10L,12L,20L,24L),
"month" = c(6L,12L)),
CalendarStandardDeviations = NULL,
CalendarSkews = NULL,
CalendarKurts = NULL,
CalendarQuantiles = NULL,
CalendarQuantilesSelected = "q50",
CohortLags = list("day" = c(1L,2L,7L,35L,42L),
"week" = c(5L,6L)),
CohortMovingAverages = list("day" = c(7L,14L,35L,42L),
"week" = c(5L,6L),
"month" = c(1L,2L)),
CohortStandardDeviations = NULL,
CohortSkews = NULL,
CohortKurts = NULL,
CohortQuantiles = NULL,
CohortQuantilesSelected = "q50",
# Grid Tuning
PassInGrid = NULL,
GridTune = FALSE,
BaselineComparison = "default",
MaxModelsInGrid = 25L,
MaxRunMinutes = 180L,
MaxRunsWithoutNewWinner = 10L,
Trees = 1000L,
Depth = seq(4L,8L,1L),
LearningRate = seq(0.01,0.10,0.01),
L2_Leaf_Reg = seq(1.0,10.0,1.0),
RSM = c(0.80,0.85,0.90,0.95,1.0),
BootStrapType = c("Bayesian","Bernoulli","Poisson","MVS","No"),
GrowPolicy = c("SymmetricTree","Depthwise","Lossguide"))
# }
Run the code above in your browser using DataLab