# NOT RUN {
#Setting a temporal directory as a working director
# }
# NOT RUN {
wd<-tempdir()
# }
# NOT RUN {
setwd(wd)
# }
# NOT RUN {
#Building the model
#Building the model
# }
# NOT RUN {
my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5))
# }
# NOT RUN {
data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2020-08-01"))
# }
# NOT RUN {
data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time>as.Date("2020-08-01"))
# }
# NOT RUN {
ML<-model_classification(data_train,data_test,grid=my.grid,
indicators=c("prodID","unit","description"),key_words=c("milk"),rounds=50)
# }
# NOT RUN {
#Saving the model
# }
# NOT RUN {
save_model(ML, dir="My_model")
# }
Run the code above in your browser using DataLab