#install.packages(“drat”, repos=”https://cran.rstudio.com”) #drat:::addRepo(“dmlc”) #install.packages(“xgboost”, repos=”http://dmlc.ml/drat/”, type = “source”) #install.packages(“xgboost”) #install.packages(c(“dplyr”, “hflights”)) #install.packages(“dummies”) #install.packages(“MASS”) require(xgboost) library(dplyr) library(hflights) library(dummies) library(MASS) setwd(“C:/Users/POSCOUSER/Desktop/”) train = read.csv(“train.csv”) test = read.csv(“test.csv”) col_names = colnames(test) # 트레인 데이터 준비 train_x = subset(train, select=col_names[col_names != “TARGET”]) train_y = subset(train, select=col_names[col_names == “TARGET”]) cate_list_x = c(“CH_pass_fac_flag”, “SM_STEEL_GRD”, “CH_SEQ_IN_CAST”, “SAME_TUND_TR_CAST_SEQ”, “FAC_OP_CD”, “FCE_NUM”, “SM_LD_BLW_METH_TP”, “LD_FCE_AC_UBLW_PTRN_NUM”, “LD_FCE_LW_BW_PTRN_NUM”, […]