ast
stringlengths 16
2.64M
|
---|
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){read.table}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](str){\n subject sex size\n 1 ...}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](str){output.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){e1071}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lattice}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[](symbol){T}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Cover_Type}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Cover_Type}<LEND>[assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[argument 1; litteral](real){12.000000}<LSEP>[argument 2; litteral](real){14.000000}<LSEP>[argument 3; litteral](real){15.000000}<LSEP>[argument 4; litteral](real){25.000000}<LEND>[assign](){=}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){56.000000}<LEND>[assign](){=}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){svm}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[argument 2; litteral](str){radial}<LEND>[argument 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.vector}<LSEP>[](symbol){x}<LEND>[true branch; litteral](real){1.000000}<LEND>[false branch; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[](symbol){T}<LEND>[assign](){=}<LSEP>[](symbol){x1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[argument 1; litteral](real){12.000000}<LSEP>[argument 2; litteral](real){14.000000}<LSEP>[argument 3; litteral](real){15.000000}<LSEP>[argument 4; litteral](real){25.000000}<LEND>[assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model}<LSEP>[](symbol){x1}<LEND>[assign](){=}<LSEP>[](symbol){sample_submission}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/sample_submission.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](str){,}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sample_submission}<LSEP>[](symbol){Cover_Type}<LEND>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){sample_submission}<LSEP>[argument 1; litteral](str){sub_0.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){mice}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ROCR}<LEND>[assign](){<-}<LSEP>[](symbol){trainOr}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){trainOr1}<LSEP>[](symbol){trainOr}<LEND>[assign](){<-}<LSEP>[](symbol){ind}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){trainOr}<LEND>[](symbol){T}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.700000}<LSEP>[argument 1; litteral](real){0.300000}<LEND>[assign](){<-}<LSEP>[](symbol){trainOr1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainOr}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ind}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){testOr1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainOr}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ind}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){trainOr1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainOr1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){5.000000}<LSEP>[argument 3; litteral](real){6.000000}<LSEP>[argument 4; litteral](real){7.000000}<LSEP>[argument 5; litteral](real){8.000000}<LSEP>[argument 6; litteral](real){12.000000}<LEND>[assign](){<-}<LSEP>[](symbol){testOr1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testOr1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){5.000000}<LSEP>[argument 3; litteral](real){6.000000}<LSEP>[argument 4; litteral](real){7.000000}<LSEP>[argument 5; litteral](real){8.000000}<LSEP>[argument 6; litteral](real){12.000000}<LEND>[assign](){<-}<LSEP>[](symbol){trainOr1}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){unclass}<LSEP>[](symbol){trainOr1}<LEND>[assign](){<-}<LSEP>[](symbol){testOr1}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){unclass}<LSEP>[](symbol){testOr1}<LEND>[assign](){<-}<LSEP>[](symbol){cols}<LEND>[call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainOr1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainOr1}<LSEP>[](symbol){}<LSEP>[](symbol){cols}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainOr1}<LSEP>[](symbol){cols}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){as.factor}<LEND>[assign](){<-}<LSEP>[](symbol){cols}<LEND>[call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testOr1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testOr1}<LSEP>[](symbol){}<LSEP>[](symbol){cols}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testOr1}<LSEP>[](symbol){cols}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){as.factor}<LEND>[call](){}<LSEP>[](symbol){colSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){trainOr1}<LEND>[assign](){<-}<LSEP>[](symbol){tempData}<LEND>[call](){}<LSEP>[](symbol){mice}<LSEP>[](symbol){trainOr1}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){50.000000}<LSEP>[argument 3; litteral](str){pmm}<LSEP>[argument 4; litteral](real){500.000000}<LEND>[assign](){<-}<LSEP>[](symbol){trainOr1}<LEND>[call](){}<LSEP>[](symbol){complete}<LSEP>[](symbol){tempData}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){tempDatatest}<LEND>[call](){}<LSEP>[](symbol){mice}<LSEP>[](symbol){testOr1}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){50.000000}<LSEP>[argument 3; litteral](str){pmm}<LSEP>[argument 4; litteral](real){500.000000}<LEND>[assign](){<-}<LSEP>[](symbol){testOr1}<LEND>[call](){}<LSEP>[](symbol){complete}<LSEP>[](symbol){tempDatatest}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train.model}<LEND>[call](){}<LSEP>[](symbol){glm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Sex}<LSEP>[](symbol){Pclass}<LEND>[](symbol){Age}<LEND>[](symbol){SibSp}<LEND>[](symbol){Parch}<LEND>[](symbol){Embarked}<LEND>[argument 1; litteral](str){binomial}<LSEP>[](symbol){trainOr1}<LEND>[assign](){<-}<LSEP>[](symbol){predtest}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){train.model}<LSEP>[](symbol){testOr1}<LSEP>[argument 2; litteral](str){response}<LEND>[assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){prediction}<LSEP>[](symbol){predtest}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testOr1}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[](symbol){eval}<LEND>[call](){}<LSEP>[](symbol){performance}<LSEP>[](symbol){pred}<LSEP>[argument 1; litteral](str){acc}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){eval}<LEND>[assign](){<-}<LSEP>[](symbol){eval1}<LEND>[call](){}<LSEP>[](symbol){performance}<LSEP>[](symbol){pred}<LSEP>[argument 1; litteral](str){tpr}<LSEP>[argument 2; litteral](str){fpr}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){eval1}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){auc}<LEND>[call](){}<LSEP>[](symbol){performance}<LSEP>[](symbol){pred}<LSEP>[argument 1; litteral](str){auc}<LEND>[assign](){<-}<LSEP>[](symbol){auc}<LEND>[call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){slot}<LSEP>[](symbol){auc}<LSEP>[argument 1; litteral](str){y.values}<LEND>[assign](){<-}<LSEP>[](symbol){auc}<LEND>[call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){auc}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){legend}<LSEP>[argument 0; litteral](real){0.800000}<LSEP>[argument 1; litteral](real){0.400000}<LSEP>[](symbol){auc}<LSEP>[argument 3; litteral](str){AUC}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){max}<LEND>[call](){}<LSEP>[](symbol){which.max}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){slot}<LSEP>[](symbol){eval}<LSEP>[argument 1; litteral](str){y.values}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){acc}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){slot}<LSEP>[](symbol){eval}<LSEP>[argument 1; litteral](str){y.values}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){max}<LEND>[assign](){<-}<LSEP>[](symbol){cut}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){slot}<LSEP>[](symbol){eval}<LSEP>[argument 1; litteral](str){x.values}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){max}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){acc}<LSEP>[](symbol){cut}<LEND>[assign](){<-}<LSEP>[](symbol){testOr}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){testOr}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testOr}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){5.000000}<LSEP>[argument 3; litteral](real){6.000000}<LSEP>[argument 4; litteral](real){7.000000}<LSEP>[argument 5; litteral](real){11.000000}<LEND>[assign](){<-}<LSEP>[](symbol){testOr}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){unclass}<LSEP>[](symbol){testOr}<LEND>[assign](){<-}<LSEP>[](symbol){cols}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){testOr}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testOr}<LSEP>[](symbol){cols}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testOr}<LSEP>[](symbol){cols}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){as.factor}<LEND>[assign](){<-}<LSEP>[](symbol){tempData}<LEND>[call](){}<LSEP>[](symbol){mice}<LSEP>[](symbol){testOr}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){50.000000}<LSEP>[argument 3; litteral](str){pmm}<LSEP>[argument 4; litteral](real){500.000000}<LEND>[assign](){<-}<LSEP>[](symbol){testOr}<LEND>[call](){}<LSEP>[](symbol){complete}<LSEP>[](symbol){tempData}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){survivaltest}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){train.model}<LSEP>[](symbol){testOr}<LSEP>[argument 2; litteral](str){response}<LEND>[assign](){<-}<LSEP>[](symbol){survivaltest}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){survivaltest}<LEND>[assign](){=}<LSEP>[](symbol){survivalpred}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){418.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){survivalpred}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){survivaltest}<LSEP>[argument 1; litteral](real){0.640000}<LEND>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){survivalpred}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){survivalpred} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){forecast}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){reshape2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){foreach}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){date}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lubridate}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){doMC}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](real){86672217.000000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[call](){}<LSEP>[](symbol){setnames}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){date}<LSEP>[argument 1; litteral](str){store_nbr}<LSEP>[argument 2; litteral](str){item_nbr}<LSEP>[argument 3; litteral](str){unit_sales}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date}<LEND>[call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse_date_time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date}<LEND>[argument 1; litteral](str){%y-%m-%d}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){store_item_nbr}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){store_nbr}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){item_nbr}<LEND>[argument 2; litteral](str){_}<LEND>[assign](){<-}<LSEP>[](symbol){train_sub}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LSEP>[](symbol){date}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LSEP>[argument 0; litteral](str){2017-01-01}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){train_sub}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_sub}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){date}<LSEP>[argument 1; litteral](str){store_item_nbr}<LSEP>[argument 2; litteral](str){unit_sales}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_sub}<LSEP>[](symbol){unit_sales}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_sub}<LSEP>[](symbol){unit_sales}<LEND>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_sub}<LSEP>[](symbol){unit_sales}<LEND>[call](){}<LSEP>[](symbol){log1p}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_sub}<LSEP>[](symbol){unit_sales}<LEND>[assign](){<-}<LSEP>[](symbol){train_sub_wide}<LEND>[call](){}<LSEP>[](symbol){dcast}<LSEP>[](symbol){train_sub}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){store_item_nbr}<LSEP>[](symbol){date}<LEND>[argument 2; litteral](str){unit_sales}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train_sub_col}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_sub_wide}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train_ts}<LEND>[call](){}<LSEP>[](symbol){ts}<LSEP>[](symbol){train_sub_wide}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LSEP>[](symbol){train_sub}<LSEP>[](symbol){train_sub_wide}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){=}<LSEP>[](symbol){fcst_intv}<LSEP>[litteral](real){16.000000}<LEND>[assign](){<-}<LSEP>[](symbol){fcst_matrix}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train_ts}<LEND>[](symbol){fcst_intv}<LEND>[call](){}<LSEP>[](symbol){registerDoMC}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){detectCores}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){fcst_matrix}<LEND>[call](){}<LSEP>[](symbol){%dopar%}<LEND>[argument 0; call](){}<LSEP>[](symbol){foreach}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train_ts}<LEND>[](symbol){rbind}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){forecast}<LEND>[argument 1; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fcst_matrix}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){forecast}<LEND>[argument 0; call](){}<LSEP>[](symbol){ets}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_ts}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[](symbol){fcst_intv}<LEND>[](symbol){mean}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fcst_matrix}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){fcst_matrix}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fcst_matrix}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LSEP>[argument 0; litteral](str){2017-08-16}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LSEP>[argument 0; litteral](str){2017-08-31}<LEND>[argument 2; litteral](str){day}<LEND>[assign](){<-}<LSEP>[](symbol){fcst_df}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){train_sub_col}<LSEP>[](symbol){fcst_matrix}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fcst_df}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){store_item_nbr}<LEND>[assign](){<-}<LSEP>[](symbol){fcst_df_long}<LEND>[call](){}<LSEP>[](symbol){melt}<LSEP>[](symbol){fcst_df}<LSEP>[argument 1; litteral](str){store_item_nbr}<LSEP>[argument 2; litteral](str){fcst_date}<LSEP>[argument 3; litteral](str){unit_sales}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcst_df_long}<LSEP>[](symbol){store_item_nbr}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcst_df_long}<LSEP>[](symbol){store_item_nbr}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcst_df_long}<LSEP>[](symbol){fcst_date}<LEND>[call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse_date_time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcst_df_long}<LSEP>[](symbol){fcst_date}<LEND>[argument 1; litteral](str){%y-%m-%d}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcst_df_long}<LSEP>[](symbol){unit_sales}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcst_df_long}<LSEP>[](symbol){unit_sales}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcst_df_long}<LSEP>[](symbol){unit_sales}<LEND>[call](){}<LSEP>[](symbol){expm1}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fcst_df_long}<LSEP>[](symbol){unit_sales}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){date}<LEND>[call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){parse_date_time}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){date}<LEND>[argument 1; litteral](str){%y-%m-%d}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){store_item_nbr}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){store_nbr}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){item_nbr}<LEND>[argument 2; litteral](str){_}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){left_join}<LSEP>[](symbol){test}<LSEP>[](symbol){fcst_df_long}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){store_item_nbr}<LSEP>[argument 1; litteral](str){fcst_date}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){unit_sales}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){unit_sales}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){submission}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){id}<LSEP>[argument 1; litteral](str){unit_sales}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){sub_ets_log.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){plyr}<LEND>[assign](){<-}<LSEP>[](symbol){Mode}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ux}<LEND>[call](){}<LSEP>[](symbol){unique}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ux}<LEND>[argument 1; call](){}<LSEP>[](symbol){which.max}<LEND>[argument 0; call](){}<LSEP>[](symbol){tabulate}<LEND>[argument 0; call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){x}<LSEP>[](symbol){ux}<LEND>[assign](){<-}<LSEP>[](symbol){buildFrequencyTable}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){sequences}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pairs}<LEND>[call](){}<LSEP>[](symbol){ldply}<LSEP>[](symbol){sequences}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){sequence}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sequence}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){sequence}<LSEP>[argument 1; litteral](str){,}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){sequence}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 2; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){sequence}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){sequence}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){frequencyTable}<LEND>[call](){}<LSEP>[](symbol){ddply}<LSEP>[](symbol){pairs}<LSEP>[argument 1; litteral](str){last}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){last}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){Mode}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){following}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){frequencyTable}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){options}<LSEP>[argument 0; litteral](real){999.000000}<LEND>[assign](){<-}<LSEP>[](symbol){frequencyTable}<LEND>[call](){}<LSEP>[](symbol){buildFrequencyTable}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Sequence}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){last}<LEND>[call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Sequence}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){sequence}<LEND>[body; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){sequence}<LSEP>[argument 1; litteral](str){,}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){mode}<LEND>[call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Sequence}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){sequence}<LEND>[body; call](){}<LSEP>[](symbol){Mode}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){sequence}<LSEP>[argument 1; litteral](str){,}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){join}<LSEP>[](symbol){data}<LSEP>[](symbol){frequencyTable}<LSEP>[argument 2; litteral](str){left}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){following}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){Last}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){following}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){mode}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){following}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){Frequencies.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){FeatureHashing}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Matrix}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Reading data\n}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){=}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/people.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Processing data\n}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){char_1}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){people_}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[assign](){<-}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){people}<LSEP>[](symbol){is.logical}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LSEP>[](symbol){p_logi}<LEND>[body; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){people}<LSEP>[](symbol){col}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){people}<LSEP>[](symbol){col}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){group unique}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){d2}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[](symbol){row.train}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){d1}<LSEP>[](symbol){d2}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){test_activity_id}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){activity_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LSEP>[](symbol){d1}<LSEP>[](symbol){d2}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){char.cols}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_category}<LSEP>[argument 1; litteral](str){people_group_1}<LSEP>[argument 2; litteral](str){char_1}<LSEP>[argument 3; litteral](str){char_2}<LSEP>[argument 4; litteral](str){char_3}<LSEP>[argument 5; litteral](str){char_4}<LSEP>[argument 6; litteral](str){char_5}<LSEP>[argument 7; litteral](str){char_6}<LSEP>[argument 8; litteral](str){char_7}<LSEP>[argument 9; litteral](str){char_8}<LSEP>[argument 10; litteral](str){char_9}<LSEP>[argument 11; litteral](str){char_10}<LSEP>[argument 12; litteral](str){people_char_2}<LSEP>[argument 13; litteral](str){people_char_3}<LSEP>[argument 14; litteral](str){people_char_4}<LSEP>[argument 15; litteral](str){people_char_5}<LSEP>[argument 16; litteral](str){people_char_6}<LSEP>[argument 17; litteral](str){people_char_7}<LSEP>[argument 18; litteral](str){people_char_8}<LSEP>[argument 19; litteral](str){people_char_9}<LEND>[control flow](){for}<LSEP>[](symbol){f}<LSEP>[](symbol){char.cols}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){character}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making sparse data (1)\n}<LEND>[assign](){=}<LSEP>[](symbol){D.sparse}<LEND>[call](){}<LSEP>[](symbol){cBind}<LEND>[argument 0; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){activity_category}<LEND>[argument 1; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_group_1}<LEND>[argument 2; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_1}<LEND>[argument 3; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_2}<LEND>[argument 4; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_3}<LEND>[argument 5; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_4}<LEND>[argument 6; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_5}<LEND>[argument 7; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_6}<LEND>[argument 8; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_7}<LEND>[argument 9; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_8}<LEND>[argument 10; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_9}<LEND>[argument 11; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_2}<LEND>[argument 12; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_3}<LEND>[argument 13; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_4}<LEND>[argument 14; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_5}<LEND>[argument 15; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_6}<LEND>[argument 16; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_7}<LEND>[argument 17; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_8}<LEND>[argument 18; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_9}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making sparse data (2)\n}<LEND>[assign](){=}<LSEP>[](symbol){D.sparse}<LEND>[call](){}<LSEP>[](symbol){cBind}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_10}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_11}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_12}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_13}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_14}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_15}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_16}<LEND>[argument 8; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_17}<LEND>[argument 9; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_18}<LEND>[argument 10; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_19}<LEND>[argument 11; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_20}<LEND>[argument 12; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_21}<LEND>[argument 13; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_22}<LEND>[argument 14; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_23}<LEND>[argument 15; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_24}<LEND>[argument 16; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_25}<LEND>[argument 17; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_26}<LEND>[argument 18; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_27}<LEND>[argument 19; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_28}<LEND>[argument 20; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_29}<LEND>[argument 21; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_30}<LEND>[argument 22; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_31}<LEND>[argument 23; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_32}<LEND>[argument 24; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_33}<LEND>[argument 25; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_34}<LEND>[argument 26; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_35}<LEND>[argument 27; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_36}<LEND>[argument 28; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_37}<LEND>[argument 29; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_38}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Unmerging train/test sparse da...}<LEND>[assign](){=}<LSEP>[](symbol){train.sparse}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){row.train}<LEND>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){test.sparse}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){row.train}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){D.sparse}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making data for SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating SVMLight format\n}<LEND>[assign](){<-}<LSEP>[](symbol){dtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){train.sparse}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Exporting SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix.save}<LSEP>[](symbol){dtrain}<LSEP>[argument 1; litteral](str){dtrain.data}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Zipping SVMLight\n}<LEND>[call](){}<LSEP>[](symbol){zip}<LSEP>[argument 0; litteral](str){dtrain.data.zip}<LSEP>[argument 1; litteral](str){dtrain.data}<LSEP>[argument 2; litteral](str){-m9X}<LSEP>[argument 3; litteral](str){}<LEND>[argument 4; call](){}<LSEP>[](symbol){Sys.getenv}<LSEP>[argument 0; litteral](str){R_ZIPCMD}<LSEP>[argument 1; litteral](str){zip}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){File size of train in SVMLight: }<LEND>[argument 1; call](){}<LSEP>[](symbol){file.size}<LSEP>[argument 0; litteral](str){dtrain.data.zip}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating SVMLight format\n}<LEND>[assign](){<-}<LSEP>[](symbol){dtest}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){test.sparse}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Exporting SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix.save}<LSEP>[](symbol){dtest}<LSEP>[argument 1; litteral](str){dtest.data}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Zipping SVMLight\n}<LEND>[call](){}<LSEP>[](symbol){zip}<LSEP>[argument 0; litteral](str){dtest.data.zip}<LSEP>[argument 1; litteral](str){dtest.data}<LSEP>[argument 2; litteral](str){-m9X}<LSEP>[argument 3; litteral](str){}<LEND>[argument 4; call](){}<LSEP>[](symbol){Sys.getenv}<LSEP>[argument 0; litteral](str){R_ZIPCMD}<LSEP>[argument 1; litteral](str){zip}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){File size of test in SVMLight: }<LEND>[argument 1; call](){}<LSEP>[](symbol){file.size}<LSEP>[argument 0; litteral](str){dtest.data.zip}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){binary:logistic}<LSEP>[argument 1; litteral](str){auc}<LSEP>[argument 2; litteral](str){gbtree}<LSEP>[argument 3; litteral](real){0.050000}<LSEP>[argument 4; litteral](real){0.860000}<LSEP>[argument 5; litteral](real){0.920000}<LSEP>[argument 6; litteral](real){0.900000}<LSEP>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){0.005000}<LSEP>[argument 9; litteral](real){11.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){XGBoost\n}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1712.000000}<LEND>[assign](){<-}<LSEP>[](symbol){m2}<LEND>[call](){}<LSEP>[](symbol){xgb.train}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){param}<LSEP>[argument 2; litteral](real){550.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dtrain}<LEND>[argument 4; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predicting on test data\n}<LEND>[assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){m2}<LSEP>[](symbol){dtest}<LEND>[assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){test_activity_id}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){sub}<LSEP>[argument 1; litteral](str){model_sub.csv}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Cleaning up...\n}<LEND>[call](){}<LSEP>[](symbol){remove}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Doing Loiso's magic leak\n}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Working on people\n}<LEND>[assign](){<-}<LSEP>[](symbol){ppl}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/people.csv}<LEND>[assign](){<-}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){ppl}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){ppl}<LSEP>[](symbol){is.logical}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LSEP>[](symbol){p_logi}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){ppl}<LSEP>[](symbol){col}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){ppl}<LSEP>[](symbol){col}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ppl}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){date}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){date}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Working on data\n}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){TestActivs}<LSEP>[](symbol){outcome}<LEND>[litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){activs}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Merging\n}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){activs}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){people_id}<LSEP>[argument 1; litteral](str){outcome}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[argument 3; litteral](str){date}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){activs}<LSEP>[](symbol){ppl}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){testset}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){activdate}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){date.x}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating interaction\n}<LEND>[assign](){<-}<LSEP>[](symbol){minactivdate}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){maxactivdate}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){alldays}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){minactivdate}<LSEP>[](symbol){maxactivdate}<LSEP>[argument 2; litteral](str){day}<LEND>[assign](){<-}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[](symbol){alldays}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[call](){}<LSEP>[](symbol){setkey}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[argument 1; litteral](str){group_1}<LSEP>[argument 2; litteral](str){date.p}<LEND>[assign](){<-}<LSEP>[](symbol){meanbycomdate}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[argument 2; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){outcome}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){meanbycomdate}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){interpolateFun}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){borders}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){forward_border}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){borders}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){borders}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){backward_border}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){borders}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){borders}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){forward_border_x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){forward_border}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_border_x}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.200000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){backward_border_x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){backward_border}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){backward_border_x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){forward_x_fill}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){backward_x_fill}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){backward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){forward_x_fill_2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){forward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_x_fill}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){backward_x_fill_2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_x_fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){backward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){vec}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){forward_x_fill}<LSEP>[](symbol){backward_x_fill}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vec}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Applying interaction interpola...}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){filled}<LEND>[argument 1; call](){}<LSEP>[](symbol){interpolateFun}<LSEP>[](symbol){V1}<LEND>[argument 3; litteral](str){group_1}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){d1}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){T}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predicting leak\n}<LEND>[assign](){<-}<LSEP>[](symbol){testsetdt}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_id}<LSEP>[argument 1; litteral](str){filled}<LEND>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){testsetdt}<LSEP>[argument 1; litteral](str){Submission.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Cleaning up...\n}<LEND>[call](){}<LSEP>[](symbol){remove}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Combining two submissions on t...}<LEND>[assign](){<-}<LSEP>[](symbol){submit1}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){Submission.csv}<LEND>[assign](){<-}<LSEP>[](symbol){submit2}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){model_sub.csv}<LEND>[assign](){<-}<LSEP>[](symbol){submit3}<LEND>[call](){}<LSEP>[](symbol){merge}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit1}<LSEP>[](symbol){filled}<LEND>[](symbol){}<LEND>[](symbol){submit2}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){submit4}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){submit1}<LSEP>[](symbol){submit3}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){outcome}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[assign](){<-}<LSEP>[](symbol){submit5}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){activity_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submit5}<LSEP>[argument 1; litteral](str){mod3108Kaggle_01.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){Training set has %d rows and %...}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){Test set has %d rows and %d co...}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Id}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Hazard}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Hazard}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){mlr}<LEND>[call](){}<LSEP>[](symbol){configureMlr}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[argument 1; litteral](str){warn}<LEND>[assign](){=}<LSEP>[](symbol){GBM}<LEND>[call](){}<LSEP>[](symbol){makeLearner}<LSEP>[argument 0; litteral](str){regr.gbm}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){700.000000}<LSEP>[argument 1; litteral](str){laplace}<LSEP>[argument 2; litteral](integer){20}<LEND>[assign](){=}<LSEP>[](symbol){GBM}<LEND>[call](){}<LSEP>[](symbol){makeDownsampleWrapper}<LSEP>[](symbol){GBM}<LSEP>[argument 1; litteral](real){0.200000}<LEND>[assign](){=}<LSEP>[](symbol){RF}<LEND>[call](){}<LSEP>[](symbol){makeLearner}<LSEP>[argument 0; litteral](str){regr.randomForest}<LEND>[assign](){=}<LSEP>[](symbol){RF}<LEND>[call](){}<LSEP>[](symbol){makeDownsampleWrapper}<LSEP>[](symbol){RF}<LSEP>[argument 1; litteral](real){0.200000}<LEND>[assign](){=}<LSEP>[](symbol){STACK}<LEND>[call](){}<LSEP>[](symbol){makeStackedLearner}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){GBM}<LSEP>[](symbol){RF}<LEND>[argument 1; litteral](str){regr.gbm}<LSEP>[argument 2; litteral](str){stack.cv}<LEND>[assign](){=}<LSEP>[](symbol){TASK}<LEND>[call](){}<LSEP>[](symbol){makeRegrTask}<LSEP>[argument 0; litteral](str){Property Inspection Prediction}<LSEP>[](symbol){train}<LSEP>[argument 2; litteral](str){Hazard}<LEND>[call](){}<LSEP>[](symbol){removeConstantFeatures}<LSEP>[](symbol){TASK}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){parallelMap}<LEND>[call](){}<LSEP>[](symbol){parallelStartMulticore}<LEND>[assign](){=}<LSEP>[](symbol){fitted}<LEND>[call](){}<LSEP>[](symbol){train}<LSEP>[](symbol){STACK}<LSEP>[](symbol){TASK}<LEND>[call](){}<LSEP>[](symbol){parallelStop}<LEND>[assign](){=}<LSEP>[](symbol){submit}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fitted}<LSEP>[](symbol){test}<LEND>[assign](){=}<LSEP>[](symbol){submit}<LEND>[call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit}<LSEP>[](symbol){data}<LEND>[](symbol){response}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){submit}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){submit}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[](symbol){submit}<LEND>[argument 1; litteral](str){PIP_MLR.csv}<LSEP>[](symbol){F}<LSEP>[argument 3; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tm}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){syuzhet}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){SnowballC}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](real){1000.000000}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](real){1000.000000}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){train}<LEND>[assign](){=}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[assign](){=}<LSEP>[](symbol){df.new}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){q1}<LEND>[call](){}<LSEP>[](symbol){Corpus}<LEND>[argument 0; call](){}<LSEP>[](symbol){VectorSource}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){question1}<LEND>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){q1}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q1}<LSEP>[](symbol){removePunctuation}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){q1}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q1}<LSEP>[](symbol){removeNumbers}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){q1}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q1}<LSEP>[](symbol){tolower}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){q1}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q1}<LSEP>[](symbol){stemDocument}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){q1}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q1}<LSEP>[](symbol){stripWhitespace}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){q1}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q1}<LSEP>[](symbol){removeWords}<LEND>[argument 2; call](){}<LSEP>[](symbol){stopwords}<LSEP>[argument 0; litteral](str){english}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){q1}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q1}<LSEP>[](symbol){PlainTextDocument}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){doc}<LEND>[call](){}<LSEP>[](symbol){TermDocumentMatrix}<LSEP>[](symbol){q1}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){a11}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){doc}<LSEP>[](symbol){dimnames}<LEND>[](symbol){Terms}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){q2}<LEND>[call](){}<LSEP>[](symbol){Corpus}<LEND>[argument 0; call](){}<LSEP>[](symbol){VectorSource}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){question2}<LEND>[](symbol){i}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){q2}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q2}<LSEP>[](symbol){removePunctuation}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){q2}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q2}<LSEP>[](symbol){removeNumbers}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){q2}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q2}<LSEP>[](symbol){tolower}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){q2}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q2}<LSEP>[](symbol){stemDocument}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){q2}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q2}<LSEP>[](symbol){stripWhitespace}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){q2}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q2}<LSEP>[](symbol){removeWords}<LEND>[argument 2; call](){}<LSEP>[](symbol){stopwords}<LSEP>[argument 0; litteral](str){english}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){q2}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){q2}<LSEP>[](symbol){PlainTextDocument}<LEND>[statement 18; assign](){=}<LSEP>[](symbol){doc}<LEND>[call](){}<LSEP>[](symbol){TermDocumentMatrix}<LSEP>[](symbol){q2}<LEND>[statement 19; assign](){=}<LSEP>[](symbol){b11}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){doc}<LSEP>[](symbol){dimnames}<LEND>[](symbol){Terms}<LEND>[statement 20; assign](){=}<LSEP>[](symbol){c11}<LEND>[call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){a11}<LSEP>[](symbol){b11}<LEND>[statement 21; assign](){=}<LSEP>[](symbol){same_items}<LEND>[call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){c11}<LEND>[statement 22; assign](){=}<LSEP>[](symbol){distinct_items}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){a11}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){b11}<LEND>[statement 23; assign](){=}<LSEP>[](symbol){match_count}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[](symbol){same_items}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){distinct_items}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){sentiment1}<LEND>[call](){}<LSEP>[](symbol){get_nrc_sentiment}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){question1}<LEND>[](symbol){i}<LEND>[statement 25; assign](){<-}<LSEP>[](symbol){sentiment2}<LEND>[call](){}<LSEP>[](symbol){get_nrc_sentiment}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){question2}<LEND>[](symbol){i}<LEND>[](symbol){sentiment1}<LSEP>[](symbol){sentiment2}<LEND>[statement 28; assign](){=}<LSEP>[](symbol){p1}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sentiment1}<LSEP>[](symbol){positive}<LEND>[statement 29; assign](){=}<LSEP>[](symbol){p2}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sentiment2}<LSEP>[](symbol){positive}<LEND>[statement 30; assign](){=}<LSEP>[](symbol){n1}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sentiment1}<LSEP>[](symbol){negative}<LEND>[statement 31; assign](){=}<LSEP>[](symbol){n2}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sentiment2}<LSEP>[](symbol){negative}<LEND>[statement 32; assign](){=}<LSEP>[](symbol){df.new}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){match_count}<LSEP>[](symbol){p1}<LSEP>[](symbol){p2}<LSEP>[](symbol){n1}<LSEP>[](symbol){n2}<LEND>[statement 33; assign](){=}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){df}<LSEP>[](symbol){df.new}<LEND>[assign](){=}<LSEP>[](symbol){tr}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){train}<LSEP>[](symbol){df}<LEND>[assign](){=}<LSEP>[](symbol){tr}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tr}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){6.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tr}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tr}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[](symbol){as.factor}<LEND>[assign](){=}<LSEP>[](symbol){tr}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){tr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_duplicate}<LSEP>[](symbol){.}<LEND>[](symbol){tr}<LEND>[](symbol){model}<LEND>[assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model}<LSEP>[](symbol){tr}<LSEP>[argument 2; litteral](str){prob}<LEND>[assign](){=}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){=}<LSEP>[](symbol){logLoss}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){pred}<LSEP>[](symbol){actual}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){model.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){actual}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){pred}<LEND>[argument 1; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){logLoss}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tr}<LSEP>[](symbol){is_duplicate} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv.zip}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){col_datetime}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){mutate}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.POSIXct}<LEND>[argument 0; call](){}<LSEP>[](symbol){strftime}<LSEP>[](symbol){Dates}<LSEP>[argument 1; litteral](str){%Y-%m-%d 00:00:00}<LEND>[assign](){<-}<LSEP>[](symbol){all_offenses_per_day}<LEND>[call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){train}<LSEP>[](symbol){Date_y_m_d}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Date_y_m_d}<LEND>[assign](){=}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){all_offenses_per_day}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Offences_Per_Day}<LSEP>[](symbol){Date_y_m_d}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_line}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](str){green}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Offences per/day}<LSEP>[argument 1; litteral](str){Date}<LSEP>[argument 2; litteral](str){San Francisco Offence Rate}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LSEP>[argument 0; litteral](str){lm}<LEND>[call](){}<LSEP>[](symbol){ggsave}<LSEP>[argument 0; litteral](str){OffenceRate.png}<LSEP>[](symbol){p}<LSEP>[argument 2; litteral](real){14.000000}<LSEP>[argument 3; litteral](real){10.000000}<LSEP>[argument 4; litteral](str){in}<LEND>[assign](){<-}<LSEP>[](symbol){train_true_crime}<LEND>[call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){Category}<LSEP>[argument 1; litteral](str){OTHER OFFENSES}<LEND>[argument 2; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){Category}<LSEP>[argument 1; litteral](str){NON-CRIMINAL}<LEND>[assign](){<-}<LSEP>[](symbol){crimes_per_day}<LEND>[call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){train_true_crime}<LSEP>[](symbol){Date_y_m_d}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Date_y_m_d}<LEND>[assign](){=}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){crimes_per_day}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Count_Per_Day}<LSEP>[](symbol){Date_y_m_d}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_line}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](str){blue}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Crime per/day}<LSEP>[argument 1; litteral](str){Date}<LSEP>[argument 2; litteral](str){San Francisco Crime Rate}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LSEP>[argument 0; litteral](str){lm}<LEND>[call](){}<LSEP>[](symbol){ggsave}<LSEP>[argument 0; litteral](str){CrimeRate.png}<LSEP>[](symbol){p}<LSEP>[argument 2; litteral](real){14.000000}<LSEP>[argument 3; litteral](real){10.000000}<LSEP>[argument 4; litteral](str){in}<LEND>[assign](){<-}<LSEP>[](symbol){train_no_resolution}<LEND>[call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){train_true_crime}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){Resolution}<LEND>[argument 1; litteral](str){none}<LEND>[assign](){<-}<LSEP>[](symbol){crimes_not_resolved}<LEND>[call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){train_no_resolution}<LSEP>[](symbol){Date_y_m_d}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Date_y_m_d}<LEND>[assign](){=}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){crimes_not_resolved}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Count_Per_Day}<LSEP>[](symbol){Date_y_m_d}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_line}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](str){red}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Unresolved per/day}<LSEP>[argument 1; litteral](str){Date}<LSEP>[argument 2; litteral](str){San Francisco Unresolved Case ...}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LSEP>[argument 0; litteral](str){lm}<LEND>[call](){}<LSEP>[](symbol){ggsave}<LSEP>[argument 0; litteral](str){UnresolvedCase.png}<LSEP>[](symbol){p}<LSEP>[argument 2; litteral](real){14.000000}<LSEP>[argument 3; litteral](real){10.000000}<LSEP>[argument 4; litteral](str){in} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){formattable}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){gbm}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[assign](){<-}<LSEP>[](symbol){HP.train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){HP.test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){HP.data}<LEND>[call](){}<LSEP>[](symbol){bind_rows}<LSEP>[](symbol){HP.train}<LSEP>[](symbol){HP.test}<LEND>[assign](){<-}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){HP.data}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){81.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Alley}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Alley}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtQual}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtCond}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtExposure}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtExposure}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinType1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinType1}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinType2}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinType2}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){FireplaceQu}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){FireplaceQu}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageType}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageType}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageFinish}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageFinish}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageQual}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageCond}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){PoolQC}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){PoolQC}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Fence}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Fence}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MiscFeature}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MiscFeature}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MSZoning}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MSZoning}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tmp0}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){MSZoning}<LEND>[argument 1; call](){}<LSEP>[](symbol){tally}<LEND>[argument 1; call](){}<LSEP>[](symbol){top_n}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){MSZoning}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Utilities}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Utilities}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tmp0}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){Utilities}<LEND>[argument 1; call](){}<LSEP>[](symbol){tally}<LEND>[argument 1; call](){}<LSEP>[](symbol){top_n}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){Utilities}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Exterior1st}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Exterior1st}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tmp0}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){Exterior1st}<LEND>[argument 1; call](){}<LSEP>[](symbol){tally}<LEND>[argument 1; call](){}<LSEP>[](symbol){top_n}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){Exterior1st}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Exterior2nd}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Exterior2nd}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tmp0}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){Exterior2nd}<LEND>[argument 1; call](){}<LSEP>[](symbol){tally}<LEND>[argument 1; call](){}<LSEP>[](symbol){top_n}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){Exterior2nd}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Electrical}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Electrical}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tmp0}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){Electrical}<LEND>[argument 1; call](){}<LSEP>[](symbol){tally}<LEND>[argument 1; call](){}<LSEP>[](symbol){top_n}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){Electrical}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){KitchenQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){KitchenQual}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tmp0}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){KitchenQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){tally}<LEND>[argument 1; call](){}<LSEP>[](symbol){top_n}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){KitchenQual}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Functional}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){Functional}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tmp0}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){Functional}<LEND>[argument 1; call](){}<LSEP>[](symbol){tally}<LEND>[argument 1; call](){}<LSEP>[](symbol){top_n}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){Functional}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){SaleType}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){SaleType}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tmp0}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){SaleType}<LEND>[argument 1; call](){}<LSEP>[](symbol){tally}<LEND>[argument 1; call](){}<LSEP>[](symbol){top_n}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){SaleType}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){TotalBsmtSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){TotalBsmtSF}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){TotalBsmtSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){TotalBsmtSF}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinSF1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinSF1}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinSF1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinSF1}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinSF2}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinSF2}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinSF2}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFinSF2}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtUnfSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtUnfSF}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtUnfSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtUnfSF}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageArea}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageArea}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageCars}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageCars}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageCars}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageCars}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MasVnrArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MasVnrArea}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MasVnrArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MasVnrArea}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){LotFrontage}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){LotFrontage}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){LotFrontage}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){LotFrontage}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MasVnrType}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){MasVnrType}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFullBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtFullBath}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtHalfBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){BsmtHalfBath}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){GarageYrBlt}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){YearBuilt}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp0}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){81.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){tmp0}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){is.character}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[assign](){=}<LSEP>[](symbol){features}<LEND>[call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){tmp1}<LEND>[control flow](){for}<LSEP>[](symbol){f}<LSEP>[](symbol){features}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){character}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){f}<LEND>[](symbol){levels}<LEND>[assign](){<-}<LSEP>[](symbol){tmp1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){tmp.train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1460.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){tmp.test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1461.000000}<LSEP>[argument 1; litteral](real){2919.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){gbm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){SalePrice}<LSEP>[](symbol){.}<LEND>[](symbol){tmp.train}<LSEP>[argument 2; litteral](str){laplace}<LSEP>[argument 3; litteral](real){0.050000}<LSEP>[argument 4; litteral](real){5.000000}<LSEP>[argument 5; litteral](real){0.660000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){100.000000}<LSEP>[](symbol){F}<LSEP>[](symbol){F}<LSEP>[argument 10; litteral](real){500.000000}<LEND>[assign](){<-}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model}<LSEP>[](symbol){tmp.test}<LSEP>[argument 2; litteral](real){500.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp.test}<LSEP>[](symbol){SalePrice}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){output.data}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){tmp.test}<LSEP>[](symbol){output}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){output.data}<LSEP>[](symbol){Id}<LEND>[call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){output.data}<LEND>[call](){}<LSEP>[](symbol){setnames}<LSEP>[](symbol){output.data}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){output}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){SalePrice}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){output.data}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){output.data}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){output.data}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){Id}<LSEP>[](symbol){SalePrice}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){output.data}<LSEP>[argument 1; litteral](str){Output_GBM.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[assign](){=}<LSEP>[](symbol){numSample}<LSEP>[litteral](real){10000.000000}<LEND>[assign](){<-}<LSEP>[](symbol){numTrees}<LSEP>[litteral](real){100.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){rows}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){rows}<LSEP>[](symbol){}<LEND>[](symbol){label}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){rows}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){rowMeans}<LSEP>[](symbol){train}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){rowMeans}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){train}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){rowMeans}<LSEP>[](symbol){train}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){rowMeans}<LSEP>[](symbol){test}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){rowMeans}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){test}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){rowMeans}<LSEP>[](symbol){test}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LSEP>[](symbol){train}<LSEP>[](symbol){labels}<LSEP>[](symbol){test}<LSEP>[](symbol){numTrees}<LEND>[assign](){<-}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LSEP>[](symbol){labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rf}<LSEP>[](symbol){test}<LEND>[](symbol){predicted}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){predictions}<LSEP>[argument 1; litteral](str){submission.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){extractFeatures}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){features}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Pclass}<LSEP>[argument 1; litteral](str){Age}<LSEP>[argument 2; litteral](str){Sex}<LSEP>[argument 3; litteral](str){Parch}<LSEP>[argument 4; litteral](str){SibSp}<LSEP>[argument 5; litteral](str){Fare}<LSEP>[argument 6; litteral](str){Embarked}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fea}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){features}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Fare}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Embarked}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){S}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Sex}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Sex}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Embarked}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Embarked}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fea}<LEND>[call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){caret}<LEND>[assign](){<-}<LSEP>[](symbol){metric}<LSEP>[litteral](str){Accuracy}<LEND>[assign](){<-}<LSEP>[](symbol){control}<LEND>[call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){repeatedcv}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](str){grid}<LEND>[assign](){<-}<LSEP>[](symbol){tunegrid}<LEND>[call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){modellist}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){extractFeatures}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[control flow](){for}<LSEP>[](symbol){ntree}<LEND>[range; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[argument 1; litteral](real){200.000000}<LSEP>[argument 2; litteral](real){300.000000}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LSEP>[](symbol){.}<LEND>[](symbol){data}<LSEP>[argument 2; litteral](str){rf}<LSEP>[](symbol){metric}<LSEP>[](symbol){tunegrid}<LSEP>[](symbol){control}<LSEP>[](symbol){ntree}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){key}<LEND>[call](){}<LSEP>[](symbol){toString}<LSEP>[](symbol){ntree}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){modellist}<LSEP>[](symbol){key}<LEND>[](symbol){fit}<LEND>[assign](){<-}<LSEP>[](symbol){results}<LEND>[call](){}<LSEP>[](symbol){resamples}<LSEP>[](symbol){modellist}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){results}<LEND>[call](){}<LSEP>[](symbol){dotplot}<LSEP>[](symbol){results}<LEND>[assign](){<-}<LSEP>[](symbol){rf}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){extractFeatures}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[](symbol){ntree}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PassengerId}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf}<LEND>[argument 1; call](){}<LSEP>[](symbol){extractFeatures}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){1_random_forest_r_submission.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){imp}<LEND>[call](){}<LSEP>[](symbol){importance}<LSEP>[](symbol){rf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){featureImportance}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){row.names}<LSEP>[](symbol){imp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){imp}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){featureImportance}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){Feature}<LSEP>[](symbol){Importance}<LEND>[](symbol){Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LSEP>[argument 1; litteral](str){#53cfff}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_light}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Random Forest Feature Importan...}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){18.000000}<LEND>[call](){}<LSEP>[](symbol){ggsave}<LSEP>[argument 0; litteral](str){2_feature_importance.png}<LSEP>[](symbol){p} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Survived}<LSEP>[argument 1; litteral](str){Died}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){1st Class}<LSEP>[argument 1; litteral](str){2nd Class}<LSEP>[argument 2; litteral](str){3rd Class}<LEND>[call](){}<LSEP>[](symbol){png}<LSEP>[argument 0; litteral](str){1_survival_by_class.png}<LSEP>[argument 1; litteral](real){800.000000}<LSEP>[argument 2; litteral](real){600.000000}<LEND>[call](){}<LSEP>[](symbol){mosaicplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){Passenger Survival by Class}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){#8dd3c7}<LSEP>[argument 1; litteral](str){#fb8072}<LEND>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](str){}<LSEP>[argument 5; litteral](str){}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 7; litteral](real){1.400000}<LEND>[call](){}<LSEP>[](symbol){dev.off} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){leaflet}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){geosphere}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){IM}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lubridate}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){plotly}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Matrix}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dygraphs}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xts}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){RColorBrewer}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){train_ts}<LEND>[call](){}<LSEP>[](symbol){copy}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){pickup_datetime}<LSEP>[](symbol){dropoff_datetime}<LSEP>[](symbol){passenger_count}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_ts}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){pickup_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){ymd_hms}<LSEP>[](symbol){pickup_datetime}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_ts}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){dropoff_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){ymd_hms}<LSEP>[](symbol){dropoff_datetime}<LEND>[assign](){<-}<LSEP>[](symbol){pickups}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_ts}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){.N}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){passenger_count}<LEND>[](symbol){pickup_datetime}<LEND>[assign](){<-}<LSEP>[](symbol){dropoffs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_ts}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){.N}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){passenger_count}<LEND>[](symbol){dropoff_datetime}<LEND>[call](){}<LSEP>[](symbol){setnames}<LSEP>[](symbol){pickups}<LSEP>[argument 1; litteral](str){pickup_datetime}<LSEP>[argument 2; litteral](str){datetime}<LEND>[call](){}<LSEP>[](symbol){setnames}<LSEP>[](symbol){dropoffs}<LSEP>[argument 1; litteral](str){dropoff_datetime}<LSEP>[argument 2; litteral](str){datetime}<LEND>[assign](){<-}<LSEP>[](symbol){trips}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){pickups}<LSEP>[](symbol){dropoffs}<LSEP>[argument 2; litteral](str){datetime}<LSEP>[](symbol){T}<LEND>[control flow](){for}<LSEP>[](symbol){n}<LEND>[range; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){trips}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[body; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){trips}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){trips}<LSEP>[](symbol){n}<LEND>[](symbol){n}<LSEP>[argument 3; litteral](integer){0}<LEND>[assign](){<-}<LSEP>[](symbol){valueCalc}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){value_on}<LSEP>[](symbol){value_off}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){diff2int}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[body; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){difftime}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[argument 2; litteral](str){secs}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){N}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trips}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){diff2int}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){datetime}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){inds}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trips}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){diff2int}<LSEP>[](symbol){datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){datetime}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){values}<LEND>[call](){}<LSEP>[](symbol){sparseVector}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){value_on}<LSEP>[](symbol){value_off}<LEND>[](symbol){inds}<LSEP>[](symbol){N}<LEND>[statement 4; call](){}<LSEP>[](symbol){cumsum}<LSEP>[](symbol){values}<LEND>[assign](){<-}<LSEP>[](symbol){total_trips}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trips}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){valueCalc}<LSEP>[](symbol){trips_on}<LSEP>[](symbol){trips_off}<LEND>[assign](){<-}<LSEP>[](symbol){total_passengers}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trips}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){valueCalc}<LSEP>[](symbol){passenger_on}<LSEP>[](symbol){passenger_off}<LEND>[assign](){<-}<LSEP>[](symbol){total_values}<LEND>[call](){}<LSEP>[](symbol){data.table}<LSEP>[](symbol){total_trips}<LSEP>[](symbol){total_passengers}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){total_values}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.POSIXct}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){.I}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){2016-01-01 00:00:17}<LSEP>[argument 2; litteral](str){UTC}<LEND>[assign](){<-}<LSEP>[](symbol){plotTS}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){value_col}<LSEP>[](symbol){n_days}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){trip_ts}<LEND>[call](){}<LSEP>[](symbol){xts}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){total_values}<LSEP>[](symbol){value_col}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){total_values}<LSEP>[](symbol){time}<LEND>[argument 2; litteral](str){America/New_York}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){trip_ts}<LEND>[](symbol){value_col}<LEND>[statement 2; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){dygraph}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trip_ts}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n_days}<LSEP>[argument 1; litteral](real){86400.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){5.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[](symbol){...}<LEND>[argument 1; call](){}<LSEP>[](symbol){dyRangeSelector}<LEND>[argument 1; call](){}<LSEP>[](symbol){dyRangeSelector}<LSEP>[argument 0; litteral](real){18.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){dyOptions}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){dyAxis}<LSEP>[argument 0; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){_}<LSEP>[argument 1; litteral](str){ }<LSEP>[](symbol){value_col}<LEND>[argument 1; call](){}<LSEP>[](symbol){dyAxis}<LSEP>[argument 0; litteral](str){x}<LSEP>[argument 1; litteral](str){Time}<LEND>[argument 1; call](){}<LSEP>[](symbol){dyOptions}<LSEP>[argument 0; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){plotTS}<LSEP>[argument 0; litteral](str){total_trips}<LSEP>[argument 1; litteral](real){31.000000}<LSEP>[argument 2; litteral](str){Total Trips in January}<LEND>[call](){}<LSEP>[](symbol){plotTS}<LSEP>[argument 0; litteral](str){total_passengers}<LSEP>[argument 1; litteral](real){31.000000}<LSEP>[argument 2; litteral](str){Total Passengers in January}<LEND>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[argument 1; litteral](str){train}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){densityCalc}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){dt}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dow}<LEND>[call](){}<LSEP>[](symbol){wday}<LSEP>[](symbol){dt}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){tod}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){hour}<LSEP>[](symbol){dt}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){minute}<LSEP>[](symbol){dt}<LEND>[argument 1; litteral](real){60.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){second}<LSEP>[](symbol){dt}<LEND>[argument 1; litteral](real){3600.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){time}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){tod}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){24.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dow}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){density_matrix}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){1441.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){24.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){t}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.500000}<LSEP>[argument 1; litteral](real){24.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){24.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.500000}<LSEP>[argument 1; litteral](real){24.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ind}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){7.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){density_matrix}<LSEP>[](symbol){ind}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){density}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){24.000000}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){1441.000000}<LEND>[](symbol){y}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){density_matrix}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){density_matrix}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){density_matrix}<LEND>[argument 1; litteral](real){5.000000}<LEND>[](symbol){density_matrix}<LEND>[assign](){<-}<LSEP>[](symbol){heat_ly}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){mat}<LSEP>[](symbol){...}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){mins}<LEND>[call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){:%02d}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){59.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){x_labels}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](real){12.000000}<LSEP>[](symbol){mins}<LSEP>[argument 2; litteral](str){ am}<LEND>[argument 1; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[](symbol){paste0}<LSEP>[](symbol){mins}<LSEP>[argument 3; litteral](str){ am}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](real){12.000000}<LSEP>[](symbol){mins}<LSEP>[argument 2; litteral](str){ pm}<LEND>[argument 3; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[](symbol){paste0}<LSEP>[](symbol){mins}<LSEP>[argument 3; litteral](str){ pm}<LEND>[argument 4; litteral](str){12:00 am }<LEND>[statement 2; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){x_labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x_labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1441.000000}<LEND>[](symbol){mat}<LSEP>[argument 2; litteral](real){900.000000}<LSEP>[argument 3; litteral](real){450.000000}<LEND>[argument 4; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){colorRampPalette}<LEND>[argument 0; call](){}<LSEP>[](symbol){brewer.pal}<LSEP>[argument 0; litteral](real){9.000000}<LSEP>[argument 1; litteral](str){YlOrRd}<LEND>[argument 0; litteral](real){100.000000}<LEND>[argument 5; litteral](str){heatmap}<LEND>[argument 1; call](){}<LSEP>[](symbol){layout}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){90.000000}<LSEP>[argument 1; litteral](real){90.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](str){}<LSEP>[argument 2; litteral](str){array}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[argument 4; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Monday}<LSEP>[argument 1; litteral](str){Tuesday}<LSEP>[argument 2; litteral](str){Wednesday}<LSEP>[argument 3; litteral](str){Thursday}<LSEP>[argument 4; litteral](str){Friday}<LSEP>[argument 5; litteral](str){Saturday}<LSEP>[argument 6; litteral](str){Sunday}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](real){45.000000}<LSEP>[argument 2; litteral](str){array}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x_labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1441.000000}<LSEP>[argument 2; litteral](real){60.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){:00}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x_labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1441.000000}<LSEP>[argument 2; litteral](real){60.000000}<LEND>[](symbol){...}<LEND>[argument 1; call](){}<LSEP>[](symbol){colorbar}<LSEP>[argument 0; litteral](str){}<LSEP>[argument 1; litteral](str){Demand}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){14.000000}<LEND>[argument 3; litteral](str){array}<LEND>[argument 4; call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){mat}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ low}<LSEP>[argument 1; litteral](str){ med}<LSEP>[argument 2; litteral](str){ high}<LEND>[assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){densityCalc}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){pickup_datetime}<LEND>[call](){}<LSEP>[](symbol){heat_ly}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](str){Pickup Demand}<LEND>[assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){densityCalc}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){dropoff_datetime}<LEND>[call](){}<LSEP>[](symbol){heat_ly}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](str){Dropoff Demand}<LEND>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[argument 1; litteral](str){train}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){30.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_type}<LSEP>[argument 1; litteral](str){t > 30}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){between}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){5.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_type}<LSEP>[argument 1; litteral](str){t < 5}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){between}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){5.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_type}<LSEP>[argument 1; litteral](str){t in [5, 15)}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){between}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){30.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_type}<LSEP>[argument 1; litteral](str){t in [15, 30)}<LEND>[assign](){<-}<LSEP>[](symbol){equalize}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){histeq}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){h}<LEND>[assign](){<-}<LSEP>[](symbol){shade}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){colorNumeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){blue}<LSEP>[argument 1; litteral](str){red}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.010000}<LEND>[argument 0; call](){}<LSEP>[](symbol){equalize}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){colors}<LEND>[call](){}<LSEP>[](symbol){setNames}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){shade}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.250000}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 1; litteral](str){25}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){t < 5}<LSEP>[argument 1; litteral](str){t in [5, 15)}<LSEP>[argument 2; litteral](str){t in [15, 30)}<LSEP>[argument 3; litteral](str){t > 30}<LEND>[assign](){<-}<LSEP>[](symbol){trips}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){pickup_latitude}<LSEP>[](symbol){dropoff_latitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){pickup_longitude}<LSEP>[](symbol){dropoff_longitude}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){trip_duration}<LSEP>[](symbol){trip_duration}<LEND>[](symbol){trip_type}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](str){n}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](str){Locations}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){74.030000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){73.930000}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){40.700000}<LSEP>[argument 1; litteral](real){40.800000}<LEND>[argument 6; litteral](str){longitude}<LSEP>[argument 7; litteral](str){latitude}<LEND>[control flow](){for}<LSEP>[](symbol){cls}<LEND>[range; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){colors}<LEND>[body; call](){}<LSEP>[](symbol){with}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trips}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){.N}<LSEP>[argument 1; litteral](real){25000.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){points}<LSEP>[](symbol){lon}<LSEP>[](symbol){lat}<LSEP>[argument 2; litteral](real){16.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){colors}<LSEP>[](symbol){cls}<LEND>[argument 4; litteral](real){0.250000}<LEND>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){train}<LSEP>[argument 1; litteral](str){equalize}<LSEP>[argument 2; litteral](str){shade}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){formatted}<LEND>[call](){}<LSEP>[](symbol){copy}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){extractTime}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){t}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){ymd_hms}<LSEP>[](symbol){t}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){hour}<LSEP>[](symbol){t}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){m}<LEND>[call](){}<LSEP>[](symbol){minute}<LSEP>[](symbol){t}<LEND>[statement 3; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){%d:%02d %s}<LSEP>[](symbol){h}<LSEP>[](symbol){m}<LEND>[argument 3; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[argument 1; litteral](str){pm}<LSEP>[argument 2; litteral](str){am}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){pickup_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){extractTime}<LSEP>[](symbol){pickup_datetime}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){dropoff_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){extractTime}<LSEP>[](symbol){dropoff_datetime}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){%0.2f mins}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){trip_duration}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[assign](){<-}<LSEP>[](symbol){center_lon}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){pickup_longitude}<LSEP>[](symbol){dropoff_longitude}<LEND>[assign](){<-}<LSEP>[](symbol){center_lat}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){pickup_latitude}<LSEP>[](symbol){dropoff_latitude}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_distance}<LEND>[argument 1; call](){}<LSEP>[](symbol){distGeo}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){pickup_longitude}<LSEP>[](symbol){pickup_latitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){dropoff_longitude}<LSEP>[](symbol){dropoff_latitude}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_distance}<LEND>[argument 1; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){%0.2f m}<LSEP>[](symbol){trip_distance}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){pickup_location}<LEND>[argument 1; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){(%0.3f, %0.3f)}<LSEP>[](symbol){pickup_latitude}<LSEP>[](symbol){pickup_longitude}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){dropoff_location}<LEND>[argument 1; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){(%0.3f, %0.3f)}<LSEP>[](symbol){dropoff_latitude}<LSEP>[](symbol){dropoff_longitude}<LEND>[assign](){<-}<LSEP>[](symbol){info_cols}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){id}<LSEP>[argument 1; litteral](str){vendor_id}<LSEP>[argument 2; litteral](str){pickup_location}<LSEP>[argument 3; litteral](str){dropoff_location}<LSEP>[argument 4; litteral](str){trip_distance}<LSEP>[argument 5; litteral](str){passenger_count}<LSEP>[argument 6; litteral](str){pickup_datetime}<LSEP>[argument 7; litteral](str){dropoff_datetime}<LSEP>[argument 8; litteral](str){trip_duration}<LEND>[assign](){<-}<LSEP>[](symbol){addLabel}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){j}<LEND>[body; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){<b>%s</b>: %s <br/>}<LSEP>[](symbol){j}<LEND>[argument 2; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){j}<LEND>[assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){formatted}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){info_cols}<LSEP>[](symbol){addLabel}<LEND>[call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){train}<LSEP>[argument 1; litteral](str){info}<LEND>[argument 2; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){labels}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){paste}<LSEP>[argument 3; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){leaflet}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){.N}<LSEP>[argument 1; litteral](real){250.000000}<LEND>[argument 1; litteral](str){100%}<LEND>[argument 1; call](){}<LSEP>[](symbol){addProviderTiles}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){providers}<LSEP>[](symbol){MtbMap}<LEND>[argument 1; call](){}<LSEP>[](symbol){addProviderTiles}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){providers}<LSEP>[](symbol){Stamen.TonerLines}<LEND>[argument 1; call](){}<LSEP>[](symbol){providerTileOptions}<LSEP>[argument 0; litteral](real){0.350000}<LEND>[argument 1; call](){}<LSEP>[](symbol){addProviderTiles}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){providers}<LSEP>[](symbol){Stamen.TonerLabels}<LEND>[argument 1; call](){}<LSEP>[](symbol){addScaleBar}<LEND>[argument 1; call](){}<LSEP>[](symbol){addCircles}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){pickup_longitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){pickup_latitude}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){passenger_count}<LEND>[argument 3; litteral](real){0.750000}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[argument 5; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){shade}<LSEP>[](symbol){trip_duration}<LEND>[argument 6; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){info}<LEND>[argument 7; litteral](str){Pickups}<LEND>[argument 1; call](){}<LSEP>[](symbol){addCircles}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){dropoff_longitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){dropoff_latitude}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){passenger_count}<LEND>[argument 3; litteral](real){0.750000}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[argument 5; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){shade}<LSEP>[](symbol){trip_duration}<LEND>[argument 6; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){info}<LEND>[argument 7; litteral](str){Dropoffs}<LEND>[argument 1; call](){}<LSEP>[](symbol){setView}<LSEP>[](symbol){center_lon}<LSEP>[](symbol){center_lat}<LSEP>[argument 2; litteral](real){15.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){addLayersControl}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Pickups}<LSEP>[argument 1; litteral](str){Dropoffs}<LEND>[argument 1; call](){}<LSEP>[](symbol){layersControlOptions}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[argument 1; litteral](str){train}<LEND>[call](){}<LSEP>[](symbol){gc} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){extractFeatures}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){features}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Pclass}<LSEP>[argument 1; litteral](str){Age}<LSEP>[argument 2; litteral](str){Sex}<LSEP>[argument 3; litteral](str){Parch}<LSEP>[argument 4; litteral](str){SibSp}<LSEP>[argument 5; litteral](str){Fare}<LSEP>[argument 6; litteral](str){Embarked}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fea}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){features}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Fare}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Embarked}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){S}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Sex}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Sex}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Embarked}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fea}<LSEP>[](symbol){Embarked}<LEND>[statement 7; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fea}<LEND>[assign](){<-}<LSEP>[](symbol){rf}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){extractFeatures}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 2; litteral](real){100.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PassengerId}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf}<LEND>[argument 1; call](){}<LSEP>[](symbol){extractFeatures}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){1_random_forest_r_submission.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){imp}<LEND>[call](){}<LSEP>[](symbol){importance}<LSEP>[](symbol){rf}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){featureImportance}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){row.names}<LSEP>[](symbol){imp}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){imp}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){featureImportance}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){Feature}<LSEP>[](symbol){Importance}<LEND>[](symbol){Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LSEP>[argument 1; litteral](str){#53cfff}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_light}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Random Forest Feature Importan...}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){18.000000}<LEND>[call](){}<LSEP>[](symbol){ggsave}<LSEP>[argument 0; litteral](str){2_feature_importance.png}<LSEP>[](symbol){p} |
[](){expression}<LSEP>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){knitr}<LSEP>[](symbol){opts_chunk}<LEND>[](symbol){set}<LEND>[argument 0; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidyverse}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lubridate}<LEND>[assign](){<-}<LSEP>[](symbol){taxi}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){taxi_submit}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LSEP>[argument 0; litteral](real){0.200000}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){trip_duration}<LSEP>[argument 1; litteral](real){3600.000000}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){trip_duration}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LSEP>[](symbol){trip_duration}<LEND>[assign](){<-}<LSEP>[](symbol){taxi}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dropoff_latitude}<LSEP>[](symbol){pickup_latitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dropoff_longitude}<LSEP>[](symbol){pickup_longitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){latdiff}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LSEP>[](symbol){londiff}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){latdiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){londiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){latdiff}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){londiff}<LEND>[assign](){<-}<LSEP>[](symbol){taxi}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){year}<LSEP>[](symbol){pickup_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){month}<LSEP>[](symbol){pickup_datetime}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){wday}<LSEP>[](symbol){pickup_datetime}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){hour}<LSEP>[](symbol){pickup_datetime}<LEND>[argument 4; call](){}<LSEP>[](symbol){minute}<LSEP>[](symbol){pickup_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){pickup_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){dropoff_datetime}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){taxi}<LSEP>[](symbol){pickup_year}<LEND>[assign](){<-}<LSEP>[](symbol){taxi}<LEND>[call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){pickup_year}<LEND>[assign](){<-}<LSEP>[](symbol){taxi}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){between}<LSEP>[](symbol){pickup_hour}<LSEP>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){9.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){between}<LSEP>[](symbol){pickup_hour}<LSEP>[argument 1; litteral](real){17.000000}<LSEP>[argument 2; litteral](real){19.000000}<LEND>[argument 1; litteral](str){Y}<LSEP>[argument 2; litteral](str){N}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){pickup_wday}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Sat}<LSEP>[argument 1; litteral](str){Sun}<LEND>[argument 1; litteral](str){Y}<LSEP>[argument 2; litteral](str){N}<LEND>[assign](){<-}<LSEP>[](symbol){taxi}<LEND>[call](){}<LSEP>[](symbol){mutate}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){trip_duration}<LEND>[assign](){<-}<LSEP>[](symbol){taxi}<LEND>[call](){}<LSEP>[](symbol){mutate}<LSEP>[](symbol){taxi}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){vendor_id}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){store_and_fwd_flag}<LEND>[argument 3; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){peak_hour}<LEND>[argument 4; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){weekend}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){gbm}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){sample_frac}<LSEP>[](symbol){taxi}<LSEP>[argument 1; litteral](real){0.800000}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){dplyr}<LSEP>[](symbol){setdiff}<LEND>[](symbol){taxi}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){boosted_mod}<LEND>[call](){}<LSEP>[](symbol){gbm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){.}<LSEP>[](symbol){id}<LEND>[](symbol){train}<LSEP>[argument 2; litteral](real){0.001000}<LSEP>[argument 3; litteral](str){gaussian}<LSEP>[argument 4; litteral](real){1000.000000}<LSEP>[argument 5; litteral](real){0.010000}<LSEP>[argument 6; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){boosted_pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){boosted_mod}<LSEP>[](symbol){test}<LSEP>[argument 2; litteral](real){1000.000000}<LEND>[assign](){<-}<LSEP>[](symbol){plt}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){tibble}<LEND>[argument 0; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){boosted_pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample_n}<LSEP>[argument 0; litteral](real){2000.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){true_duration}<LSEP>[](symbol){pred_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){plt}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_fixed}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){3000.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){3000.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_abline}<LSEP>[argument 0; litteral](str){red}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){boosted_mod} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){tidyverse}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){car}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){MASS}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Remodeled}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){YearRemodAdd}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){YearBuilt}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){Remodeled}<LSEP>[argument 2; litteral](str){Not Remodeled}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Remodeled}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){YearRemodAdd}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){YearBuilt}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){Remodeled}<LSEP>[argument 2; litteral](str){Not Remodeled}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){MasVnrArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){MasVnrArea}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){MasVnrArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){MasVnrArea}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){MasVnrType}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){MasVnrType}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){MasVnrType}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){MasVnrType}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinSF1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinSF1}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinSF1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinSF1}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinSF2}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinSF2}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinSF2}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinSF2}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtQual}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtQual}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtCond}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtCond}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){PoolQC}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){PoolQC}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PoolQC}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PoolQC}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){MiscFeature}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){MiscFeature}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){MiscFeature}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){MiscFeature}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Alley}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Alley}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Alley}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Alley}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fence}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fence}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Fence}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Fence}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){FireplaceQu}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){FireplaceQu}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){FireplaceQu}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){FireplaceQu}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageType}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageType}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageType}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageType}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageFinish}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageFinish}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageFinish}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageFinish}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageQual}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageQual}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageCond}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageCond}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinType1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinType1}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinType1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinType1}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinType2}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinType2}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinType2}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinType2}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){TotalBsmtSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){TotalBsmtSF}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFullBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFullBath}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtHalfBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtHalfBath}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinType1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinType1}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinType1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinType1}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinType2}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtFinType2}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinType2}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFinType2}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){TotalBsmtSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){TotalBsmtSF}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFullBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtFullBath}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtHalfBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtHalfBath}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageCars}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageCars}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageCars}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageCars}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageArea}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){MSZoning}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){MSZoning}<LEND>[litteral](str){RL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Electrical}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Electrical}<LEND>[litteral](str){SBrkr}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtExposure}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtExposure}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtExposure}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtExposure}<LEND>[litteral](str){None}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Functional}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Functional}<LEND>[litteral](str){Typ}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Functional}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Functional}<LEND>[litteral](str){Typ}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtUnfSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtUnfSF}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Exterior1st}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Exterior1st}<LEND>[litteral](str){VinylSd}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Exterior2nd}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Exterior2nd}<LEND>[litteral](str){VinylSd}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SaleType}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SaleType}<LEND>[litteral](str){WD}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){KitchenQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){KitchenQual}<LEND>[litteral](str){TA}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){TotalSF}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){1stFlrSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){2ndFlrSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){TotalBsmtSF}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){TotalSF}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){1stFlrSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){2ndFlrSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){TotalBsmtSF}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){HasBsmt}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BsmtExposure}<LEND>[argument 1; litteral](str){None}<LEND>[argument 1; litteral](str){No Basement}<LSEP>[argument 2; litteral](str){Has Basement}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){HasBsmt}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BsmtExposure}<LEND>[argument 1; litteral](str){None}<LEND>[argument 1; litteral](str){No Basement}<LSEP>[argument 2; litteral](str){Has Basement}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){HasGarage}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageArea}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){No Garage}<LSEP>[argument 2; litteral](str){Has Garage}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){HasGarage}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageArea}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){No Garage}<LSEP>[argument 2; litteral](str){Has Garage}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageYrBlt}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){GarageYrBlt}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageYrBlt}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){GarageYrBlt}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){HasPool}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){PoolArea}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){No Pool}<LSEP>[argument 2; litteral](str){Pool}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){HasPool}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PoolArea}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){No Pool}<LSEP>[argument 2; litteral](str){Pool}<LEND>[assign](){<-}<LSEP>[](symbol){lambdadf}<LEND>[call](){}<LSEP>[](symbol){boxcox}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SalePrice}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){lambda1}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdadf}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdadf}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdadf}<LSEP>[](symbol){y}<LEND>[assign](){<-}<LSEP>[](symbol){transformSalePrice}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SalePrice}<LEND>[](symbol){lambda1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){lambda1}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){transformSalePrice}<LEND>[](symbol){transformSalePrice}<LEND>[assign](){<-}<LSEP>[](symbol){lambdadfTotalSF}<LEND>[call](){}<LSEP>[](symbol){boxcox}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){TotalSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){TotalSF}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){lambda2}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdadfTotalSF}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdadfTotalSF}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdadfTotalSF}<LSEP>[](symbol){y}<LEND>[assign](){<-}<LSEP>[](symbol){trainTransformTotalSF}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){TotalSF}<LEND>[](symbol){lambda2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){lambda2}<LEND>[assign](){<-}<LSEP>[](symbol){testTranformTotalSF}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){TotalSF}<LEND>[](symbol){lambda2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){lambda2}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){transformTotalSF}<LEND>[](symbol){trainTransformTotalSF}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){transformTotalSF}<LEND>[](symbol){testTranformTotalSF}<LEND>[assign](){<-}<LSEP>[](symbol){lambdaLotArea}<LEND>[call](){}<LSEP>[](symbol){boxcox}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){LotArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){LotArea}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){lambda3}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdaLotArea}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdaLotArea}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){lambdaLotArea}<LSEP>[](symbol){y}<LEND>[assign](){<-}<LSEP>[](symbol){trainTransformLotArea}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){LotArea}<LEND>[](symbol){lambda3}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){lambda3}<LEND>[assign](){<-}<LSEP>[](symbol){testTranformLotArea}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){LotArea}<LEND>[](symbol){lambda3}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){lambda3}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){transformLotArea}<LEND>[](symbol){trainTransformLotArea}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){transformLotArea}<LEND>[](symbol){testTranformLotArea}<LEND>[assign](){<-}<LSEP>[](symbol){lotfrontreg}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){LotFrontage}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Neighborhood}<LSEP>[](symbol){TotalSF}<LEND>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){LotFrontage}<LEND>[argument 2; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){train}<LEND>[argument 1; litteral](str){LotFrontage}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){lotfrontreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){LotFrontage}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){LotFrontage}<LEND>[argument 2; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){test}<LEND>[argument 1; litteral](str){LotFrontage}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){lotfrontreg}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){LotFrontage}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){reg0}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){transformSalePrice}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){regFull}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){transformSalePrice}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){MSZoning}<LSEP>[](symbol){MSSubClass}<LEND>[](symbol){LotFrontage}<LEND>[](symbol){Street}<LEND>[](symbol){Alley}<LEND>[](symbol){LotShape}<LEND>[](symbol){LandContour}<LEND>[](symbol){LotConfig}<LEND>[](symbol){LandSlope}<LEND>[](symbol){BldgType}<LEND>[](symbol){Neighborhood}<LEND>[](symbol){Condition1}<LEND>[](symbol){Condition2}<LEND>[](symbol){BldgType}<LEND>[](symbol){HouseStyle}<LEND>[](symbol){OverallQual}<LEND>[](symbol){OverallCond}<LEND>[](symbol){YearBuilt}<LEND>[](symbol){YearRemodAdd}<LEND>[](symbol){RoofStyle}<LEND>[](symbol){RoofMatl}<LEND>[](symbol){Exterior1st}<LEND>[](symbol){Exterior2nd}<LEND>[](symbol){MasVnrType}<LEND>[](symbol){MasVnrArea}<LEND>[](symbol){ExterQual}<LEND>[](symbol){ExterCond}<LEND>[](symbol){Foundation}<LEND>[](symbol){BsmtQual}<LEND>[](symbol){BsmtCond}<LEND>[](symbol){BsmtExposure}<LEND>[](symbol){BsmtFinType1}<LEND>[](symbol){BsmtFinType2}<LEND>[](symbol){BsmtFinSF2}<LEND>[](symbol){BsmtUnfSF}<LEND>[](symbol){TotalBsmtSF}<LEND>[](symbol){Heating}<LEND>[](symbol){HeatingQC}<LEND>[](symbol){CentralAir}<LEND>[](symbol){Electrical}<LEND>[](symbol){1stFlrSF}<LEND>[](symbol){2ndFlrSF}<LEND>[](symbol){LowQualFinSF}<LEND>[](symbol){GrLivArea}<LEND>[](symbol){BsmtFullBath}<LEND>[](symbol){BsmtHalfBath}<LEND>[](symbol){FullBath}<LEND>[](symbol){HalfBath}<LEND>[](symbol){BedroomAbvGr}<LEND>[](symbol){KitchenAbvGr}<LEND>[](symbol){TotRmsAbvGrd}<LEND>[](symbol){Functional}<LEND>[](symbol){Fireplaces}<LEND>[](symbol){FireplaceQu}<LEND>[](symbol){GarageType}<LEND>[](symbol){GarageYrBlt}<LEND>[](symbol){GarageFinish}<LEND>[](symbol){GarageCars}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){HasGarage}<LSEP>[](symbol){GarageArea}<LEND>[](symbol){GarageQual}<LEND>[](symbol){GarageCond}<LEND>[](symbol){PavedDrive}<LEND>[](symbol){WoodDeckSF}<LEND>[](symbol){OpenPorchSF}<LEND>[](symbol){EnclosedPorch}<LEND>[](symbol){3SsnPorch}<LEND>[](symbol){ScreenPorch}<LEND>[](symbol){PoolArea}<LEND>[](symbol){PoolQC}<LEND>[](symbol){Fence}<LEND>[](symbol){MiscFeature}<LEND>[](symbol){MiscVal}<LEND>[](symbol){MoSold}<LEND>[](symbol){YrSold}<LEND>[](symbol){SaleType}<LEND>[](symbol){SaleCondition}<LEND>[](symbol){Remodeled}<LEND>[](symbol){HasBsmt}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){HasGarage}<LSEP>[](symbol){GarageYrBlt}<LEND>[](symbol){GarageArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){HasGarage}<LSEP>[](symbol){GarageArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){HasPool}<LSEP>[](symbol){PoolArea}<LEND>[](symbol){transformTotalSF}<LEND>[](symbol){transformLotArea}<LEND>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){reg.fwd}<LEND>[call](){}<LSEP>[](symbol){step}<LSEP>[](symbol){reg0}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){reg0}<LSEP>[](symbol){regFull}<LEND>[argument 2; litteral](str){forward}<LEND>[assign](){<-}<LSEP>[](symbol){prediction}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){reg.fwd}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){prediction}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lambda1}<LSEP>[](symbol){prediction}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){lambda1}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[](symbol){prediction}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){submission}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){Id}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){submission}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){SalePrice}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){submission6}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[assign](){=}<LSEP>[](symbol){Survival_Tree}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){SibSp}<LEND>[](symbol){Parch}<LEND>[](symbol){Age}<LEND>[](symbol){Embarked}<LEND>[](symbol){train}<LSEP>[](symbol){na.omit}<LEND>[](symbol){Survival_Tree}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){Survival_Tree}<LEND>[call](){}<LSEP>[](symbol){importance}<LSEP>[](symbol){Survival_Tree}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){levels}<LEND>[assign](){=}<LSEP>[](symbol){prediction}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){Survival_Tree}<LSEP>[](symbol){test}<LEND>[](symbol){prediction}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[](symbol){prediction}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PassengerId}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){First_Forest_Predict.csv} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[assign](){<-}<LSEP>[](symbol){pathToFiles}<LSEP>[litteral](str){../input/}<LEND>[assign](){<-}<LSEP>[](symbol){numberOfRowsToRead}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){55446.000000}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train}<LEND>[call](){}<LSEP>[](symbol){read.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){pathToFiles}<LSEP>[argument 1; litteral](str){train.csv}<LEND>[](symbol){T}<LSEP>[argument 2; litteral](str){,}<LSEP>[](symbol){numberOfRowsToRead}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train}<LEND>[call](){}<LSEP>[](symbol){as.data.table}<LSEP>[](symbol){dt.train}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LSEP>[argument 1; litteral](str){y}<LSEP>[argument 2; litteral](str){time}<LSEP>[argument 3; litteral](str){place_id}<LSEP>[argument 4; litteral](str){accuracy}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){0}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){0}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){time}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){place_id}<LEND>[](symbol){accuracy}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){coordinates}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){coordinates}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){coordinates}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LSEP>[argument 1; litteral](str){y}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train.summary}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){accuracy}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){coordinates}<LSEP>[](symbol){place_id}<LSEP>[](symbol){time}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train.top.coordinates}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train.summary}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){coordinates}<LSEP>[argument 1; litteral](str){transactionsNumber}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train.top.coordinates}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train.top.coordinates}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){transactionsNumber}<LEND>[](symbol){coordinates}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train.top.coordinates}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train.top.coordinates}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){transactionsNumber}<LEND>[assign](){<-}<LSEP>[](symbol){topCoordinate}<LEND>[call](){}<LSEP>[](symbol){as.vector}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dt.train.top.coordinates}<LSEP>[](symbol){coordinates}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){topCoordinate}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train.summary.subset}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train.summary}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){coordinates}<LSEP>[](symbol){topCoordinate}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){reshape2}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train.summary.subset.wide}<LEND>[call](){}<LSEP>[](symbol){as.data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){dcast}<LSEP>[](symbol){dt.train.summary.subset}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){coordinates}<LSEP>[](symbol){time}<LEND>[](symbol){place_id}<LEND>[argument 2; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){dt.train.summary.subset.wide.operations}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train.summary.subset.wide}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train.summary.subset.wide.operations}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){totalOperations}<LEND>[argument 1; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){dt.train.summary.subset.wide.operations}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train.summary.subset.wide}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){totalOperations}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dt.train.summary.subset.wide.operations}<LSEP>[](symbol){totalOperations}<LEND>[assign](){<-}<LSEP>[](symbol){trainProportion}<LSEP>[litteral](real){0.750000}<LEND>[assign](){<-}<LSEP>[](symbol){smp_size}<LEND>[call](){}<LSEP>[](symbol){floor}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){trainProportion}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){dt.train.summary.subset.wide}<LEND>[assign](){<-}<LSEP>[](symbol){train_ind}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){dt.train.summary.subset.wide}<LEND>[](symbol){smp_size}<LEND>[assign](){<-}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dt.train.summary.subset.wide}<LSEP>[](symbol){totalOperations}<LEND>[assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt.train.summary.subset.wide}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){totalOperations}<LSEP>[argument 1; litteral](str){coordinates}<LSEP>[argument 2; litteral](str){time}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){y_train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Y}<LSEP>[](symbol){train_ind}<LEND>[assign](){<-}<LSEP>[](symbol){y_test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Y}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){train_ind}<LEND>[assign](){<-}<LSEP>[](symbol){x_train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){train_ind}<LEND>[assign](){<-}<LSEP>[](symbol){x_test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){train_ind}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){glmnet}<LEND>[assign](){<-}<LSEP>[](symbol){mod.en.cv}<LEND>[call](){}<LSEP>[](symbol){cv.glmnet}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){x_train}<LEND>[](symbol){y_train}<LSEP>[argument 2; litteral](real){0.500000}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){mod.en.cv}<LEND>[assign](){=}<LSEP>[](symbol){en.pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){mod.en.cv}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){x_test}<LEND>[argument 2; litteral](str){lambda.min}<LEND>[assign](){=}<LSEP>[](symbol){en.mse}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){en.pred}<LSEP>[](symbol){y_test}<LEND>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){MSE_ols absolute = %.3f}<LSEP>[](symbol){en.mse}<LEND>[assign](){=}<LSEP>[](symbol){en.mse}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LSEP>[](symbol){en.mse}<LEND>[argument 1; call](){}<LSEP>[](symbol){median}<LSEP>[](symbol){y_test}<LEND>[call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){MSE_ols relative = %.3f}<LSEP>[](symbol){en.mse}<LEND>[assign](){<-}<LSEP>[](symbol){get_glmnet_coefs}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){cvfit}<LSEP>[](symbol){s}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){ind}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){coef}<LSEP>[](symbol){cvfit}<LSEP>[](symbol){s}<LEND>[argument 1; litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rownames}<LEND>[argument 0; call](){}<LSEP>[](symbol){coef}<LSEP>[](symbol){cvfit}<LSEP>[](symbol){s}<LEND>[](symbol){ind}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){coef}<LSEP>[](symbol){cvfit}<LSEP>[](symbol){s}<LEND>[](symbol){ind}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){coeficient}<LEND>[](symbol){df}<LEND>[assign](){<-}<LSEP>[](symbol){mod.en.coefficients}<LEND>[call](){}<LSEP>[](symbol){get_glmnet_coefs}<LSEP>[](symbol){mod.en.cv}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){mod.en.coefficients}<LSEP>[argument 1; litteral](real){50.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){tail}<LSEP>[](symbol){mod.en.coefficients}<LSEP>[argument 1; litteral](real){50.000000} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){h2o}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){Read in raw data}<LEND>[assign](){<-}<LSEP>[](symbol){properties}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/properties_2016.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){50.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/train_2016_v2.csv}<LEND>[assign](){<-}<LSEP>[](symbol){training}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){properties}<LSEP>[](symbol){train}<LSEP>[argument 2; litteral](str){parcelid}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){h2o.init}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](str){8g}<LEND>[assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){training}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){training}<LEND>[argument 1; litteral](str){logerror}<LEND>[assign](){<-}<LSEP>[](symbol){y}<LSEP>[litteral](str){logerror}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){as.h2o}<LSEP>[](symbol){training}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){as.h2o}<LSEP>[](symbol){properties}<LEND>[assign](){<-}<LSEP>[](symbol){nfolds}<LSEP>[litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){eta_opt}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.100000}<LSEP>[argument 1; litteral](real){0.037000}<LSEP>[argument 2; litteral](real){0.001000}<LEND>[assign](){<-}<LSEP>[](symbol){max_depth_opt}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){sample_rate_opt}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.800000}<LEND>[assign](){<-}<LSEP>[](symbol){col_sample_rate_opt}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.200000}<LSEP>[argument 1; litteral](real){0.600000}<LSEP>[argument 2; litteral](real){0.900000}<LEND>[assign](){<-}<LSEP>[](symbol){hyper_params}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){eta_opt}<LSEP>[](symbol){max_depth_opt}<LSEP>[](symbol){sample_rate_opt}<LSEP>[](symbol){col_sample_rate_opt}<LEND>[assign](){<-}<LSEP>[](symbol){search_criteria}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){Cartesian}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_grid}<LEND>[call](){}<LSEP>[](symbol){h2o.grid}<LSEP>[argument 0; litteral](str){xgboost}<LSEP>[argument 1; litteral](str){xgb_grid_gaussian}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){train}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[](symbol){nfolds}<LSEP>[argument 7; litteral](real){50.000000}<LSEP>[argument 8; litteral](str){Modulo}<LSEP>[argument 9; litteral](logical){TRUE}<LSEP>[](symbol){hyper_params}<LSEP>[](symbol){search_criteria}<LEND>[assign](){<-}<LSEP>[](symbol){ensemble}<LEND>[call](){}<LSEP>[](symbol){h2o.stackedEnsemble}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LSEP>[](symbol){train}<LSEP>[argument 3; litteral](str){ensemble_xgb_grid_gaussian}<LEND>[argument 4; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){xgb_grid}<LSEP>[](symbol){model_ids}<LEND>[assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){h2o.predict}<LSEP>[](symbol){ensemble}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.vector}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){properties}<LSEP>[](symbol){parcelid}<LEND>[](symbol){predictions}<LSEP>[](symbol){predictions}<LSEP>[](symbol){predictions}<LSEP>[](symbol){predictions}<LSEP>[](symbol){predictions}<LSEP>[](symbol){predictions}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){parcelid}<LSEP>[argument 1; litteral](str){201610}<LSEP>[argument 2; litteral](str){201611}<LSEP>[argument 3; litteral](str){201612}<LSEP>[argument 4; litteral](str){201710}<LSEP>[argument 5; litteral](str){201711}<LSEP>[argument 6; litteral](str){201712}<LEND>[call](){}<LSEP>[](symbol){options}<LSEP>[argument 0; litteral](real){999.000000}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){submission_xgb_ensemble_gridET...}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rpart}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){suppressPackageStartupMessages}<LEND>[argument 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Metrics}<LEND>[call](){}<LSEP>[](symbol){suppressPackageStartupMessages}<LEND>[argument 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){suppressPackageStartupMessages}<LEND>[argument 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rpart.plot}<LEND>[assign](){<-}<LSEP>[](symbol){full_training}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test_set}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){inTrain}<LEND>[call](){}<LSEP>[](symbol){createDataPartition}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full_training}<LSEP>[](symbol){SalePrice}<LEND>[argument 1; litteral](real){0.900000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){train_set}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full_training}<LSEP>[](symbol){inTrain}<LSEP>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){cv_set}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full_training}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){inTrain}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){c}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train_set}<LEND>[assign](){<-}<LSEP>[](symbol){pvalues}<LEND>[call](){}<LSEP>[](symbol){numeric}<LSEP>[](symbol){c}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){c}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_set}<LSEP>[](symbol){SalePrice}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_set}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){summ}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pvalues}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){summ}<LSEP>[](symbol){coefficients}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[](symbol){ord}<LEND>[call](){}<LSEP>[](symbol){order}<LSEP>[](symbol){pvalues}<LEND>[assign](){<-}<LSEP>[](symbol){ord}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[assign](){<-}<LSEP>[](symbol){x10}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_set}<LSEP>[](symbol){}<LSEP>[](symbol){ord}<LEND>[call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){x10}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){cor}<LSEP>[](symbol){x10}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){model_rf}<LEND>[call](){}<LSEP>[](symbol){rpart}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){SalePrice}<LSEP>[](symbol){.}<LEND>[](symbol){x10}<LEND>[assign](){<-}<LSEP>[](symbol){cv_prediction_set}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model_rf}<LSEP>[](symbol){cv_set}<LEND>[assign](){<-}<LSEP>[](symbol){rmse}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cv_set}<LSEP>[](symbol){SalePrice}<LEND>[](symbol){cv_prediction_set}<LEND>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){The root mean square error is}<LSEP>[](symbol){rmse}<LSEP>[argument 2; litteral](str){ }<LEND>[assign](){<-}<LSEP>[](symbol){log_error}<LEND>[call](){}<LSEP>[](symbol){rmsle}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cv_set}<LSEP>[](symbol){SalePrice}<LEND>[](symbol){cv_prediction_set}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){The root mean square log error is}<LSEP>[](symbol){log_error}<LSEP>[argument 2; litteral](str){ }<LEND>[call](){}<LSEP>[](symbol){rpart.plot}<LSEP>[](symbol){model_rf}<LEND>[assign](){<-}<LSEP>[](symbol){test_set_predictions}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model_rf}<LSEP>[](symbol){test_set}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){test_set_predictions}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_set}<LSEP>[](symbol){Id}<LEND>[](symbol){test_set_predictions}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){test_set_predictions}<LSEP>[argument 1; litteral](str){test_set_predictions.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Survived}<LSEP>[argument 1; litteral](str){Died}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){1st Class}<LSEP>[argument 1; litteral](str){2nd Class}<LSEP>[argument 2; litteral](str){3rd Class}<LEND>[call](){}<LSEP>[](symbol){png}<LSEP>[argument 0; litteral](str){1_survival_by_class.png}<LSEP>[argument 1; litteral](real){800.000000}<LSEP>[argument 2; litteral](real){600.000000}<LEND>[call](){}<LSEP>[](symbol){mosaicplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){Passenger Survival by Class}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){#8dd3c7}<LSEP>[argument 1; litteral](str){#fb8072}<LEND>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](str){}<LSEP>[argument 5; litteral](str){}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 7; litteral](real){1.400000}<LEND>[call](){}<LSEP>[](symbol){dev.off} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){e1071}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){randomForest}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){nnet}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){xgboost}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](str){,}<LEND>[assign](){<-}<LSEP>[](symbol){train_original}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){[^a-z]}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AgeuponOutcome}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){[^0-9]}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AgeuponOutcome}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScaledValue}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){day}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){days}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){day}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){days}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){month}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){months}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){month}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){months}<LEND>[argument 1; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){week}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){weeks}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){week}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){weeks}<LEND>[argument 1; litteral](real){7.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){year}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){years}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){year}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){years}<LEND>[argument 1; litteral](real){365.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SexuponOutcome}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SexuponOutcome}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){Unknown}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SexuponOutcome}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SexuponOutcome}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){month}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){%Y-%m-%d}<LEND>[argument 1; litteral](str){%m}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){year}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){%Y-%m-%d}<LEND>[argument 1; litteral](str){%Y}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){hour}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){strptime}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[argument 1; litteral](str){%Y-%m-%d %H:%M:%S}<LEND>[argument 1; litteral](str){%H}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){strptime}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[argument 1; litteral](str){%Y-%m-%d %H:%M:%S}<LEND>[argument 1; litteral](str){%M}<LEND>[argument 1; litteral](real){60.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){week}<LEND>[call](){}<LSEP>[](symbol){%/%}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){day}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){weekday}<LEND>[call](){}<LSEP>[](symbol){weekdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){DateTime}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){weekday}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){weekday}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Breed}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){ .*$}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){/.*$}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[](symbol){a}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){a}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){BreedMod}<LSEP>[argument 1; litteral](str){freq}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){a}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){freq}<LEND>[argument 1; litteral](real){50.000000}<LEND>[litteral](str){Other}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){freq}<LEND>[argument 1; litteral](real){11.000000}<LEND>[litteral](str){Rare}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){NameAvailability}<LEND>[litteral](str){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){NameAvailability}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Name}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){NameAvailability}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){NameAvailability}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){mixNoMix}<LEND>[call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Mix}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Breed}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){mixNoMix}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){mixNoMix}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[litteral](str){Other}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){White}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){White}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Black}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){Black}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Yellow}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){Yellow}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Orange}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){Orange}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Red}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){Red}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Calico}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){Calico}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Brown}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){Brown}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Blue}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){Blue}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorNew}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorSingleDual}<LEND>[litteral](str){Single}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorSingleDual}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){/}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Color}<LEND>[litteral](str){Dual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorSingleDual}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){colorSingleDual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){breedSingleDual}<LEND>[litteral](str){Single}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){breedSingleDual}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){/}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Breed}<LEND>[litteral](str){Dual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){breedSingleDual}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){breedSingleDual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){sexMaleFemale}<LEND>[litteral](str){Unknown}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){sexMaleFemale}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Male}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SexuponOutcome}<LEND>[litteral](str){Male}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){sexMaleFemale}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Female}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SexuponOutcome}<LEND>[litteral](str){Female}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){sexMaleFemale}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){sexMaleFemale}<LEND>[assign](){<-}<LSEP>[](symbol){index}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.800000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){train1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){index}<LSEP>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){test1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){index}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){rf}<LEND>[call](){}<LSEP>[](symbol){svm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){OutcomeType}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){AnimalType}<LSEP>[](symbol){month}<LEND>[](symbol){week}<LEND>[](symbol){hour}<LEND>[](symbol){NameAvailability}<LEND>[](symbol){mixNoMix}<LEND>[](symbol){weekday}<LEND>[](symbol){AUOCScaledValue}<LEND>[](symbol){SexuponOutcome}<LEND>[](symbol){freq}<LEND>[](symbol){train1}<LEND>[](symbol){rf}<LEND>[assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf}<LSEP>[](symbol){test1}<LEND>[assign](){<-}<LSEP>[](symbol){acc}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test1}<LSEP>[](symbol){OutcomeType}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test1}<LEND>[](symbol){acc}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](str){,}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){[^a-z]}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AgeuponOutcome}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){[^0-9]}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AgeuponOutcome}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScaledValue}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){day}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){days}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){day}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){days}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){month}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){months}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){month}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){months}<LEND>[argument 1; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){week}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){weeks}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){week}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){weeks}<LEND>[argument 1; litteral](real){7.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){year}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){years}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){year}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScale}<LEND>[argument 1; litteral](str){years}<LEND>[argument 1; litteral](real){365.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCScaledValue}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AUOCTimeUnscaledValue}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SexuponOutcome}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SexuponOutcome}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){Unknown}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SexuponOutcome}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SexuponOutcome}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){month}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){DateTime}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){%Y-%m-%d}<LEND>[argument 1; litteral](str){%m}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){year}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){DateTime}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){%Y-%m-%d}<LEND>[argument 1; litteral](str){%Y}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){hour}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){strptime}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){DateTime}<LEND>[argument 1; litteral](str){%Y-%m-%d %H:%M:%S}<LEND>[argument 1; litteral](str){%H}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){hour}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){strptime}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){DateTime}<LEND>[argument 1; litteral](str){%Y-%m-%d %H:%M:%S}<LEND>[argument 1; litteral](str){%M}<LEND>[argument 1; litteral](real){60.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){week}<LEND>[call](){}<LSEP>[](symbol){%/%}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){DateTime}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){DateTime}<LEND>[argument 1; litteral](real){7.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){weekday}<LEND>[call](){}<LSEP>[](symbol){weekdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){DateTime}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){weekday}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){weekday}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Breed}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){ .*$}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){/.*$}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[](symbol){a}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){a}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){BreedMod}<LSEP>[argument 1; litteral](str){freq}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){a}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){freq}<LEND>[argument 1; litteral](real){50.000000}<LEND>[litteral](str){Other}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){freq}<LEND>[argument 1; litteral](real){11.000000}<LEND>[litteral](str){Rare}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){NameAvailability}<LEND>[litteral](str){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){NameAvailability}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Name}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){NameAvailability}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){NameAvailability}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){mixNoMix}<LEND>[call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Mix}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Breed}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){mixNoMix}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){mixNoMix}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[litteral](str){Other}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){White}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){White}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Black}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){Black}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Yellow}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){Yellow}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Orange}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){Orange}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Red}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){Red}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Calico}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){Calico}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Brown}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){Brown}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Blue}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){Blue}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorNew}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorSingleDual}<LEND>[litteral](str){Single}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorSingleDual}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){/}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Color}<LEND>[litteral](str){Dual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorSingleDual}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){colorSingleDual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){breedSingleDual}<LEND>[litteral](str){Single}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){breedSingleDual}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){/}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Breed}<LEND>[litteral](str){Dual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){breedSingleDual}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){breedSingleDual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){sexMaleFemale}<LEND>[litteral](str){Unknown}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){sexMaleFemale}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Male}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SexuponOutcome}<LEND>[litteral](str){Male}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){sexMaleFemale}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[argument 0; litteral](str){Female}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SexuponOutcome}<LEND>[litteral](str){Female}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){sexMaleFemale}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){sexMaleFemale}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){BreedMod}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){BreedMod}<LEND>[assign](){<-}<LSEP>[](symbol){final_pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf}<LSEP>[](symbol){test}<LSEP>[argument 2; litteral](str){prob}<LEND>[assign](){<-}<LSEP>[](symbol){tlabels}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train1}<LSEP>[](symbol){OutcomeType}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xgbtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){AnimalType}<LSEP>[argument 1; litteral](str){month}<LSEP>[argument 2; litteral](str){week}<LSEP>[argument 3; litteral](str){hour}<LSEP>[argument 4; litteral](str){NameAvailability}<LSEP>[argument 5; litteral](str){mixNoMix}<LSEP>[argument 6; litteral](str){AUOCScaledValue}<LSEP>[argument 7; litteral](str){weekday}<LSEP>[argument 8; litteral](str){SexuponOutcome}<LSEP>[argument 9; litteral](str){freq}<LEND>[](symbol){tlabels}<LSEP>[argument 2; litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[](symbol){xgbmodel}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LSEP>[](symbol){xgbtrain}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){7.000000}<LSEP>[argument 3; litteral](real){0.150000}<LSEP>[argument 4; litteral](real){0.500000}<LSEP>[argument 5; litteral](real){100.000000}<LSEP>[argument 6; litteral](str){multi:softprob}<LSEP>[argument 7; litteral](str){mlogloss}<LSEP>[argument 8; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){xgbtest}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){AnimalType}<LSEP>[argument 1; litteral](str){month}<LSEP>[argument 2; litteral](str){week}<LSEP>[argument 3; litteral](str){hour}<LSEP>[argument 4; litteral](str){NameAvailability}<LSEP>[argument 5; litteral](str){mixNoMix}<LSEP>[argument 6; litteral](str){AUOCScaledValue}<LSEP>[argument 7; litteral](str){weekday}<LSEP>[argument 8; litteral](str){SexuponOutcome}<LSEP>[argument 9; litteral](str){freq}<LEND>[argument 1; litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[](symbol){xgbpred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgbmodel}<LSEP>[](symbol){xgbtest}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_preds}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){xgbpred}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){xgbpred}<LEND>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){xgb_preds}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Adoption}<LSEP>[argument 1; litteral](str){Died}<LSEP>[argument 2; litteral](str){Euthanasia}<LSEP>[argument 3; litteral](str){Return_to_owner}<LSEP>[argument 4; litteral](str){Transfer}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){xgb_preds}<LSEP>[argument 1; litteral](str){ID}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](str){ID}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){xgb_preds}<LEND>[assign](){<-}<LSEP>[](symbol){ave_pred}<LSEP>[](symbol){xgb_preds}<LEND>[assign](){<-}<LSEP>[](symbol){ave_pred}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ave_pred}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){ave_pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){final_pred}<LEND>[assign](){<-}<LSEP>[](symbol){finOutput}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){finOutput}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){finOutput}<LSEP>[](symbol){ID}<LEND>[assign](){<-}<LSEP>[](symbol){finOutput}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){finOutput}<LSEP>[](symbol){output}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){finOutput}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){ID}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){finOutput}<LSEP>[argument 1; litteral](str){myresult_v2.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggmap}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[assign](){<-}<LSEP>[](symbol){crime}<LSEP>[litteral](str){PROSTITUTION}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv.zip}<LEND>[assign](){<-}<LSEP>[](symbol){map}<LEND>[call](){}<LSEP>[](symbol){readRDS}<LSEP>[argument 0; litteral](str){../input/sf_map_copyright_open...}<LEND>[assign](){<-}<LSEP>[](symbol){counts}<LEND>[call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){train}<LSEP>[](symbol){Category}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){Category}<LEND>[assign](){<-}<LSEP>[](symbol){counts}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){counts}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){counts}<LSEP>[](symbol){Counts}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){counts}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){counts}<LSEP>[](symbol){Category}<LEND>[argument 1; litteral](str){PROSTITUTION}<LEND>[](symbol){}<LEND>[](symbol){Counts}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){count} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){suppressMessages}<LEND>[argument 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){suppressMessages}<LEND>[argument 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){aspace}<LEND>[assign](){<-}<LSEP>[](symbol){haversine}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){lat1}<LSEP>[](symbol){lng1}<LSEP>[](symbol){lat2}<LSEP>[](symbol){lng2}<LSEP>[](symbol){miles}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){lat1}<LEND>[call](){}<LSEP>[](symbol){as_radians}<LSEP>[](symbol){lat1}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){lat2}<LEND>[call](){}<LSEP>[](symbol){as_radians}<LSEP>[](symbol){lat2}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){lng1}<LEND>[call](){}<LSEP>[](symbol){as_radians}<LSEP>[](symbol){lng1}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){lng2}<LEND>[call](){}<LSEP>[](symbol){as_radians}<LSEP>[](symbol){lng2}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){lat}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){lat2}<LSEP>[](symbol){lat1}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){lng}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){lng2}<LSEP>[](symbol){lng1}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){lat}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){cos}<LSEP>[](symbol){lat1}<LEND>[argument 1; call](){}<LSEP>[](symbol){cos}<LSEP>[](symbol){lat2}<LEND>[argument 1; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){sin}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){lng}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){6371.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){asin}<LEND>[argument 0; call](){}<LSEP>[](symbol){sqrt}<LSEP>[](symbol){d}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){miles}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){h}<LSEP>[argument 1; litteral](real){0.621371}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){miles}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){h}<LEND>[assign](){<-}<LSEP>[](symbol){weighted_trip_length}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){trip_gifts}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){90.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){gifts}<LSEP>[](symbol){trip_gifts}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){trip_gifts}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[argument 0; litteral](real){90.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){trip_gifts}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){r}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LSEP>[](symbol){Weight}<LEND>[argument 1; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LSEP>[](symbol){r}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){lead}<LSEP>[](symbol){Latitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){lead}<LSEP>[](symbol){Longitude}<LEND>[argument 2; call](){}<LSEP>[](symbol){lead}<LSEP>[](symbol){TotalWeight}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){haversine}<LSEP>[](symbol){Latitude}<LSEP>[](symbol){Longitude}<LSEP>[](symbol){Latitude_next}<LSEP>[](symbol){Longitude_next}<LEND>[argument 1; call](){}<LSEP>[](symbol){na.omit}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){Distance}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){x}<LSEP>[](symbol){W}<LEND>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){gifts}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/gifts.csv}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){294.000000}<LEND>[assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){kmeans}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){gifts}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){5300.000000}<LSEP>[argument 2; litteral](real){40.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){gifts}<LSEP>[](symbol){TripId}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){cluster}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){gifts}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){gifts}<LSEP>[](symbol){Weight}<LEND>[argument 1; call](){}<LSEP>[](symbol){haversine}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){gifts}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){gifts}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 2; litteral](real){90.000000}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[assign](){=}<LSEP>[](symbol){dist}<LSEP>[litteral](real){0.000000}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){TripId}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){dist}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){dist}<LEND>[argument 1; call](){}<LSEP>[](symbol){weighted_trip_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){GiftId}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){TripId}<LEND>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){dist}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){submission.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){test.survived}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){None}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){col_idx}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){PassengerId}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){test.survived}<LEND>[assign](){<-}<LSEP>[](symbol){test.survived}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test.survived}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){col_idx}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){test.survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){col_idx}<LEND>[assign](){<-}<LSEP>[](symbol){data.combined}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){train}<LSEP>[](symbol){test.survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){data.combined}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Total Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Name}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Name}<LEND>[assign](){<-}<LSEP>[](symbol){dup.names}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){duplicated}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Name}<LEND>[argument 2; litteral](str){Name}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Name}<LEND>[](symbol){dup.names}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[assign](){<-}<LSEP>[](symbol){misses}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){str_detect}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Name}<LEND>[argument 1; litteral](str){Miss. }<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){misses}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){mrses}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){str_detect}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Name}<LEND>[argument 1; litteral](str){Mrs. }<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){mrses}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){males}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){male}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){males}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){extractTitle}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){name}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){name}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Miss.}<LSEP>[](symbol){name}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](str){Miss.}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Master.}<LSEP>[](symbol){name}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](str){Master.}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Mrs.}<LSEP>[](symbol){name}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](str){Mrs.}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Mr.}<LSEP>[](symbol){name}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](str){Mr.}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](str){Other}<LEND>[assign](){<-}<LSEP>[](symbol){titles}<LSEP>[litteral](NULL){NULL}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){data.combined}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){titles}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){titles}<LEND>[argument 1; call](){}<LSEP>[](symbol){extractTitle}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){i}<LSEP>[argument 2; litteral](str){Name}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){titles}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Title}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Total Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Sex}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Sex}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Total Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Age}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Total Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Gender and Class}<LEND>[assign](){<-}<LSEP>[](symbol){boys}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Master.}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){boys}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[](symbol){misses}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Miss.}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){misses}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){misses}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){misses}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){None}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Age}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LSEP>[argument 0; litteral](real){5.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Total Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Age of Misses by Class}<LEND>[assign](){<-}<LSEP>[](symbol){misses.alone}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){misses}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){misses}<LSEP>[](symbol){SibSp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){misses}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){misses.alone}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){misses.alone}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){14.500000}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){SibSp}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){SibSp}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){SibSp}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){SibSp}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){SibSp}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Class and Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){SibSp}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){300.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Parch}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Parch}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Parch}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Class and Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){ParCh}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){300.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived}<LEND>[assign](){<-}<LSEP>[](symbol){temp.sibsp}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SibSp}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SibSp}<LEND>[assign](){<-}<LSEP>[](symbol){temp.parch}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Parch}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Parch}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data.combined}<LSEP>[](symbol){Family}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){temp.sibsp}<LSEP>[](symbol){temp.parch}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Family}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Class and Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Family Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Total Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){300.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data.combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Family}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Class and Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Family Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Total Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){70.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Survived} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[assign](){<-}<LSEP>[](symbol){dat_train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){dat_test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dat_test}<LSEP>[](symbol){TARGET}<LEND>[litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[](symbol){all_dat}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){dat_train}<LSEP>[](symbol){dat_test}<LEND>[assign](){<-}<LSEP>[](symbol){train_names}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){dat_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LSEP>[](symbol){train_names}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){all_dat}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](str){integer}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){u}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){all_dat}<LSEP>[](symbol){i}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){u}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){all_dat}<LSEP>[](symbol){i}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){train_names}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){all_dat}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){fac}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){integer}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){train_names}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){train_names}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){train_names}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){identical}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){all_dat}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){all_dat}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fac}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){fac}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){k}<LEND>[assign](){<-}<LSEP>[](symbol){same}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fac}<LSEP>[](symbol){fac}<LEND>[assign](){<-}<LSEP>[](symbol){all_dat}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){all_dat}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){same}<LEND>[assign](){<-}<LSEP>[](symbol){cor_v}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){cor}<LSEP>[](symbol){all_dat}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){diag}<LSEP>[](symbol){cor_v}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cor_v}<LEND>[argument 1; call](){}<LSEP>[](symbol){upper.tri}<LSEP>[](symbol){cor_v}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){cor_f}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){cor_v}<LSEP>[argument 1; litteral](real){0.850000}<LEND>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){all_dat}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){all_dat}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){cor_f}<LSEP>[](symbol){row}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){all_dat}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){dat_train}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){all_dat}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){dat_train}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){88.000000}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){binary:logistic}<LSEP>[argument 1; litteral](str){gbtree}<LSEP>[argument 2; litteral](str){auc}<LSEP>[argument 3; litteral](real){0.850000}<LSEP>[argument 4; litteral](real){0.950000}<LEND>[assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){TARGET}<LEND>[assign](){<-}<LSEP>[](symbol){xgbmodel}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){151.000000}<LEND>[](symbol){param}<LSEP>[argument 2; litteral](real){310.000000}<LSEP>[argument 3; litteral](real){5.000000}<LSEP>[argument 4; litteral](real){0.030000}<LSEP>[](symbol){y}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgbmodel}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){151.000000}<LEND>[assign](){<-}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){ID}<LEND>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){res}<LSEP>[argument 1; litteral](str){submission.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lubridate}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){DMwR}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ROSE}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rpart}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rpart.plot}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){e1071}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){gridExtra}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/train_sample.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){colSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){colSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){train}<LSEP>[argument 1; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){is_attributed}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){attributed_time}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){click_time}<LEND>[call](){}<LSEP>[](symbol){as.POSIXct}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){click_time}<LEND>[argument 1; litteral](str){%Y-%m-%d %H:%M}<LSEP>[argument 2; litteral](str){America/New_York}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){year}<LEND>[call](){}<LSEP>[](symbol){year}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){click_time}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){month}<LEND>[call](){}<LSEP>[](symbol){month}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){click_time}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){days}<LEND>[call](){}<LSEP>[](symbol){weekdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){click_time}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){hour}<LEND>[call](){}<LSEP>[](symbol){hour}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){click_time}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){click_time}<LEND>[litteral](NULL){NULL}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){train}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LSEP>[](symbol){x}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){month}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){year}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){is_attributed}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){is_attributed}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){days}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){days}<LEND>[assign](){=}<LSEP>[](symbol){p1}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){app}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Application ID v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){App ID}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p2}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){app}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){50.000000}<LSEP>[argument 2; litteral](real){100.000000}<LSEP>[argument 3; litteral](real){200.000000}<LSEP>[argument 4; litteral](real){300.000000}<LSEP>[argument 5; litteral](real){400.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Application ID v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){App ID}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p3}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){app}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_violin}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Application ID v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){App ID}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){p1}<LSEP>[](symbol){p2}<LSEP>[](symbol){p3}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){2.000000}<LEND>[assign](){=}<LSEP>[](symbol){p4}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){os}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Os version v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){OS version}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p5}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){os}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){50.000000}<LSEP>[argument 2; litteral](real){100.000000}<LSEP>[argument 3; litteral](real){200.000000}<LSEP>[argument 4; litteral](real){300.000000}<LSEP>[argument 5; litteral](real){400.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Os version v/s Is_attributed }<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Os version}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p6}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){os}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_violin}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Os version v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Os version}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){p4}<LSEP>[](symbol){p5}<LSEP>[](symbol){p6}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){2.000000}<LEND>[assign](){=}<LSEP>[](symbol){p7}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){ip}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){IP Address v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Ip Adresss of click}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p8}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){ip}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){50.000000}<LSEP>[argument 2; litteral](real){100.000000}<LSEP>[argument 3; litteral](real){200.000000}<LSEP>[argument 4; litteral](real){300.000000}<LSEP>[argument 5; litteral](real){400.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){IP Address v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Ip Adresss of click}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p9}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){ip}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_violin}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){IP Address v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Ip Adresss of click}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){p7}<LSEP>[](symbol){p8}<LSEP>[](symbol){p9}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){2.000000}<LEND>[assign](){=}<LSEP>[](symbol){p10}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){device}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Device type v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Device Type ID}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p11}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){device}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Device type v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Device Type ID}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p12}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){device}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_violin}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Device type v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Device Type ID}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){p10}<LSEP>[](symbol){p11}<LSEP>[](symbol){p12}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){2.000000}<LEND>[assign](){=}<LSEP>[](symbol){p13}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){channel}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Channel v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Channel of mobile}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p14}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){channel}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Channel v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Channel of mobile}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p15}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){channel}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_violin}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Channel v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Channel of mobile}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){p13}<LSEP>[](symbol){p14}<LSEP>[](symbol){p15}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){2.000000}<LEND>[assign](){=}<LSEP>[](symbol){p16}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){hour}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Hour v/s Is_attributed }<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p17}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){hour}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Hour v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p18}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){channel}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_violin}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Hour v/s Is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){p16}<LSEP>[](symbol){p17}<LSEP>[](symbol){p18}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){2.000000}<LEND>[assign](){=}<LSEP>[](symbol){p19}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){days}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Day of a week v/s Is_attributed }<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Os version}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[assign](){=}<LSEP>[](symbol){p20}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){days}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LSEP>[argument 0; litteral](logical){NA}<LSEP>[argument 1; litteral](real){0.350000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){days v/s click}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Day of a week v/s Is_attributed }<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Total Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){is_attributed}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){p19}<LSEP>[](symbol){p20}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){<-}<LSEP>[](symbol){cv.10}<LEND>[call](){}<LSEP>[](symbol){createMultiFolds}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[assign](){<-}<LSEP>[](symbol){ctrl}<LEND>[call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){repeatedcv}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](real){10.000000}<LSEP>[](symbol){cv.10}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Model_CDT}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){6.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){6.000000}<LEND>[argument 2; litteral](str){rpart}<LSEP>[argument 3; litteral](real){30.000000}<LSEP>[](symbol){ctrl}<LEND>[assign](){=}<LSEP>[](symbol){PRE_VDTS}<LEND>[call](){}<LSEP>[](symbol){predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Model_CDT}<LSEP>[](symbol){finalModel}<LEND>[](symbol){train}<LSEP>[argument 2; litteral](str){class}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){PRE_VDTS}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){is_attributed}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){days}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){os}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){device}<LEND>[litteral](NULL){NULL}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Model_CDT1}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 2; litteral](str){rpart}<LSEP>[argument 3; litteral](real){30.000000}<LSEP>[](symbol){ctrl}<LEND>[assign](){=}<LSEP>[](symbol){PRE_VDTS1}<LEND>[call](){}<LSEP>[](symbol){predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Model_CDT1}<LSEP>[](symbol){finalModel}<LEND>[](symbol){train}<LSEP>[argument 2; litteral](str){class}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){PRE_VDTS1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){is_attributed}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){5000.000000}<LEND>[assign](){=}<LSEP>[](symbol){ind}<LEND>[call](){}<LSEP>[](symbol){createDataPartition}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.700000}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){train_val}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){ind}<LSEP>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){test_val}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ind}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){prop.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){prop.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_val}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){prop.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_val}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; litteral](real){100.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){=}<LSEP>[](symbol){smote_train}<LEND>[call](){}<LSEP>[](symbol){SMOTE}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[](symbol){train_val}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){smote_train}<LSEP>[](symbol){is_attributed}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){<-}<LSEP>[](symbol){cv.10}<LEND>[call](){}<LSEP>[](symbol){createMultiFolds}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){smote_train}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[assign](){<-}<LSEP>[](symbol){ctrl}<LEND>[call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){repeatedcv}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](real){10.000000}<LSEP>[](symbol){cv.10}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Model_CDT}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){smote_train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){smote_train}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 2; litteral](str){rpart}<LSEP>[argument 3; litteral](real){30.000000}<LSEP>[](symbol){ctrl}<LEND>[call](){}<LSEP>[](symbol){rpart.plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Model_CDT}<LSEP>[](symbol){finalModel}<LEND>[argument 1; litteral](real){3.000000}<LSEP>[](symbol){T}<LEND>[assign](){=}<LSEP>[](symbol){PRE_VDTS}<LEND>[call](){}<LSEP>[](symbol){predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Model_CDT}<LSEP>[](symbol){finalModel}<LEND>[](symbol){test_val}<LSEP>[argument 2; litteral](str){class}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){PRE_VDTS}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_val}<LSEP>[](symbol){is_attributed}<LEND>[assign](){<-}<LSEP>[](symbol){cv.10}<LEND>[call](){}<LSEP>[](symbol){createMultiFolds}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){smote_train}<LSEP>[](symbol){is_attributed}<LEND>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[assign](){<-}<LSEP>[](symbol){ctrl}<LEND>[call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){repeatedcv}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](real){10.000000}<LSEP>[](symbol){cv.10}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf.5}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){smote_train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){smote_train}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 2; litteral](str){rf}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){100.000000}<LSEP>[](symbol){ctrl}<LEND>[](symbol){rf.5}<LEND>[assign](){=}<LSEP>[](symbol){pr.rf}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf.5}<LSEP>[](symbol){test_val}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){pr.rf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_val}<LSEP>[](symbol){is_attributed}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){=}<LSEP>[](symbol){liner.tune}<LEND>[call](){}<LSEP>[](symbol){tune.svm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[](symbol){smote_train}<LSEP>[argument 2; litteral](str){linear}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.100000}<LSEP>[argument 1; litteral](real){0.500000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){5.000000}<LSEP>[argument 4; litteral](real){10.000000}<LSEP>[argument 5; litteral](real){50.000000}<LEND>[](symbol){liner.tune}<LEND>[assign](){=}<LSEP>[](symbol){best.linear}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){liner.tune}<LSEP>[](symbol){best.model}<LEND>[assign](){=}<LSEP>[](symbol){best.test}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){best.linear}<LSEP>[](symbol){test_val}<LSEP>[argument 2; litteral](str){class}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){best.test}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_val}<LSEP>[](symbol){is_attributed}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){=}<LSEP>[](symbol){rd.poly}<LEND>[call](){}<LSEP>[](symbol){tune.svm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_attributed}<LSEP>[](symbol){.}<LEND>[](symbol){smote_train}<LSEP>[argument 2; litteral](str){radial}<LEND>[argument 3; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.100000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){rd.poly}<LEND>[assign](){=}<LSEP>[](symbol){best.rd}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rd.poly}<LSEP>[](symbol){best.model}<LEND>[assign](){=}<LSEP>[](symbol){pre.rd}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){best.rd}<LSEP>[](symbol){test_val}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){pre.rd}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_val}<LSEP>[](symbol){is_attributed} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){Training set has %d rows and %...}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){Test set has %d rows and %d co...}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){test} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){gridExtra}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){fname}<LSEP>[litteral](str){feature_importance.png}<LEND>[assign](){<-}<LSEP>[](symbol){heatmapMatrix}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){mat}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){zlab}<LSEP>[](symbol){low}<LSEP>[](symbol){high}<LSEP>[](symbol){grid}<LSEP>[](symbol){limits}<LSEP>[](symbol){legend.position}<LSEP>[](symbol){colours}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nr}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){mat}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){nc}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){mat}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){rnames}<LEND>[call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){mat}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){cnames}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){mat}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){rnames}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){rnames}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){xlab}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nr}<LEND>[argument 2; litteral](str){_}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){cnames}<LEND>[true branch; assign](){<-}<LSEP>[](symbol){cnames}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){ylab}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){nc}<LEND>[argument 2; litteral](str){_}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){rnames}<LSEP>[](symbol){nc}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){cnames}<LSEP>[](symbol){nr}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){unique}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){unique}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.vector}<LSEP>[](symbol){mat}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){xlab}<LSEP>[](symbol){ylab}<LSEP>[](symbol){zlab}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){df}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes_string}<LSEP>[](symbol){ylab}<LSEP>[](symbol){xlab}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_tile}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes_string}<LSEP>[](symbol){zlab}<LEND>[](symbol){grid}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[](symbol){legend.position}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){colours}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[](symbol){low}<LSEP>[](symbol){high}<LSEP>[](symbol){limits}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradientn}<LSEP>[](symbol){colours}<LEND>[assign](){<-}<LSEP>[](symbol){countFeature}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){tbl}<LEND>[call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){idx}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){tbl}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){offset}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){idx}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){vals}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){idx}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vals}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){idx}<LSEP>[](symbol){offset}<LEND>[](symbol){tbl}<LEND>[statement 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vals}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x}<LSEP>[](symbol){offset}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Loading data\n}<LEND>[assign](){<-}<LSEP>[](symbol){training}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Data initialization\n\n}<LEND>[assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){training}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){94.000000}<LEND>[assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){training}<LSEP>[](symbol){target}<LEND>[assign](){<-}<LSEP>[](symbol){yMat}<LEND>[call](){}<LSEP>[](symbol){model.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){target}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){training}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){yMat}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[assign](){<-}<LSEP>[](symbol){X2}<LEND>[call](){}<LSEP>[](symbol){log1p}<LSEP>[](symbol){X}<LEND>[assign](){<-}<LSEP>[](symbol){X.cf}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){X}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){countFeature}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Class-wise feature importance ...}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ Correlation\n}<LEND>[assign](){<-}<LSEP>[](symbol){linearCor}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){cor}<LSEP>[](symbol){X}<LSEP>[](symbol){yMat}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ Correlation on log1p(X)\n}<LEND>[assign](){<-}<LSEP>[](symbol){loglinearCor}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){cor}<LSEP>[](symbol){X2}<LSEP>[](symbol){yMat}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ Feature importance by random...}<LEND>[assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LSEP>[](symbol){X}<LSEP>[](symbol){y}<LSEP>[argument 2; litteral](real){10.000000}<LSEP>[argument 3; litteral](real){10.000000}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){RfImp}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){importance}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){ Feature importance by random...}<LEND>[assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LSEP>[](symbol){X.cf}<LSEP>[](symbol){y}<LSEP>[argument 2; litteral](real){10.000000}<LSEP>[argument 3; litteral](real){10.000000}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){RfImp.CF}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){importance}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[assign](){<-}<LSEP>[](symbol){str93}<LEND>[call](){}<LSEP>[](symbol){formatC}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){93.000000}<LEND>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){RfImp.CF}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){RfImp}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){linearCor}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){loglinearCor}<LEND>[](symbol){str93}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){RfImp}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){RfImp.CF}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p1}<LEND>[call](){}<LSEP>[](symbol){heatmapMatrix}<LSEP>[](symbol){linearCor}<LSEP>[argument 1; litteral](str){X}<LSEP>[argument 2; litteral](str){Class}<LSEP>[argument 3; litteral](str){Corr}<LSEP>[argument 4; litteral](str){blue}<LEND>[assign](){<-}<LSEP>[](symbol){p2}<LEND>[call](){}<LSEP>[](symbol){heatmapMatrix}<LSEP>[](symbol){loglinearCor}<LSEP>[argument 1; litteral](str){log1p}<LSEP>[argument 2; litteral](str){Class}<LSEP>[argument 3; litteral](str){Corr_log1p}<LSEP>[argument 4; litteral](str){blue}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){linearCor}<LEND>[assign](){<-}<LSEP>[](symbol){p3}<LEND>[call](){}<LSEP>[](symbol){heatmapMatrix}<LSEP>[](symbol){RfImp}<LSEP>[argument 1; litteral](str){X}<LSEP>[argument 2; litteral](str){Class}<LSEP>[argument 3; litteral](str){Imp_RF}<LSEP>[argument 4; litteral](str){red}<LEND>[assign](){<-}<LSEP>[](symbol){p4}<LEND>[call](){}<LSEP>[](symbol){heatmapMatrix}<LSEP>[](symbol){RfImp.CF}<LSEP>[argument 1; litteral](str){CountFeature}<LSEP>[argument 2; litteral](str){Class}<LSEP>[argument 3; litteral](str){Imp_RF_CF}<LSEP>[argument 4; litteral](str){red}<LEND>[assign](){<-}<LSEP>[](symbol){g}<LEND>[call](){}<LSEP>[](symbol){arrangeGrob}<LSEP>[](symbol){p1}<LSEP>[](symbol){p2}<LSEP>[](symbol){p3}<LSEP>[](symbol){p4}<LSEP>[argument 4; litteral](real){4.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Saving 1920 x 1000 image \n}<LEND>[call](){}<LSEP>[](symbol){ggsave}<LSEP>[](symbol){fname}<LSEP>[](symbol){g}<LSEP>[argument 2; litteral](real){100.000000}<LSEP>[argument 3; litteral](real){19.200000}<LSEP>[argument 4; litteral](real){10.000000}<LSEP>[argument 5; litteral](str){in} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[call](){}<LSEP>[](symbol){getwd} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){glmnet}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){mice}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Boruta}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){mlr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){mlrMBO}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){car}<LEND>[assign](){=}<LSEP>[](symbol){TRAIN}<LSEP>[litteral](str){../input/train.csv}<LEND>[assign](){=}<LSEP>[](symbol){TEST}<LSEP>[litteral](str){../input/test.csv}<LEND>[assign](){=}<LSEP>[](symbol){SUBMISSION}<LSEP>[litteral](str){../input/sample_submission.csv}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[](symbol){TRAIN}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[](symbol){TEST}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){combine}<LEND>[call](){}<LSEP>[](symbol){bind_rows}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){Street.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Street}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Street.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Street}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Street.map}<LEND>[assign](){<-}<LSEP>[](symbol){Lotshape.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){LotShape}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Lotshape.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){LotShape}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Lotshape.map}<LEND>[assign](){<-}<LSEP>[](symbol){Landcountur.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){LandContour}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Landcountur.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){LandContour}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Landcountur.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Utilities}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Utilities}<LEND>[assign](){<-}<LSEP>[](symbol){Utilities.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Utilities}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Utilities.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Utilities}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Utilities.map}<LEND>[assign](){<-}<LSEP>[](symbol){Landslope.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){LandSlope}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Landslope.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){LandSlope}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Landslope.map}<LEND>[assign](){<-}<LSEP>[](symbol){BldgType.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BldgType}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){BldgType.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BldgType}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){BldgType.map}<LEND>[assign](){<-}<LSEP>[](symbol){ExterQual.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){ExterQual}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ExterQual.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){ExterQual}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){ExterQual.map}<LEND>[assign](){<-}<LSEP>[](symbol){ExterCond.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){ExterCond}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ExterCond.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){ExterCond}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){ExterCond.map}<LEND>[assign](){<-}<LSEP>[](symbol){BsmtQual.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtQual}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){BsmtQual.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtQual}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){BsmtQual.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtQual}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){BsmtCond.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtCond}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){BsmtCond.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtCond}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){BsmtCond.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtCond}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){BsmtExposure.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtExposure}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){BsmtExposure.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtExposure}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){BsmtExposure.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtExposure}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtExposure}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){BsmtFinType1.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){5.000000}<LSEP>[argument 5; litteral](real){6.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFinType1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){BsmtFinType1.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFinType1}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){BsmtFinType1.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFinType1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFinType1}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){BsmtFinType2.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){5.000000}<LSEP>[argument 5; litteral](real){6.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFinType2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){BsmtFinType2.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFinType2}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){BsmtFinType2.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFinType2}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFinType2}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){HeatingQC.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){HeatingQC}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){HeatingQC.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){HeatingQC}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){HeatingQC.map}<LEND>[assign](){<-}<LSEP>[](symbol){CentralAir.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){CentralAir}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){CentralAir.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){CentralAir}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){CentralAir.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Electrical}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Electrical}<LEND>[assign](){<-}<LSEP>[](symbol){Electrical.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Electrical}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Electrical.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Electrical}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Electrical.map}<LEND>[assign](){<-}<LSEP>[](symbol){Kitchen.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){KitchenQual}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Kitchen.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){KitchenQual}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Kitchen.map}<LEND>[assign](){<-}<LSEP>[](symbol){Functional.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){4.000000}<LSEP>[argument 5; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Functional}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Functional.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Functional}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Functional.map}<LEND>[assign](){<-}<LSEP>[](symbol){FireplaceQu.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){FireplaceQu}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){FireplaceQu.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){FireplaceQu}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){FireplaceQu.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){FireplaceQu}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){FireplaceQu}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){GarageFinish.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageFinish}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){GarageFinish.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageFinish}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){GarageFinish.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageFinish}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageFinish}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageQual}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageQual}<LEND>[assign](){<-}<LSEP>[](symbol){GarageQual.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageQual}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){GarageQual.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageQual}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){GarageQual.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageQual}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){GarageCond.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageCond}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){GarageCond.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageCond}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){GarageCond.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageCond}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){PavedDrive.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){PavedDrive}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){PavedDrive.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){PavedDrive}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){PavedDrive.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){PoolQC}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){PoolQC}<LEND>[assign](){<-}<LSEP>[](symbol){PoolQC.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){PoolQC}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){PoolQC.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){PoolQC}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){PoolQC.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){PoolQC}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){PoolQC}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Fence.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){4.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Fence}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Fence.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Fence}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){Fence.map}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Fence}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Fence}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){nghr.map}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){3.000000}<LSEP>[argument 4; litteral](real){4.000000}<LSEP>[argument 5; litteral](real){5.000000}<LSEP>[argument 6; litteral](real){6.000000}<LSEP>[argument 7; litteral](real){7.000000}<LSEP>[argument 8; litteral](real){8.000000}<LSEP>[argument 9; litteral](real){9.000000}<LSEP>[argument 10; litteral](real){10.000000}<LSEP>[argument 11; litteral](real){11.000000}<LSEP>[argument 12; litteral](real){12.000000}<LSEP>[argument 13; litteral](real){13.000000}<LSEP>[argument 14; litteral](real){14.000000}<LSEP>[argument 15; litteral](real){15.000000}<LSEP>[argument 16; litteral](real){16.000000}<LSEP>[argument 17; litteral](real){17.000000}<LSEP>[argument 18; litteral](real){18.000000}<LSEP>[argument 19; litteral](real){19.000000}<LSEP>[argument 20; litteral](real){20.000000}<LSEP>[argument 21; litteral](real){21.000000}<LSEP>[argument 22; litteral](real){22.000000}<LSEP>[argument 23; litteral](real){23.000000}<LSEP>[argument 24; litteral](real){24.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Neighborhood}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){nghr.map}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Neighborhood}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){nghr.map}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){combine}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){MSZoning}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Alley}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){MiscFeature}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){OverallQual}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){OverallQual}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){OverallCond}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){OverallCond}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){LotConfig}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){LotConfig}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Neighborhood}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Neighborhood}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Condition1}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Condition1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Condition2}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Condition2}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Condition2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Condition2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){HouseStyle}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){HouseStyle}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){HouseStyle}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){HouseStyle}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){RoofStyle}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){RoofStyle}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){RoofMatl}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){RoofMatl}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){RoofMatl}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){RoofMatl}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Exterior1st}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Exterior1st}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Exterior1st}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Exterior1st}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Exterior2nd}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Exterior2nd}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Exterior2nd}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Exterior2nd}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){MasVnrType}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){MasVnrType}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Foundation}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Foundation}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Heating}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Heating}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Heating}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Heating}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageType}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageType}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SaleType}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SaleType}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SaleCondition}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SaleCondition}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SaleCondition}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SaleCondition}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){YrSold}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){YearBuilt}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){YrSinceRemodel}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){YrSold}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){YearRemodAdd}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Total_Floor}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){1stFlrSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){2ndFlrSF}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){All_living_Area}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){1stFlrSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){2ndFlrSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GrLivArea}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){TotalSF}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){TotalBsmtSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){1stFlrSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){2ndFlrSF}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){AllSF}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){TotalBsmtSF}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GrLivArea}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){OverallGrd}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){OverallQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){OverallCond}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){ExterGrade}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){ExterQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){ExterCond}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageScore}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageArea}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){GarageQual}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){TotalBath}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtFullBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){BsmtHalfBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){FullBath}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){HalfBath}<LEND>[assign](){<-}<LSEP>[](symbol){combine_train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1460.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){combine_test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1461.000000}<LSEP>[argument 1; litteral](real){2919.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){combine_train}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){mice_imp}<LEND>[call](){}<LSEP>[](symbol){mice}<LSEP>[](symbol){combine_train}<LSEP>[argument 1; litteral](str){cart}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){densityplot}<LSEP>[](symbol){mice_imp}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){LotFrontage}<LEND>[assign](){<-}<LSEP>[](symbol){imputed}<LEND>[call](){}<LSEP>[](symbol){complete}<LSEP>[](symbol){mice_imp}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine_train}<LSEP>[](symbol){LotFrontage}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){imputed}<LSEP>[](symbol){LotFrontage}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine_train}<LSEP>[](symbol){MasVnrType}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){imputed}<LSEP>[](symbol){MasVnrType}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine_train}<LSEP>[](symbol){MasVnrArea}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){imputed}<LSEP>[](symbol){MasVnrArea}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine_train}<LSEP>[](symbol){Electrical}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){imputed}<LSEP>[](symbol){Electrical}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine_train}<LSEP>[](symbol){Functional}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){imputed}<LSEP>[](symbol){Functional}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine_train}<LSEP>[](symbol){GarageType}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){imputed}<LSEP>[](symbol){GarageType}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine_train}<LSEP>[](symbol){GarageYrBlt}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){imputed}<LSEP>[](symbol){GarageYrBlt}<LEND>[assign](){<-}<LSEP>[](symbol){combine}<LEND>[call](){}<LSEP>[](symbol){bind_rows}<LSEP>[](symbol){combine_train}<LSEP>[](symbol){combine_test}<LEND>[assign](){<-}<LSEP>[](symbol){combine2}<LSEP>[](symbol){combine}<LEND>[assign](){<-}<LSEP>[](symbol){nzv.data}<LEND>[call](){}<LSEP>[](symbol){nearZeroVar}<LSEP>[](symbol){combine2}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){drop.cols}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){nzv.data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){nzv.data}<LSEP>[](symbol){nzv}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){combine2}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){combine2}<LEND>[assign](){<-}<LSEP>[](symbol){combine2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine2}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){combine2}<LEND>[](symbol){drop.cols}<LEND>[assign](){<-}<LSEP>[](symbol){combine2}<LEND>[call](){}<LSEP>[](symbol){setDT}<LSEP>[](symbol){combine2}<LEND>[assign](){<-}<LSEP>[](symbol){sale}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){SalePrice}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine2}<LSEP>[](symbol){SalePrice}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){combine2}<LEND>[call](){}<LSEP>[](symbol){bind_cols}<LSEP>[](symbol){combine2}<LSEP>[](symbol){sale}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine2}<LSEP>[](symbol){SalePrice}<LEND>[call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine2}<LSEP>[](symbol){SalePrice}<LEND>[assign](){<-}<LSEP>[](symbol){combine4}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1460.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){mod}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){SalePrice}<LSEP>[](symbol){.}<LEND>[](symbol){combine4}<LEND>[assign](){<-}<LSEP>[](symbol){outliers}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){car}<LSEP>[](symbol){outlierTest}<LEND>[](symbol){mod}<LEND>[assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1299.000000}<LSEP>[argument 1; litteral](real){1183.000000}<LSEP>[argument 2; litteral](real){524.000000}<LSEP>[argument 3; litteral](real){692.000000}<LSEP>[argument 4; litteral](real){899.000000}<LSEP>[argument 5; litteral](real){804.000000}<LSEP>[argument 6; litteral](real){1170.000000}<LSEP>[argument 7; litteral](real){1047.000000}<LSEP>[argument 8; litteral](real){441.000000}<LSEP>[argument 9; litteral](real){689.000000}<LEND>[assign](){<-}<LSEP>[](symbol){combine2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine2}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){out}<LEND>[assign](){<-}<LSEP>[](symbol){train_2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine2}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1450.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){test_2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine2}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1451.000000}<LSEP>[argument 1; litteral](real){2909.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){train.label}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_2}<LSEP>[](symbol){SalePrice}<LEND>[assign](){<-}<LSEP>[](symbol){test.label}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_2}<LSEP>[](symbol){SalePrice}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_2}<LSEP>[](symbol){SalePrice}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_2}<LSEP>[](symbol){SalePrice}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){train_2}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_2}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train_2}<LEND>[assign](){<-}<LSEP>[](symbol){test_2}<LEND>[call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test_2}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){test_2}<LEND>[assign](){<-}<LSEP>[](symbol){dtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){train_2}<LSEP>[](symbol){train.label}<LEND>[assign](){<-}<LSEP>[](symbol){dtest}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){test_2}<LSEP>[](symbol){test.label}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){dtrain}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){dtest}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){reg:linear}<LSEP>[argument 1; litteral](str){rmse}<LSEP>[argument 2; litteral](real){8.000000}<LSEP>[argument 3; litteral](real){0.399000}<LSEP>[argument 4; litteral](real){0.010700}<LSEP>[argument 5; litteral](real){0.000000}<LSEP>[argument 6; litteral](real){0.470000}<LSEP>[argument 7; litteral](real){4.000000}<LEND>[call](){}<LSEP>[](symbol){system.time}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){xgb}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LSEP>[](symbol){param}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){train.label}<LSEP>[argument 3; litteral](real){956.000000}<LSEP>[argument 4; litteral](real){100.000000}<LSEP>[argument 5; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){system.time}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){xgb2}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LSEP>[](symbol){param}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){train.label}<LSEP>[](symbol){best_956}<LSEP>[argument 4; litteral](real){100.000000}<LSEP>[argument 5; litteral](real){1235.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){system.time}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){xgb3}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LSEP>[](symbol){param}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){train.label}<LSEP>[argument 3; litteral](real){956.000000}<LSEP>[argument 4; litteral](real){100.000000}<LSEP>[argument 5; litteral](real){1236.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){names}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dimnames}<LSEP>[](symbol){dtrain}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){importance_matrix}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){xgb.importance}<LSEP>[](symbol){names}<LSEP>[](symbol){xgb}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[call](){}<LSEP>[](symbol){xgb.plot.importance}<LSEP>[](symbol){importance_matrix}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_test}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb}<LSEP>[](symbol){dtest}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_train}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb}<LSEP>[](symbol){dtrain}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_test2}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb2}<LSEP>[](symbol){dtest}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_train2}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb2}<LSEP>[](symbol){dtrain}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_test3}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb3}<LSEP>[](symbol){dtest}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_train3}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb3}<LSEP>[](symbol){dtrain}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_test}<LEND>[call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){pred_xgboost_test}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_test2}<LEND>[call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){pred_xgboost_test2}<LEND>[assign](){<-}<LSEP>[](symbol){pred_xgboost_test3}<LEND>[call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){pred_xgboost_test3}<LEND>[assign](){=}<LSEP>[](symbol){pred_ensamble}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){pred_xgboost_test}<LSEP>[](symbol){pred_xgboost_test2}<LEND>[](symbol){pred_xgboost_test3}<LEND>[argument 1; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){submit}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1461.000000}<LSEP>[argument 1; litteral](real){2919.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Id}<LEND>[](symbol){pred_ensamble}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submit}<LSEP>[argument 1; litteral](str){xgb3.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){FeatureHashing}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Matrix}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Reading data\n}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){=}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/people.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Processing data\n}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){char_1}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){people_}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[assign](){<-}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){people}<LSEP>[](symbol){is.logical}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LSEP>[](symbol){p_logi}<LEND>[body; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){people}<LSEP>[](symbol){col}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){people}<LSEP>[](symbol){col}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){group unique}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){d2}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[](symbol){row.train}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){d1}<LSEP>[](symbol){d2}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){test_activity_id}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){activity_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LSEP>[](symbol){d1}<LSEP>[](symbol){d2}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){char.cols}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_category}<LSEP>[argument 1; litteral](str){people_group_1}<LSEP>[argument 2; litteral](str){char_1}<LSEP>[argument 3; litteral](str){char_2}<LSEP>[argument 4; litteral](str){char_3}<LSEP>[argument 5; litteral](str){char_4}<LSEP>[argument 6; litteral](str){char_5}<LSEP>[argument 7; litteral](str){char_6}<LSEP>[argument 8; litteral](str){char_7}<LSEP>[argument 9; litteral](str){char_8}<LSEP>[argument 10; litteral](str){char_9}<LSEP>[argument 11; litteral](str){char_10}<LSEP>[argument 12; litteral](str){people_char_2}<LSEP>[argument 13; litteral](str){people_char_3}<LSEP>[argument 14; litteral](str){people_char_4}<LSEP>[argument 15; litteral](str){people_char_5}<LSEP>[argument 16; litteral](str){people_char_6}<LSEP>[argument 17; litteral](str){people_char_7}<LSEP>[argument 18; litteral](str){people_char_8}<LSEP>[argument 19; litteral](str){people_char_9}<LEND>[control flow](){for}<LSEP>[](symbol){f}<LSEP>[](symbol){char.cols}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){character}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making sparse data (1)\n}<LEND>[assign](){=}<LSEP>[](symbol){D.sparse}<LEND>[call](){}<LSEP>[](symbol){cBind}<LEND>[argument 0; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){activity_category}<LEND>[argument 1; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_group_1}<LEND>[argument 2; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_1}<LEND>[argument 3; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_2}<LEND>[argument 4; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_3}<LEND>[argument 5; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_4}<LEND>[argument 6; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_5}<LEND>[argument 7; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_6}<LEND>[argument 8; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_7}<LEND>[argument 9; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_8}<LEND>[argument 10; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_9}<LEND>[argument 11; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_2}<LEND>[argument 12; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_3}<LEND>[argument 13; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_4}<LEND>[argument 14; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_5}<LEND>[argument 15; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_6}<LEND>[argument 16; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_7}<LEND>[argument 17; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_8}<LEND>[argument 18; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_9}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making sparse data (2)\n}<LEND>[assign](){=}<LSEP>[](symbol){D.sparse}<LEND>[call](){}<LSEP>[](symbol){cBind}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_10}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_11}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_12}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_13}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_14}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_15}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_16}<LEND>[argument 8; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_17}<LEND>[argument 9; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_18}<LEND>[argument 10; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_19}<LEND>[argument 11; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_20}<LEND>[argument 12; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_21}<LEND>[argument 13; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_22}<LEND>[argument 14; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_23}<LEND>[argument 15; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_24}<LEND>[argument 16; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_25}<LEND>[argument 17; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_26}<LEND>[argument 18; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_27}<LEND>[argument 19; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_28}<LEND>[argument 20; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_29}<LEND>[argument 21; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_30}<LEND>[argument 22; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_31}<LEND>[argument 23; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_32}<LEND>[argument 24; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_33}<LEND>[argument 25; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_34}<LEND>[argument 26; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_35}<LEND>[argument 27; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_36}<LEND>[argument 28; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_37}<LEND>[argument 29; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_38}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Unmerging train/test sparse da...}<LEND>[assign](){=}<LSEP>[](symbol){train.sparse}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){row.train}<LEND>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){test.sparse}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){row.train}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){D.sparse}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making data for SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating SVMLight format\n}<LEND>[assign](){<-}<LSEP>[](symbol){dtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){train.sparse}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Exporting SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix.save}<LSEP>[](symbol){dtrain}<LSEP>[argument 1; litteral](str){dtrain.data}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Zipping SVMLight\n}<LEND>[call](){}<LSEP>[](symbol){zip}<LSEP>[argument 0; litteral](str){dtrain.data.zip}<LSEP>[argument 1; litteral](str){dtrain.data}<LSEP>[argument 2; litteral](str){-m9X}<LSEP>[argument 3; litteral](str){}<LEND>[argument 4; call](){}<LSEP>[](symbol){Sys.getenv}<LSEP>[argument 0; litteral](str){R_ZIPCMD}<LSEP>[argument 1; litteral](str){zip}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){File size of train in SVMLight: }<LEND>[argument 1; call](){}<LSEP>[](symbol){file.size}<LSEP>[argument 0; litteral](str){dtrain.data.zip}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating SVMLight format\n}<LEND>[assign](){<-}<LSEP>[](symbol){dtest}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){test.sparse}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Exporting SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix.save}<LSEP>[](symbol){dtest}<LSEP>[argument 1; litteral](str){dtest.data}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Zipping SVMLight\n}<LEND>[call](){}<LSEP>[](symbol){zip}<LSEP>[argument 0; litteral](str){dtest.data.zip}<LSEP>[argument 1; litteral](str){dtest.data}<LSEP>[argument 2; litteral](str){-m9X}<LSEP>[argument 3; litteral](str){}<LEND>[argument 4; call](){}<LSEP>[](symbol){Sys.getenv}<LSEP>[argument 0; litteral](str){R_ZIPCMD}<LSEP>[argument 1; litteral](str){zip}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){File size of test in SVMLight: }<LEND>[argument 1; call](){}<LSEP>[](symbol){file.size}<LSEP>[argument 0; litteral](str){dtest.data.zip}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){binary:logistic}<LSEP>[argument 1; litteral](str){auc}<LSEP>[argument 2; litteral](str){gblinear}<LSEP>[argument 3; litteral](real){0.050000}<LSEP>[argument 4; litteral](real){0.860000}<LSEP>[argument 5; litteral](real){0.920000}<LSEP>[argument 6; litteral](real){0.900000}<LSEP>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){11.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){XGBoost\n}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){120.000000}<LEND>[assign](){<-}<LSEP>[](symbol){m2}<LEND>[call](){}<LSEP>[](symbol){xgb.train}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){param}<LSEP>[argument 2; litteral](real){450.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dtrain}<LEND>[argument 4; litteral](real){101.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predicting on test data\n}<LEND>[assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){m2}<LSEP>[](symbol){dtest}<LEND>[assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){test_activity_id}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){sub}<LSEP>[argument 1; litteral](str){model_sub.csv}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Cleaning up...\n}<LEND>[call](){}<LSEP>[](symbol){remove}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Doing Loiso's magic leak\n}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Working on people\n}<LEND>[assign](){<-}<LSEP>[](symbol){ppl}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/people.csv}<LEND>[assign](){<-}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){ppl}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){ppl}<LSEP>[](symbol){is.logical}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LSEP>[](symbol){p_logi}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){ppl}<LSEP>[](symbol){col}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){ppl}<LSEP>[](symbol){col}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ppl}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){date}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){date}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Working on data\n}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){TestActivs}<LSEP>[](symbol){outcome}<LEND>[litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){activs}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Merging\n}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){activs}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){people_id}<LSEP>[argument 1; litteral](str){outcome}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[argument 3; litteral](str){date}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){activs}<LSEP>[](symbol){ppl}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){testset}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){activdate}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){date.x}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating interaction\n}<LEND>[assign](){<-}<LSEP>[](symbol){minactivdate}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){maxactivdate}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){alldays}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){minactivdate}<LSEP>[](symbol){maxactivdate}<LSEP>[argument 2; litteral](str){day}<LEND>[assign](){<-}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[](symbol){alldays}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[call](){}<LSEP>[](symbol){setkey}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[argument 1; litteral](str){group_1}<LSEP>[argument 2; litteral](str){date.p}<LEND>[assign](){<-}<LSEP>[](symbol){meanbycomdate}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[argument 2; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){outcome}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){meanbycomdate}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){interpolateFun}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){borders}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){forward_border}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){borders}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){borders}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){backward_border}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){borders}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){borders}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){forward_border_x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){forward_border}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_border_x}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.200000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){backward_border_x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){backward_border}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){backward_border_x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){forward_x_fill}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){backward_x_fill}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){backward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){forward_x_fill_2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){forward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_x_fill}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){backward_x_fill_2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_x_fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){backward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){vec}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){forward_x_fill}<LSEP>[](symbol){backward_x_fill}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vec}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Applying interaction interpola...}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){filled}<LEND>[argument 1; call](){}<LSEP>[](symbol){interpolateFun}<LSEP>[](symbol){V1}<LEND>[argument 3; litteral](str){group_1}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){d1}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){T}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predicting leak\n}<LEND>[assign](){<-}<LSEP>[](symbol){testsetdt}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_id}<LSEP>[argument 1; litteral](str){filled}<LEND>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){testsetdt}<LSEP>[argument 1; litteral](str){Submission.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Cleaning up...\n}<LEND>[call](){}<LSEP>[](symbol){remove}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Combining two submissions on t...}<LEND>[assign](){<-}<LSEP>[](symbol){submit1}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){Submission.csv}<LEND>[assign](){<-}<LSEP>[](symbol){submit2}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){model_sub.csv}<LEND>[assign](){<-}<LSEP>[](symbol){submit3}<LEND>[call](){}<LSEP>[](symbol){merge}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit1}<LSEP>[](symbol){filled}<LEND>[](symbol){}<LEND>[](symbol){submit2}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){submit4}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){submit1}<LSEP>[](symbol){submit3}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){outcome}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[assign](){<-}<LSEP>[](symbol){submit5}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){activity_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submit5}<LSEP>[argument 1; litteral](str){mod3108Kaggle_01.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){sqldf}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){plyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lubridate}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){corrplot}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){glmnet}<LEND>[assign](){<-}<LSEP>[](symbol){Play_Info}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/play_information.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){Video_Control}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/video_footage-control...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Video_Control}<LSEP>[](symbol){Concussed}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Video_Injury}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/video_footage-injury.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Video_Injury}<LSEP>[](symbol){Concussed}<LEND>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Video_Injury}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){Video_Injury}<LEND>[argument 1; litteral](str){Type}<LEND>[litteral](str){Season_Type}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Video_Injury}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){Video_Injury}<LEND>[argument 1; litteral](str){PREVIEW.LINK..5000K.}<LEND>[litteral](str){Preview.Link}<LEND>[assign](){<-}<LSEP>[](symbol){Punt_Videos}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){Video_Control}<LSEP>[](symbol){Video_Injury}<LEND>[assign](){<-}<LSEP>[](symbol){Video_Review}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/video_review.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){Videos_All}<LEND>[call](){}<LSEP>[](symbol){left_join}<LSEP>[](symbol){Punt_Videos}<LSEP>[](symbol){Video_Review}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){GameKey}<LSEP>[argument 1; litteral](str){PlayID}<LSEP>[argument 2; litteral](str){Season_Year}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Videos_All}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){Videos_All}<LEND>[argument 1; litteral](str){gamekey}<LEND>[litteral](str){GameKey}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Videos_All}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){Videos_All}<LEND>[argument 1; litteral](str){playid}<LEND>[litteral](str){PlayID}<LEND>[assign](){<-}<LSEP>[](symbol){OnlyPunts_wVideo}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){Videos_All}<LSEP>[](symbol){Play_Info}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){GameKey}<LSEP>[argument 1; litteral](str){PlayID}<LSEP>[argument 2; litteral](str){Season_Type}<LSEP>[argument 3; litteral](str){Week}<LSEP>[argument 4; litteral](str){PlayDescription}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){OnlyPunts_wVideo_2016}<LEND>[call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){OnlyPunts_wVideo}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){season}<LSEP>[argument 1; litteral](str){2016}<LEND>[assign](){<-}<LSEP>[](symbol){Player_Roles}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/play_player_role_data...}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){Punts_wPlayerRoles_16}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){OnlyPunts_wVideo_2016}<LSEP>[](symbol){Player_Roles}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){GSISID}<LSEP>[argument 1; litteral](str){GameKey}<LSEP>[argument 2; litteral](str){PlayID}<LSEP>[argument 3; litteral](str){Season_Year}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){Punt_Players}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/player_punt_data.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){Punts_wPlayers16}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){Punts_wPlayerRoles_16}<LSEP>[](symbol){Punt_Players}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){GSISID}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){Pre_16}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/NGS-2016-pre.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){Reg_1to6_16}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/NGS-2016-reg-wk1-6.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){Reg_7to12_16}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/NGS-2016-reg-wk7-12.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){Reg_13to17_16}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/NGS-2016-reg-wk13-17.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){Post_16}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/NGS-2016-post.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){PreReg1}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){Pre_16}<LSEP>[](symbol){Reg_1to6_16}<LEND>[assign](){<-}<LSEP>[](symbol){PreReg12}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){PreReg1}<LSEP>[](symbol){Reg_7to12_16}<LEND>[assign](){<-}<LSEP>[](symbol){PreReg123}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){PreReg12}<LSEP>[](symbol){Reg_13to17_16}<LEND>[assign](){<-}<LSEP>[](symbol){All_2016}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){PreReg123}<LSEP>[](symbol){Post_16}<LEND>[assign](){<-}<LSEP>[](symbol){Punts_NGS_Primary_2016}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){Punts_wPlayers16}<LSEP>[](symbol){All_2016}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Season_Year}<LSEP>[argument 1; litteral](str){GameKey}<LSEP>[argument 2; litteral](str){PlayID}<LSEP>[argument 3; litteral](str){GSISID}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){Punts_NGS_Primary_2016}<LSEP>[argument 1; litteral](str){Punts_NGS_Primary_2016.csv} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Agencia_ID}<LSEP>[argument 1; litteral](str){Cliente_ID}<LSEP>[argument 2; litteral](str){Producto_ID}<LSEP>[argument 3; litteral](str){Demanda_uni_equil}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){numeric}<LSEP>[argument 1; litteral](str){numeric}<LSEP>[argument 2; litteral](str){numeric}<LSEP>[argument 3; litteral](str){numeric}<LEND>[call](){}<LSEP>[](symbol){setkey}<LSEP>[](symbol){train}<LSEP>[](symbol){Producto_ID}<LSEP>[](symbol){Agencia_ID}<LSEP>[](symbol){Cliente_ID}<LEND>[assign](){<-}<LSEP>[](symbol){median}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){median}<LSEP>[](symbol){Demanda_uni_equil}<LEND>[assign](){<-}<LSEP>[](symbol){mean_Prod}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Demanda_uni_equil}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.579280}<LEND>[argument 3; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){Producto_ID}<LSEP>[](symbol){Agencia_ID}<LEND>[call](){}<LSEP>[](symbol){setnames}<LSEP>[](symbol){mean_Prod}<LSEP>[argument 1; litteral](str){V1}<LSEP>[argument 2; litteral](str){M2}<LEND>[assign](){<-}<LSEP>[](symbol){mean_Agent_Prod}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Demanda_uni_equil}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.910000}<LEND>[argument 3; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){Producto_ID}<LSEP>[](symbol){Agencia_ID}<LSEP>[](symbol){Cliente_ID}<LEND>[call](){}<LSEP>[](symbol){setnames}<LSEP>[](symbol){mean_Agent_Prod}<LSEP>[argument 1; litteral](str){V1}<LSEP>[argument 2; litteral](str){M3}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){id}<LSEP>[argument 1; litteral](str){Agencia_ID}<LSEP>[argument 2; litteral](str){Producto_ID}<LSEP>[argument 3; litteral](str){Cliente_ID}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){numeric}<LSEP>[argument 1; litteral](str){numeric}<LSEP>[argument 2; litteral](str){numeric}<LEND>[assign](){<-}<LSEP>[](symbol){submit}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){mean_Agent_Prod}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Producto_ID}<LSEP>[argument 1; litteral](str){Agencia_ID}<LSEP>[argument 2; litteral](str){Cliente_ID}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){submit}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){submit}<LSEP>[](symbol){mean_Prod}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Producto_ID}<LSEP>[argument 1; litteral](str){Agencia_ID}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit}<LSEP>[](symbol){Pred}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit}<LSEP>[](symbol){M3}<LEND>[argument 1; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){M3}<LEND>[](symbol){Pred}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){M3}<LEND>[](symbol){M2}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){Pred}<LEND>[](symbol){Pred}<LEND>[](symbol){median}<LEND>[call](){}<LSEP>[](symbol){setnames}<LSEP>[](symbol){submit}<LSEP>[argument 1; litteral](str){Pred}<LSEP>[argument 2; litteral](str){Demanda_uni_equil}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){id}<LSEP>[](symbol){Demanda_uni_equil}<LEND>[argument 1; litteral](str){submit_med_by_Agency_Client.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[assign](){<-}<LSEP>[](symbol){traindoc}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){testdoc}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tm}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){comment_text}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){comment_text}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){comment_text}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){comment_text}<LEND>[assign](){<-}<LSEP>[](symbol){CommonWord}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traindoc}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){toxic}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){severe_toxic}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){obscene}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){threat}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){insult}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){identity_hate}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){toxic}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traindoc}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){toxic}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){severe_toxic}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traindoc}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){severe_toxic}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){obscene}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traindoc}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){obscene}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){threat}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traindoc}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){threat}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){insult}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traindoc}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){insult}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){identity_hate}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traindoc}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){identity_hate}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){frequent_words}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){text}<LSEP>[](symbol){n}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){DataCorpust}<LEND>[call](){}<LSEP>[](symbol){VCorpus}<LEND>[argument 0; call](){}<LSEP>[](symbol){VectorSource}<LSEP>[](symbol){text}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dtm}<LEND>[call](){}<LSEP>[](symbol){DocumentTermMatrix}<LSEP>[](symbol){DataCorpust}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){frq}<LEND>[call](){}<LSEP>[](symbol){findFreqTerms}<LSEP>[](symbol){dtm}<LSEP>[](symbol){n}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){frq}<LEND>[assign](){<-}<LSEP>[](symbol){toxicwords}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){toxic}<LSEP>[](symbol){frequent_words}<LEND>[assign](){<-}<LSEP>[](symbol){severe_toxicwords}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){severe_toxic}<LSEP>[](symbol){frequent_words}<LEND>[assign](){<-}<LSEP>[](symbol){obscenewords}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){obscene}<LSEP>[](symbol){frequent_words}<LEND>[assign](){<-}<LSEP>[](symbol){threatwords}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){threat}<LSEP>[](symbol){frequent_words}<LEND>[assign](){<-}<LSEP>[](symbol){insultwords}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){insult}<LSEP>[](symbol){frequent_words}<LEND>[assign](){<-}<LSEP>[](symbol){identity_hatewords}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){identity_hate}<LSEP>[](symbol){frequent_words}<LEND>[assign](){<-}<LSEP>[](symbol){Common_Word}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){CommonWord}<LSEP>[argument 1; litteral](real){100.000000}<LSEP>[](symbol){frequent_words}<LEND>[assign](){<-}<LSEP>[](symbol){onlyWord}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){text1}<LSEP>[](symbol){text2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){onlywords}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){text1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){text1}<LSEP>[](symbol){text2}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){onlywords}<LEND>[assign](){<-}<LSEP>[](symbol){toxicwords}<LEND>[call](){}<LSEP>[](symbol){onlyWord}<LSEP>[](symbol){toxicwords}<LSEP>[](symbol){Common_Word}<LEND>[assign](){<-}<LSEP>[](symbol){severe_toxicwords}<LEND>[call](){}<LSEP>[](symbol){onlyWord}<LSEP>[](symbol){severe_toxicwords}<LSEP>[](symbol){Common_Word}<LEND>[assign](){<-}<LSEP>[](symbol){obscenewords}<LEND>[call](){}<LSEP>[](symbol){onlyWord}<LSEP>[](symbol){obscenewords}<LSEP>[](symbol){Common_Word}<LEND>[assign](){<-}<LSEP>[](symbol){threatwords}<LEND>[call](){}<LSEP>[](symbol){onlyWord}<LSEP>[](symbol){threatwords}<LSEP>[](symbol){Common_Word}<LEND>[assign](){<-}<LSEP>[](symbol){insultwords}<LEND>[call](){}<LSEP>[](symbol){onlyWord}<LSEP>[](symbol){insultwords}<LSEP>[](symbol){Common_Word}<LEND>[assign](){<-}<LSEP>[](symbol){identity_hatewords}<LEND>[call](){}<LSEP>[](symbol){onlyWord}<LSEP>[](symbol){identity_hatewords}<LSEP>[](symbol){Common_Word}<LEND>[assign](){<-}<LSEP>[](symbol){wordcounts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){doc}<LSEP>[](symbol){words}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){lboth}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){doc}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){first}<LEND>[call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){doc}<LSEP>[](symbol){comment_text}<LEND>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){both}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){first}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){first}<LSEP>[](symbol){words}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lboth}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){both}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){lboth}<LEND>[assign](){<-}<LSEP>[](symbol){Clean_Sentences}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){text_blob}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){text_blob}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){;|\\.|!|\\?}<LSEP>[](symbol){text_blob}<LSEP>[argument 2; litteral](str){ }<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){text_blob}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){[^[:alpha:]]}<LSEP>[](symbol){text_blob}<LSEP>[argument 2; litteral](str){ }<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){text_blob}<LEND>[call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){text_blob}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){text_blob}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){\\W*\\b\\w{1,2}\\b}<LSEP>[](symbol){text_blob}<LSEP>[argument 2; litteral](str){ }<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){text_blob}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){\\s+}<LSEP>[](symbol){text_blob}<LSEP>[argument 2; litteral](str){ }<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){sentence_vector}<LEND>[call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){text_blob}<LSEP>[argument 1; litteral](str){ }<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){sentence_vector}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){comment_text}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){comment_text}<LEND>[](symbol){Clean_Sentences}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){toxicwordscount}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){toxicwords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){severe_toxicwords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){severe_toxicwords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){obscenewords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){obscenewords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){threatwords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){threatwords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){insultwords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){insultwords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){identity_hatewords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){traindoc}<LSEP>[](symbol){identity_hatewords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){comment_text}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){comment_text}<LEND>[](symbol){Clean_Sentences}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){toxicwordscount}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){toxicwords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){severe_toxicwords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){severe_toxicwords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){obscenewords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){obscenewords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){threatwords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){threatwords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){insultwords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){insultwords}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){identity_hatewords}<LEND>[call](){}<LSEP>[](symbol){wordcounts}<LSEP>[](symbol){testdoc}<LSEP>[](symbol){identity_hatewords}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){testdoc}<LSEP>[argument 1; litteral](str){testdoc.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){traindoc}<LSEP>[argument 1; litteral](str){traindoc.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){MASS}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[assign](){<-}<LSEP>[](symbol){numTrees}<LSEP>[litteral](real){50.000000}<LEND>[assign](){<-}<LSEP>[](symbol){numRowsForModel}<LSEP>[litteral](real){10000.000000}<LEND>[assign](){<-}<LSEP>[](symbol){numRowsForMDS}<LSEP>[litteral](real){1000.000000}<LEND>[assign](){<-}<LSEP>[](symbol){numRowsToDrawAsImages}<LSEP>[litteral](real){750.000000}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){smallTrain}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[](symbol){numRowsForModel}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){smallTrain}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){smallTrain}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){smallTrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){inMyTrain}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[](symbol){numRowsForModel}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){myTrain}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){smallTrain}<LSEP>[](symbol){inMyTrain}<LSEP>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){myTest}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){smallTrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){inMyTrain}<LEND>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){labelsMyTrain}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){labels}<LSEP>[](symbol){inMyTrain}<LEND>[assign](){=}<LSEP>[](symbol){labelsMyTest}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LSEP>[](symbol){inMyTrain}<LEND>[assign](){<-}<LSEP>[](symbol){rf}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LSEP>[](symbol){myTrain}<LSEP>[](symbol){labelsMyTrain}<LSEP>[](symbol){numTrees}<LSEP>[](symbol){myTest}<LSEP>[argument 4; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LSEP>[](symbol){labels}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rf}<LSEP>[](symbol){test}<LEND>[](symbol){predicted}<LEND>[assign](){=}<LSEP>[](symbol){predictionIsCorrect}<LEND>[call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){labelsMyTest}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){Proportion correct in my test ...}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){predictionIsCorrect}<LEND>[assign](){=}<LSEP>[](symbol){prox}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rf}<LSEP>[](symbol){test}<LEND>[](symbol){proximity}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){myTest}<LEND>[assign](){=}<LSEP>[](symbol){proxSmall}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){prox}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){numRowsForMDS}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){numRowsForMDS}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Beginnging MDS (embedding data...}<LEND>[assign](){=}<LSEP>[](symbol){embeddingSmall}<LEND>[call](){}<LSEP>[](symbol){isoMDS}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){proxSmall}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){embeddedSubsetPredictions}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){predictions}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){numRowsForMDS}<LEND>[assign](){<-}<LSEP>[](symbol){embeddedSubsetLabels}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){labelsMyTest}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){numRowsForMDS}<LEND>[assign](){<-}<LSEP>[](symbol){embeddedSubsetPredictionIsCorrect}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){predictionIsCorrect}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){numRowsForMDS}<LEND>[assign](){<-}<LSEP>[](symbol){makeAnnotationRaster}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){rowNum}<LSEP>[](symbol){size}<LSEP>[](symbol){posDF}<LSEP>[](symbol){imageDF}<LSEP>[](symbol){correct}<LSEP>[](symbol){digit}<LSEP>[](symbol){colors}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){row}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){imageDF}<LSEP>[](symbol){rowNum}<LSEP>[](symbol){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){row}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){row}<LEND>[argument 1; litteral](real){0.800000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){rowHSV}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){correct}<LSEP>[](symbol){rowNum}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){rgb}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){colors}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){digit}<LSEP>[](symbol){rowNum}<LEND>[argument 2; litteral](str){r}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){colors}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){digit}<LSEP>[](symbol){rowNum}<LEND>[argument 2; litteral](str){g}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){colors}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){digit}<LSEP>[](symbol){rowNum}<LEND>[argument 2; litteral](str){b}<LEND>[argument 3; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){0.800000}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.700000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){hsv}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){0.800000}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){rowMatrix}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){rowHSV}<LEND>[argument 1; litteral](real){28.000000}<LSEP>[argument 2; litteral](real){28.000000}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){plotSize}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){correct}<LSEP>[](symbol){rowNum}<LEND>[](symbol){size}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){size}<LSEP>[argument 1; litteral](real){1.500000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){pos}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){posDF}<LSEP>[](symbol){rowNum}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){plotSize}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){posDF}<LSEP>[](symbol){rowNum}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){plotSize}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){annotation_raster}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){rowMatrix}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pos}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pos}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pos}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pos}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[assign](){=}<LSEP>[](symbol){colors}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){166.000000}<LSEP>[argument 1; litteral](real){31.000000}<LSEP>[argument 2; litteral](real){178.000000}<LSEP>[argument 3; litteral](real){51.000000}<LSEP>[argument 4; litteral](real){251.000000}<LSEP>[argument 5; litteral](real){227.000000}<LSEP>[argument 6; litteral](real){253.000000}<LSEP>[argument 7; litteral](real){255.000000}<LSEP>[argument 8; litteral](real){202.000000}<LSEP>[argument 9; litteral](real){106.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){206.000000}<LSEP>[argument 1; litteral](real){120.000000}<LSEP>[argument 2; litteral](real){223.000000}<LSEP>[argument 3; litteral](real){160.000000}<LSEP>[argument 4; litteral](real){154.000000}<LSEP>[argument 5; litteral](real){26.000000}<LSEP>[argument 6; litteral](real){191.000000}<LSEP>[argument 7; litteral](real){127.000000}<LSEP>[argument 8; litteral](real){178.000000}<LSEP>[argument 9; litteral](real){61.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){227.000000}<LSEP>[argument 1; litteral](real){180.000000}<LSEP>[argument 2; litteral](real){138.000000}<LSEP>[argument 3; litteral](real){44.000000}<LSEP>[argument 4; litteral](real){153.000000}<LSEP>[argument 5; litteral](real){28.000000}<LSEP>[argument 6; litteral](real){111.000000}<LSEP>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){214.000000}<LSEP>[argument 9; litteral](real){154.000000}<LEND>[argument 1; litteral](real){255.000000}<LEND>[assign](){=}<LSEP>[](symbol){rowsForPlottingAsImages}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){numRowsForMDS}<LEND>[](symbol){numRowsToDrawAsImages}<LEND>[assign](){=}<LSEP>[](symbol){ARs}<LEND>[call](){}<LSEP>[](symbol){Map}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){rows}<LEND>[body; call](){}<LSEP>[](symbol){makeAnnotationRaster}<LSEP>[](symbol){rows}<LSEP>[argument 1; litteral](real){0.050000}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){embeddingSmall}<LSEP>[](symbol){points}<LEND>[](symbol){myTest}<LEND>[argument 4; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){predictions}<LSEP>[](symbol){labelsMyTest}<LEND>[argument 5; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){labelsMyTest}<LEND>[](symbol){colors}<LEND>[](symbol){rowsForPlottingAsImages}<LEND>[assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){embeddingSmall}<LSEP>[](symbol){points}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X1}<LSEP>[](symbol){X2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_blank}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_shape_manual}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){17.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_size_manual}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){5.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){True Label }<LSEP>[argument 1; litteral](str){Correctly Classified }<LSEP>[argument 2; litteral](str){Correctly Classified }<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_light}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 2; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 3; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 4; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 5; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 6; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 7; litteral](str){top}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){2D MNIST Embedding Using RF Pr...}<LEND>[call](){}<LSEP>[](symbol){png}<LSEP>[argument 0; litteral](str){DigitsEmbedding.png}<LSEP>[argument 1; litteral](real){960.000000}<LSEP>[argument 2; litteral](real){960.000000}<LEND>[call](){}<LSEP>[](symbol){Reduce}<LSEP>[argument 0; litteral](str){+}<LSEP>[](symbol){ARs}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){invisible}<LEND>[argument 0; call](){}<LSEP>[](symbol){dev.off} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Survived}<LSEP>[argument 1; litteral](str){Died}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){1st Class}<LSEP>[argument 1; litteral](str){2nd Class}<LSEP>[argument 2; litteral](str){3rd Class}<LEND>[call](){}<LSEP>[](symbol){png}<LSEP>[argument 0; litteral](str){1_survival_by_class.png}<LSEP>[argument 1; litteral](real){800.000000}<LSEP>[argument 2; litteral](real){600.000000}<LEND>[call](){}<LSEP>[](symbol){mosaicplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){Passenger Survival by Class}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){#8dd3c7}<LSEP>[argument 1; litteral](str){#fb8072}<LEND>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](str){}<LSEP>[argument 5; litteral](str){}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 7; litteral](real){1.400000}<LEND>[call](){}<LSEP>[](symbol){dev.off} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){loadCleanData}<LEND>[](){function}<LSEP>[parameters; litteral](NULL){NULL}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){trainPath}<LSEP>[litteral](str){../input/train.csv}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){testPath}<LSEP>[litteral](str){../input/test.csv}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[](symbol){trainPath}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](str){,}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[](symbol){testPath}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](str){,}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SampleOrigin}<LEND>[litteral](str){TRAIN}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){SampleOrigin}<LEND>[litteral](str){TEST}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[litteral](logical){NA}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){fullData}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[statement 8; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){SampleOrigin}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){SampleOrigin}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Survived}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Pclass}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Sex}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Sex}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Embarked}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Embarked}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){fullData}<LEND>[assign](){<-}<LSEP>[](symbol){normal.charts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){main.label}<LSEP>[](symbol){x.label}<LSEP>[](symbol){normalized}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){normalized}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){normalize}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){hist}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](str){red}<LSEP>[](symbol){x.label}<LSEP>[](symbol){main.label}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xfit}<LEND>[call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){x}<LEND>[argument 2; litteral](real){40.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){yfit}<LEND>[call](){}<LSEP>[](symbol){dnorm}<LSEP>[](symbol){xfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){sd}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){yfit}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){yfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){h}<LSEP>[](symbol){mids}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 5; call](){}<LSEP>[](symbol){lines}<LSEP>[](symbol){xfit}<LSEP>[](symbol){yfit}<LSEP>[argument 2; litteral](str){blue}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){poisson.charts}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){main.label}<LSEP>[](symbol){x.label}<LSEP>[](symbol){normalized}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){normalized}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){normalize}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){hist}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){10.000000}<LSEP>[argument 2; litteral](str){red}<LSEP>[](symbol){x.label}<LSEP>[](symbol){main.label}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){xfit}<LEND>[call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){yfit}<LEND>[call](){}<LSEP>[](symbol){dpois}<LSEP>[](symbol){xfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){yfit}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){yfit}<LEND>[argument 1; call](){}<LSEP>[](symbol){diff}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){h}<LSEP>[](symbol){mids}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 5; call](){}<LSEP>[](symbol){lines}<LSEP>[](symbol){xfit}<LSEP>[](symbol){yfit}<LSEP>[argument 2; litteral](str){blue}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){fullData}<LEND>[call](){}<LSEP>[](symbol){loadCleanData}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){fullData}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fullData}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[assign](){<-}<LSEP>[](symbol){x.age}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fullData}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Age}<LEND>[](symbol){}<LEND>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[](symbol){x.sibsp}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fullData}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){SibSp}<LEND>[](symbol){}<LEND>[](symbol){SibSp}<LEND>[assign](){<-}<LSEP>[](symbol){x.parch}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fullData}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Parch}<LEND>[](symbol){}<LEND>[](symbol){Parch}<LEND>[assign](){<-}<LSEP>[](symbol){x.fare}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fullData}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Fare}<LEND>[](symbol){}<LEND>[](symbol){Fare}<LEND>[call](){}<LSEP>[](symbol){boxplot}<LSEP>[](symbol){x.age}<LSEP>[argument 1; litteral](str){Age}<LEND>[call](){}<LSEP>[](symbol){boxplot}<LSEP>[](symbol){x.sibsp}<LSEP>[argument 1; litteral](str){Siblings/Spouses}<LEND>[call](){}<LSEP>[](symbol){boxplot}<LSEP>[](symbol){x.parch}<LSEP>[argument 1; litteral](str){Parents/Childrens}<LEND>[call](){}<LSEP>[](symbol){boxplot}<LSEP>[](symbol){x.fare}<LSEP>[argument 1; litteral](str){Fare}<LEND>[call](){}<LSEP>[](symbol){normal.charts}<LSEP>[](symbol){x.age}<LSEP>[argument 1; litteral](str){Hist Age variable}<LSEP>[argument 2; litteral](str){Age}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){normal.charts}<LSEP>[](symbol){x.sibsp}<LSEP>[argument 1; litteral](str){Hist SibSp variable}<LSEP>[argument 2; litteral](str){Siblings/Spouses Aboard}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){normal.charts}<LSEP>[](symbol){x.parch}<LSEP>[argument 1; litteral](str){Hist Parch variable}<LSEP>[argument 2; litteral](str){Parents/Children Aboard}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){normal.charts}<LSEP>[](symbol){x.fare}<LSEP>[argument 1; litteral](str){Hist Fare variable}<LSEP>[argument 2; litteral](str){Fare paid}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){qqnorm}<LSEP>[](symbol){x.age}<LEND>[call](){}<LSEP>[](symbol){qqline}<LSEP>[](symbol){x.age}<LEND>[call](){}<LSEP>[](symbol){qqnorm}<LSEP>[](symbol){x.sibsp}<LEND>[call](){}<LSEP>[](symbol){qqline}<LSEP>[](symbol){x.sibsp}<LEND>[call](){}<LSEP>[](symbol){qqnorm}<LSEP>[](symbol){x.parch}<LEND>[call](){}<LSEP>[](symbol){qqline}<LSEP>[](symbol){x.parch}<LEND>[call](){}<LSEP>[](symbol){qqnorm}<LSEP>[](symbol){x.fare}<LEND>[call](){}<LSEP>[](symbol){qqline}<LSEP>[](symbol){x.fare}<LEND>[call](){}<LSEP>[](symbol){title}<LSEP>[argument 0; litteral](str){Normal distributions}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){poisson.charts}<LSEP>[](symbol){x.parch}<LSEP>[argument 1; litteral](str){Hist Parch variable}<LSEP>[argument 2; litteral](str){Parents/Children Aboard}<LEND>[call](){}<LSEP>[](symbol){poisson.charts}<LSEP>[](symbol){x.sibsp}<LSEP>[argument 1; litteral](str){Hist SibSp variable}<LSEP>[argument 2; litteral](str){Siblings/Spouses Aboard}<LEND>[call](){}<LSEP>[](symbol){title}<LSEP>[argument 0; litteral](str){Poisson distributions}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){x.pclass}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fullData}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Pclass}<LEND>[](symbol){}<LEND>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[](symbol){x.sex}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fullData}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Sex}<LEND>[](symbol){}<LEND>[](symbol){Sex}<LEND>[assign](){<-}<LSEP>[](symbol){x.embarked}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fullData}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Embarked}<LEND>[](symbol){}<LEND>[](symbol){Embarked}<LEND>[assign](){<-}<LSEP>[](symbol){x.survived}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fullData}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fullData}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){x.pclass}<LSEP>[argument 1; litteral](str){Trip classes}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){x.sex}<LSEP>[argument 1; litteral](str){Sex}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){x.embarked}<LSEP>[argument 1; litteral](str){Embarked on}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){x.survived}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){title}<LSEP>[argument 0; litteral](str){Known qualitative data}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){x.pclass.table}<LEND>[call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){x.pclass}<LEND>[assign](){<-}<LSEP>[](symbol){x.sex.table}<LEND>[call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){x.sex}<LEND>[assign](){<-}<LSEP>[](symbol){x.embarked.table}<LEND>[call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){x.embarked}<LEND>[assign](){<-}<LSEP>[](symbol){x.survived.table}<LEND>[call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){x.survived}<LEND>[call](){}<LSEP>[](symbol){prop.table}<LSEP>[](symbol){x.pclass.table}<LEND>[call](){}<LSEP>[](symbol){prop.table}<LSEP>[](symbol){x.sex.table}<LEND>[call](){}<LSEP>[](symbol){prop.table}<LSEP>[](symbol){x.embarked.table}<LEND>[call](){}<LSEP>[](symbol){prop.table}<LSEP>[](symbol){x.survived.table}<LEND>[call](){}<LSEP>[](symbol){pie}<LSEP>[](symbol){x.pclass.table}<LEND>[call](){}<LSEP>[](symbol){pie}<LSEP>[](symbol){x.sex.table}<LEND>[call](){}<LSEP>[](symbol){pie}<LSEP>[](symbol){x.embarked.table}<LEND>[call](){}<LSEP>[](symbol){pie}<LSEP>[](symbol){x.survived.table}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){quali.xtabs}<LEND>[call](){}<LSEP>[](symbol){xtabs}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Embarked}<LEND>[](symbol){Survived}<LEND>[](symbol){fullData}<LEND>[assign](){<-}<LSEP>[](symbol){quali.xtabs.ftable}<LEND>[call](){}<LSEP>[](symbol){ftable}<LSEP>[](symbol){quali.xtabs}<LEND>[assign](){<-}<LSEP>[](symbol){quali.xtabs.proptable}<LEND>[call](){}<LSEP>[](symbol){prop.table}<LSEP>[](symbol){quali.xtabs.ftable}<LEND>[call](){}<LSEP>[](symbol){barplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){prop.table}<LSEP>[](symbol){quali.xtabs.proptable}<LEND>[argument 1; litteral](str){Frequencies of survivors in fu...}<LSEP>[argument 2; litteral](str){Frequencies of survivors}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Not survived}<LSEP>[argument 1; litteral](str){Survived}<LEND>[argument 4; litteral](logical){TRUE}<LEND>[](symbol){quali.xtabs.ftable}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){quali.xtabs.ftable} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){jsonlite}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){plyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tm}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rpart}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rpart.plot}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[assign](){<-}<LSEP>[](symbol){traincook}<LEND>[call](){}<LSEP>[](symbol){fromJSON}<LSEP>[argument 0; litteral](str){../input/train.json}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){testcook}<LEND>[call](){}<LSEP>[](symbol){fromJSON}<LSEP>[argument 0; litteral](str){../input/test.json}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){traincook}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){cuisine}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Cuisines}<LSEP>[argument 1; litteral](str){Cuisine}<LSEP>[argument 2; litteral](str){Number of Recipes}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traincook}<LSEP>[](symbol){cuisine}<LEND>[assign](){<-}<LSEP>[](symbol){CorpusTrain}<LEND>[call](){}<LSEP>[](symbol){Corpus}<LEND>[argument 0; call](){}<LSEP>[](symbol){VectorSource}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traincook}<LSEP>[](symbol){ingredients}<LEND>[assign](){<-}<LSEP>[](symbol){CorpusTest}<LEND>[call](){}<LSEP>[](symbol){Corpus}<LEND>[argument 0; call](){}<LSEP>[](symbol){VectorSource}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testcook}<LSEP>[](symbol){ingredients}<LEND>[assign](){<-}<LSEP>[](symbol){CorpusTrain}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){CorpusTrain}<LSEP>[](symbol){stemDocument}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){CorpusTest}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){CorpusTest}<LSEP>[](symbol){stemDocument}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){ingredientsDTM}<LEND>[call](){}<LSEP>[](symbol){DocumentTermMatrix}<LSEP>[](symbol){CorpusTrain}<LEND>[assign](){<-}<LSEP>[](symbol){ingredientsDTM2}<LEND>[call](){}<LSEP>[](symbol){DocumentTermMatrix}<LSEP>[](symbol){CorpusTest}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){traincook}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1234.000000}<LEND>[assign](){=}<LSEP>[](symbol){ind}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){traincook}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.700000}<LSEP>[argument 1; litteral](real){0.300000}<LEND>[assign](){=}<LSEP>[](symbol){trainData}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traincook}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ind}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){testData}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traincook}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){ind}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){party}<LEND>[assign](){=}<LSEP>[](symbol){Formula}<LEND>[call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){cuisine}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){traincook}<LSEP>[](symbol){ingredients}<LEND>[assign](){=}<LSEP>[](symbol){cookctree}<LEND>[call](){}<LSEP>[](symbol){ctree}<LSEP>[](symbol){Formula}<LSEP>[](symbol){trainData}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){cookctree}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){trainData}<LSEP>[](symbol){cuisine} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input} |
[](){expression}<LSEP>[block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){gc}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\x0C}<LEND>[statement 2; call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){packages}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){match.call}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){install.packages}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){http://cran.r-project.org}<LSEP>[](symbol){T}<LSEP>[](symbol){T}<LEND>[statement 1; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){suppressMessages}<LEND>[argument 0; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){packages}<LSEP>[argument 0; litteral](str){data.table}<LEND>[statement 1; call](){}<LSEP>[](symbol){packages}<LSEP>[argument 0; litteral](str){dplyr}<LEND>[statement 2; call](){}<LSEP>[](symbol){packages}<LSEP>[argument 0; litteral](str){xgboost}<LEND>[statement 3; call](){}<LSEP>[](symbol){packages}<LSEP>[argument 0; litteral](str){stringr}<LEND>[statement 4; call](){}<LSEP>[](symbol){packages}<LSEP>[argument 0; litteral](str){magrittr}<LEND>[statement 5; call](){}<LSEP>[](symbol){packages}<LSEP>[argument 0; litteral](str){rowr}<LEND>[statement 6; call](){}<LSEP>[](symbol){packages}<LSEP>[argument 0; litteral](str){ranger}<LEND>[block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){/kaggle/input/test.csv}<LSEP>[](symbol){T}<LSEP>[](symbol){F}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NA}<LSEP>[argument 1; litteral](str){}<LSEP>[argument 2; litteral](str){ }<LSEP>[argument 3; litteral](str){?}<LEND>[argument 4; litteral](str){character}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){/kaggle/input/train.csv}<LSEP>[](symbol){T}<LSEP>[](symbol){F}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NA}<LSEP>[argument 1; litteral](str){}<LSEP>[argument 2; litteral](str){ }<LSEP>[argument 3; litteral](str){?}<LEND>[argument 4; litteral](str){character}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){test_train_cols}<LEND>[call](){}<LSEP>[](symbol){cbind.fill}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){train}<LEND>[argument 2; litteral](logical){NA}<LEND>[block](){}<LSEP>[statement 0; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){useless_cols_fn}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){if_else}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.250000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){y}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LSEP>[litteral](real){0.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){y}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){train_useless_cols}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise_all}<LSEP>[](symbol){useless_cols_fn}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){train_useless_cols_df}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){train_useless_cols}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){train_useless_cols}<LEND>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){flag}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.}<LSEP>[](symbol){col}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){train_1}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){train_useless_cols_df}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){test_1}<LEND>[call](){}<LSEP>[](symbol){%<>%}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){append}<LEND>[argument 0; call](){}<LSEP>[](symbol){intersect}<LSEP>[](symbol){train_useless_cols_df}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){test}<LEND>[argument 1; litteral](str){test_id}<LEND>[statement 1; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){cols_class_fn}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LSEP>[litteral](real){0.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.numeric}<LSEP>[](symbol){x}<LEND>[](symbol){T}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LSEP>[litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LSEP>[litteral](real){0.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LSEP>[litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){train_class}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise_all}<LSEP>[](symbol){cols_class_fn}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){train_class_df}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){train_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){train_class}<LEND>[](symbol){F}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){flag}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.}<LSEP>[](symbol){col}<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){train_class_df}<LEND>[statement 4; call](){}<LSEP>[](symbol){View}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){train_class_df}<LEND>[statement 2; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){mode_fn}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){attr}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){x}<LEND>[](symbol){T}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){name}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[](symbol){y}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){train_2}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){AA3}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate_all}<LSEP>[](symbol){mode_fn}<LEND>[](symbol){ungroup}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){test_2}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){test_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){AA3}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate_all}<LSEP>[](symbol){mode_fn}<LEND>[](symbol){ungroup}<LEND>[statement 3; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){factor_fn}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){unique_temp}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LSEP>[](symbol){x}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){unique_temp}<LSEP>[argument 1; litteral](real){53.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){x}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){x}<LEND>[statement 1; call](){}<LSEP>[](symbol){%<>%}<LSEP>[](symbol){train_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate_all}<LSEP>[](symbol){factor_fn}<LEND>[statement 2; call](){}<LSEP>[](symbol){%<>%}<LSEP>[](symbol){test_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate_all}<LSEP>[](symbol){factor_fn}<LEND>[block](){}<LSEP>[statement 0; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){train_num_f}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate_all}<LSEP>[](symbol){as.numeric}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){train_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){is_female}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){test_num_f}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){test_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate_all}<LSEP>[](symbol){as.numeric}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){test_id}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){pca_feats}<LEND>[call](){}<LSEP>[](symbol){prcomp}<LSEP>[](symbol){train_num_f}<LSEP>[](symbol){T}<LSEP>[](symbol){T}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[](symbol){T}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){expl.var}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pca_feats}<LSEP>[](symbol){sdev}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pca_feats}<LSEP>[](symbol){sdev}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){100.000000}<LEND>[statement 4; block](){}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){pca_feats_to_be_added}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pca_feats}<LSEP>[](symbol){x}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){%<>%}<LSEP>[](symbol){train_num_f}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){.}<LSEP>[](symbol){pca_feats_to_be_added}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){test_pca_pred}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){pca_feats}<LSEP>[](symbol){test_num_f}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){.}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 8; call](){}<LSEP>[](symbol){%<>%}<LSEP>[](symbol){test_num_f}<LEND>[argument 1; call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){.}<LSEP>[](symbol){test_pca_pred}<LEND>[statement 1; block](){}<LEND>[block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){train_1}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train_num_f}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){test_1}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){test_num_f}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LSEP>[argument 0; litteral](NULL){NULL}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){ranger}<LSEP>[](symbol){ranger}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){is_female}<LSEP>[](symbol){.}<LEND>[](symbol){train_1}<LSEP>[argument 2; litteral](real){1000.000000}<LSEP>[argument 3; litteral](real){100.000000}<LSEP>[argument 4; litteral](str){gini}<LSEP>[](symbol){T}<LSEP>[](symbol){T}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model}<LSEP>[](symbol){test_1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){predictions.1}<LEND>[argument 1; call](){}<LSEP>[](symbol){set_colnames}<LSEP>[argument 0; litteral](str){is_female}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){output}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){test_id}<LEND>[](symbol){output}<LEND>[statement 5; call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){output}<LSEP>[argument 1; litteral](str){output_1.csv}<LSEP>[](symbol){}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Survived}<LSEP>[argument 1; litteral](str){Died}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){1st Class}<LSEP>[argument 1; litteral](str){2nd Class}<LSEP>[argument 2; litteral](str){3rd Class}<LEND>[call](){}<LSEP>[](symbol){png}<LSEP>[argument 0; litteral](str){1_survival_by_class.png}<LSEP>[argument 1; litteral](real){800.000000}<LSEP>[argument 2; litteral](real){600.000000}<LEND>[call](){}<LSEP>[](symbol){mosaicplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){Passenger Survival by Class}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){#8dd3c7}<LSEP>[argument 1; litteral](str){#fb8072}<LEND>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](str){}<LSEP>[argument 5; litteral](str){}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 7; litteral](real){1.400000}<LEND>[call](){}<LSEP>[](symbol){dev.off}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){train} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){24.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){time}<LSEP>[](symbol){minute}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){24.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[assign](){<-}<LSEP>[](symbol){se}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){var}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){by_day}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){day}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarize}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){accuracy}<LEND>[argument 3; call](){}<LSEP>[](symbol){se}<LSEP>[](symbol){x}<LEND>[argument 4; call](){}<LSEP>[](symbol){se}<LSEP>[](symbol){y}<LEND>[argument 5; call](){}<LSEP>[](symbol){se}<LSEP>[](symbol){accuracy}<LEND>[assign](){<-}<LSEP>[](symbol){limits_x}<LEND>[call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.mean}<LSEP>[](symbol){x.se}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x.mean}<LSEP>[](symbol){x.se}<LEND>[assign](){<-}<LSEP>[](symbol){limits_y}<LEND>[call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){y.mean}<LSEP>[](symbol){y.se}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y.mean}<LSEP>[](symbol){y.se}<LEND>[assign](){<-}<LSEP>[](symbol){limits_acc}<LEND>[call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){accuracy.mean}<LSEP>[](symbol){accuracy.se}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){accuracy.mean}<LSEP>[](symbol){accuracy.se}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){by_day}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){x.mean}<LSEP>[](symbol){y.mean}<LSEP>[](symbol){day}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){y vs x per day}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){by_day}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){day}<LSEP>[](symbol){x.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_pointrange}<LSEP>[](symbol){limits_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Mean x vs day}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){by_day}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){day}<LSEP>[](symbol){y.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_pointrange}<LSEP>[](symbol){limits_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Mean y vs day}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){by_day}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){day}<LSEP>[](symbol){accuracy.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_pointrange}<LSEP>[](symbol){limits_acc}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Mean accuracy vs day}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){24.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){time}<LSEP>[](symbol){minute}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){24.000000}<LSEP>[argument 1; litteral](real){60.000000}<LEND>[assign](){<-}<LSEP>[](symbol){by_day_test}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){day}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarize}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){accuracy}<LEND>[argument 3; call](){}<LSEP>[](symbol){se}<LSEP>[](symbol){x}<LEND>[argument 4; call](){}<LSEP>[](symbol){se}<LSEP>[](symbol){y}<LEND>[argument 5; call](){}<LSEP>[](symbol){se}<LSEP>[](symbol){accuracy}<LEND>[assign](){<-}<LSEP>[](symbol){limits_x}<LEND>[call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){x.mean}<LSEP>[](symbol){x.se}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x.mean}<LSEP>[](symbol){x.se}<LEND>[assign](){<-}<LSEP>[](symbol){limits_y}<LEND>[call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){y.mean}<LSEP>[](symbol){y.se}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){y.mean}<LSEP>[](symbol){y.se}<LEND>[assign](){<-}<LSEP>[](symbol){limits_acc}<LEND>[call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){accuracy.mean}<LSEP>[](symbol){accuracy.se}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){accuracy.mean}<LSEP>[](symbol){accuracy.se}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){by_day_test}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){x.mean}<LSEP>[](symbol){y.mean}<LSEP>[](symbol){day}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){y vs x per day (test)}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){by_day_test}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){day}<LSEP>[](symbol){x.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_pointrange}<LSEP>[](symbol){limits_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Mean x vs day (test)}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){by_day_test}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){day}<LSEP>[](symbol){y.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_pointrange}<LSEP>[](symbol){limits_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Mean y vs day (test)}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){by_day_test}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){day}<LSEP>[](symbol){accuracy.mean}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_pointrange}<LSEP>[](symbol){limits_acc}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Mean accuracy vs day (test)} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){training}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){training}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){data}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Embarked}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Embarked}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Sex}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Sex}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){N_Family}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){SibSp}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){individual_price}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){N_Family}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){individual_price}<LEND>[argument 1; litteral](real){1044.000000}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){individual_price}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Pclass}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Embarked}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){S}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){(.*, )|(\\..*)}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Name}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Ms}<LEND>[litteral](str){Miss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Dr}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Dr}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Master}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Master}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Miss}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Miss}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mr}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mr}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mrs}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mrs}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){tr_data}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){te_data}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){892.000000}<LSEP>[argument 1; litteral](real){1309.000000}<LEND>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){model_logistic}<LEND>[call](){}<LSEP>[](symbol){glm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Age}<LEND>[](symbol){N_Family}<LEND>[argument 1; call](){}<LSEP>[](symbol){binomial}<LSEP>[argument 0; litteral](str){logit}<LEND>[](symbol){tr_data}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){model_logistic}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tr_data}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model_logistic}<LSEP>[](symbol){tr_data}<LSEP>[argument 2; litteral](str){response}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){te_data}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model_logistic}<LSEP>[](symbol){te_data}<LSEP>[argument 2; litteral](str){response}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){te_data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){Titanic_sol.csv}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){gbm}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Reading data\n}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){desc}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/product_descriptions.csv}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Merge description with train a...}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){desc}<LSEP>[argument 2; litteral](str){product_uid}<LSEP>[argument 3; litteral](str){product_uid}<LSEP>[argument 4; litteral](logical){TRUE}<LSEP>[argument 5; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){desc}<LSEP>[argument 2; litteral](str){product_uid}<LSEP>[argument 3; litteral](str){product_uid}<LSEP>[argument 4; litteral](logical){TRUE}<LSEP>[argument 5; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){Sys.time}<LEND>[assign](){<-}<LSEP>[](symbol){word_match}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){words}<LSEP>[](symbol){title}<LSEP>[](symbol){desc}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n_title}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n_desc}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){words}<LEND>[call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){words}<LSEP>[argument 1; litteral](str){ }<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){nwords}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){words}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){words}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){pattern}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){(^| )}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){words}<LSEP>[](symbol){i}<LEND>[argument 2; litteral](str){($| )}<LSEP>[argument 3; litteral](str){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){n_title}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n_title}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[](symbol){pattern}<LSEP>[](symbol){title}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n_desc}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){n_desc}<LEND>[argument 1; call](){}<LSEP>[](symbol){grepl}<LSEP>[](symbol){pattern}<LSEP>[](symbol){desc}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){n_title}<LSEP>[](symbol){nwords}<LSEP>[](symbol){n_desc}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Get number of words and word m...}<LEND>[assign](){<-}<LSEP>[](symbol){train_words}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){mapply}<LSEP>[](symbol){word_match}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){search_term}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){product_title}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){product_description}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){nmatch_title}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_words}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){nwords}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_words}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){nmatch_desc}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_words}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Get number of words and word m...}<LEND>[assign](){<-}<LSEP>[](symbol){test_words}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){mapply}<LSEP>[](symbol){word_match}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){search_term}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){product_title}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){product_description}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){nmatch_title}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test_words}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){nwords}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test_words}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){nmatch_desc}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test_words}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train_words}<LSEP>[](symbol){test_words}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){A simple linear model on numbe...}<LEND>[assign](){<-}<LSEP>[](symbol){gbm_model}<LEND>[call](){}<LSEP>[](symbol){gbm.fit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){7.000000}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){relevance}<LEND>[argument 2; litteral](str){gaussian}<LSEP>[argument 3; litteral](real){2.000000}<LSEP>[argument 4; litteral](real){0.050000}<LSEP>[argument 5; litteral](real){500.000000}<LEND>[assign](){<-}<LSEP>[](symbol){test_relevance}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){gbm_model}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){6.000000}<LSEP>[argument 1; litteral](real){8.000000}<LEND>[argument 2; litteral](real){600.000000}<LEND>[assign](){<-}<LSEP>[](symbol){test_relevance}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){test_relevance}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){3.000000}<LSEP>[](symbol){test_relevance}<LEND>[assign](){<-}<LSEP>[](symbol){test_relevance}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){test_relevance}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){test_relevance}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){id}<LEND>[](symbol){test_relevance}<LEND>[call](){}<LSEP>[](symbol){write_csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){benchmark_submission.csv}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[](symbol){t} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[assign](){=}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){read_tsv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){tt} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){FeatureHashing}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Matrix}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Reading data\n}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){=}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/people.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Processing data\n}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){char_1}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){people_}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[assign](){<-}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){people}<LSEP>[](symbol){is.logical}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LSEP>[](symbol){p_logi}<LEND>[body; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){people}<LSEP>[](symbol){col}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){people}<LSEP>[](symbol){col}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){group unique}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){d2}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[](symbol){row.train}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){d1}<LSEP>[](symbol){d2}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){test_activity_id}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){activity_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LSEP>[](symbol){d1}<LSEP>[](symbol){d2}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){char.cols}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_category}<LSEP>[argument 1; litteral](str){people_group_1}<LSEP>[argument 2; litteral](str){char_1}<LSEP>[argument 3; litteral](str){char_2}<LSEP>[argument 4; litteral](str){char_3}<LSEP>[argument 5; litteral](str){char_4}<LSEP>[argument 6; litteral](str){char_5}<LSEP>[argument 7; litteral](str){char_6}<LSEP>[argument 8; litteral](str){char_7}<LSEP>[argument 9; litteral](str){char_8}<LSEP>[argument 10; litteral](str){char_9}<LSEP>[argument 11; litteral](str){char_10}<LSEP>[argument 12; litteral](str){people_char_2}<LSEP>[argument 13; litteral](str){people_char_3}<LSEP>[argument 14; litteral](str){people_char_4}<LSEP>[argument 15; litteral](str){people_char_5}<LSEP>[argument 16; litteral](str){people_char_6}<LSEP>[argument 17; litteral](str){people_char_7}<LSEP>[argument 18; litteral](str){people_char_8}<LSEP>[argument 19; litteral](str){people_char_9}<LEND>[control flow](){for}<LSEP>[](symbol){f}<LSEP>[](symbol){char.cols}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){character}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making sparse data (1)\n}<LEND>[assign](){=}<LSEP>[](symbol){D.sparse}<LEND>[call](){}<LSEP>[](symbol){cBind}<LEND>[argument 0; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){activity_category}<LEND>[argument 1; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_group_1}<LEND>[argument 2; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_1}<LEND>[argument 3; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_2}<LEND>[argument 4; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_3}<LEND>[argument 5; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_4}<LEND>[argument 6; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_5}<LEND>[argument 7; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_6}<LEND>[argument 8; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_7}<LEND>[argument 9; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_8}<LEND>[argument 10; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_9}<LEND>[argument 11; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_2}<LEND>[argument 12; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_3}<LEND>[argument 13; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_4}<LEND>[argument 14; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_5}<LEND>[argument 15; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_6}<LEND>[argument 16; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_7}<LEND>[argument 17; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_8}<LEND>[argument 18; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_9}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making sparse data (2)\n}<LEND>[assign](){=}<LSEP>[](symbol){D.sparse}<LEND>[call](){}<LSEP>[](symbol){cBind}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_10}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_11}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_12}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_13}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_14}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_15}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_16}<LEND>[argument 8; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_17}<LEND>[argument 9; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_18}<LEND>[argument 10; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_19}<LEND>[argument 11; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_20}<LEND>[argument 12; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_21}<LEND>[argument 13; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_22}<LEND>[argument 14; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_23}<LEND>[argument 15; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_24}<LEND>[argument 16; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_25}<LEND>[argument 17; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_26}<LEND>[argument 18; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_27}<LEND>[argument 19; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_28}<LEND>[argument 20; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_29}<LEND>[argument 21; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_30}<LEND>[argument 22; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_31}<LEND>[argument 23; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_32}<LEND>[argument 24; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_33}<LEND>[argument 25; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_34}<LEND>[argument 26; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_35}<LEND>[argument 27; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_36}<LEND>[argument 28; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_37}<LEND>[argument 29; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_38}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Unmerging train/test sparse da...}<LEND>[assign](){=}<LSEP>[](symbol){train.sparse}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){row.train}<LEND>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){test.sparse}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){row.train}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){D.sparse}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Making data for SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating SVMLight format\n}<LEND>[assign](){<-}<LSEP>[](symbol){dtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){train.sparse}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Exporting SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix.save}<LSEP>[](symbol){dtrain}<LSEP>[argument 1; litteral](str){dtrain.data}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Zipping SVMLight\n}<LEND>[call](){}<LSEP>[](symbol){zip}<LSEP>[argument 0; litteral](str){dtrain.data.zip}<LSEP>[argument 1; litteral](str){dtrain.data}<LSEP>[argument 2; litteral](str){-m9X}<LSEP>[argument 3; litteral](str){}<LEND>[argument 4; call](){}<LSEP>[](symbol){Sys.getenv}<LSEP>[argument 0; litteral](str){R_ZIPCMD}<LSEP>[argument 1; litteral](str){zip}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){File size of train in SVMLight: }<LEND>[argument 1; call](){}<LSEP>[](symbol){file.size}<LSEP>[argument 0; litteral](str){dtrain.data.zip}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating SVMLight format\n}<LEND>[assign](){<-}<LSEP>[](symbol){dtest}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){test.sparse}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Exporting SVMLight format\n}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix.save}<LSEP>[](symbol){dtest}<LSEP>[argument 1; litteral](str){dtest.data}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Zipping SVMLight\n}<LEND>[call](){}<LSEP>[](symbol){zip}<LSEP>[argument 0; litteral](str){dtest.data.zip}<LSEP>[argument 1; litteral](str){dtest.data}<LSEP>[argument 2; litteral](str){-m9X}<LSEP>[argument 3; litteral](str){}<LEND>[argument 4; call](){}<LSEP>[](symbol){Sys.getenv}<LSEP>[argument 0; litteral](str){R_ZIPCMD}<LSEP>[argument 1; litteral](str){zip}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){File size of test in SVMLight: }<LEND>[argument 1; call](){}<LSEP>[](symbol){file.size}<LSEP>[argument 0; litteral](str){dtest.data.zip}<LEND>[argument 2; litteral](str){\n}<LSEP>[argument 3; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){binary:logistic}<LSEP>[argument 1; litteral](str){auc}<LSEP>[argument 2; litteral](str){gbtree}<LSEP>[argument 3; litteral](real){0.050000}<LSEP>[argument 4; litteral](real){0.860000}<LSEP>[argument 5; litteral](real){0.920000}<LSEP>[argument 6; litteral](real){0.900000}<LSEP>[argument 7; litteral](real){1.000000}<LSEP>[argument 8; litteral](real){0.005000}<LSEP>[argument 9; litteral](real){11.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){XGBoost\n}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1712.000000}<LEND>[assign](){<-}<LSEP>[](symbol){m2}<LEND>[call](){}<LSEP>[](symbol){xgb.train}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){param}<LSEP>[argument 2; litteral](real){560.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dtrain}<LEND>[argument 4; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predicting on test data\n}<LEND>[assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){m2}<LSEP>[](symbol){dtest}<LEND>[assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){test_activity_id}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){sub}<LSEP>[argument 1; litteral](str){model_sub.csv}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Cleaning up...\n}<LEND>[call](){}<LSEP>[](symbol){remove}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Doing Loiso's magic leak\n}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Working on people\n}<LEND>[assign](){<-}<LSEP>[](symbol){ppl}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/people.csv}<LEND>[assign](){<-}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){ppl}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){ppl}<LSEP>[](symbol){is.logical}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LSEP>[](symbol){p_logi}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){ppl}<LSEP>[](symbol){col}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){ppl}<LSEP>[](symbol){col}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ppl}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){date}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){date}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Working on data\n}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){TestActivs}<LSEP>[](symbol){outcome}<LEND>[litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){activs}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Merging\n}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){activs}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){people_id}<LSEP>[argument 1; litteral](str){outcome}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[argument 3; litteral](str){date}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){activs}<LSEP>[](symbol){ppl}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){testset}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){activdate}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){date.x}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating interaction\n}<LEND>[assign](){<-}<LSEP>[](symbol){minactivdate}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){maxactivdate}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){alldays}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){minactivdate}<LSEP>[](symbol){maxactivdate}<LSEP>[argument 2; litteral](str){day}<LEND>[assign](){<-}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[](symbol){alldays}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[call](){}<LSEP>[](symbol){setkey}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[argument 1; litteral](str){group_1}<LSEP>[argument 2; litteral](str){date.p}<LEND>[assign](){<-}<LSEP>[](symbol){meanbycomdate}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[argument 2; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){outcome}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){meanbycomdate}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){interpolateFun}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){borders}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){forward_border}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){borders}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){borders}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){backward_border}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){borders}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){borders}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){forward_border_x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){forward_border}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_border_x}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.200000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){backward_border_x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){backward_border}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){backward_border_x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){forward_x_fill}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){backward_x_fill}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){backward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){forward_x_fill_2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){forward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_x_fill}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){backward_x_fill_2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_x_fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){backward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){vec}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){forward_x_fill}<LSEP>[](symbol){backward_x_fill}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vec}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Applying interaction interpola...}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){filled}<LEND>[argument 1; call](){}<LSEP>[](symbol){interpolateFun}<LSEP>[](symbol){V1}<LEND>[argument 3; litteral](str){group_1}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){d1}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){T}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predicting leak\n}<LEND>[assign](){<-}<LSEP>[](symbol){testsetdt}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_id}<LSEP>[argument 1; litteral](str){filled}<LEND>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){testsetdt}<LSEP>[argument 1; litteral](str){Submission.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Cleaning up...\n}<LEND>[call](){}<LSEP>[](symbol){remove}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Combining two submissions on t...}<LEND>[assign](){<-}<LSEP>[](symbol){submit1}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){Submission.csv}<LEND>[assign](){<-}<LSEP>[](symbol){submit2}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){model_sub.csv}<LEND>[assign](){<-}<LSEP>[](symbol){submit3}<LEND>[call](){}<LSEP>[](symbol){merge}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit1}<LSEP>[](symbol){filled}<LEND>[](symbol){}<LEND>[](symbol){submit2}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){submit4}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){submit1}<LSEP>[](symbol){submit3}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){outcome}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[assign](){<-}<LSEP>[](symbol){submit5}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){activity_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submit5}<LSEP>[argument 1; litteral](str){mod3108Kaggle_01.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Survived}<LSEP>[argument 1; litteral](str){Died}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){1st Class}<LSEP>[argument 1; litteral](str){2nd Class}<LSEP>[argument 2; litteral](str){3rd Class} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[assign](){=}<LSEP>[](symbol){MD_n}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){=}<LSEP>[](symbol){OutLiers1}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){boxplot.stats}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){MD_n}<LSEP>[](symbol){cont1}<LEND>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){boxplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){MD_n}<LSEP>[](symbol){cont1} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){broom}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidytext}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){scales}<LEND>[assign](){<-}<LSEP>[](symbol){data_train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){tidy_train}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){data_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){unnest_tokens}<LSEP>[](symbol){word}<LSEP>[](symbol){comment_text}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){tidy_train}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tidy_train}<LSEP>[](symbol){word}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tidy_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){anti_join}<LSEP>[](symbol){stop_words}<LEND>[argument 1; call](){}<LSEP>[](symbol){count}<LSEP>[](symbol){word}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){my_stop_words}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){stop_words}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){article}<LSEP>[argument 1; litteral](str){page}<LSEP>[argument 2; litteral](str){wikipedia}<LSEP>[argument 3; litteral](str){talk}<LSEP>[argument 4; litteral](str){edit}<LSEP>[argument 5; litteral](str){articles}<LEND>[argument 1; litteral](str){my}<LEND>[assign](){<-}<LSEP>[](symbol){tidy_stop}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tidy_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){anti_join}<LSEP>[](symbol){my_stop_words}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){toxic}<LEND>[](symbol){severe_toxic}<LEND>[](symbol){obscene}<LEND>[](symbol){threat}<LEND>[](symbol){insult}<LEND>[](symbol){identity_hate}<LEND>[argument 1; call](){}<LSEP>[](symbol){gather}<LSEP>[](symbol){toxicity}<LSEP>[](symbol){indicator}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){none}<LSEP>[](symbol){toxic}<LSEP>[](symbol){severe_toxic}<LSEP>[](symbol){obscene}<LSEP>[](symbol){threat}<LSEP>[](symbol){insult}<LSEP>[](symbol){identity_hate}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){indicator}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){indicator}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){toxicity}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){none}<LSEP>[argument 1; litteral](str){toxic}<LSEP>[argument 2; litteral](str){severe_toxic}<LSEP>[argument 3; litteral](str){obscene}<LSEP>[argument 4; litteral](str){threat}<LSEP>[argument 5; litteral](str){insult}<LSEP>[argument 6; litteral](str){identity_hate}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tidy_stop}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){toxicity}<LEND>[argument 1; call](){}<LSEP>[](symbol){count}<LSEP>[](symbol){word}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){n}<LEND>[argument 1; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){pc}<LEND>[argument 1; call](){}<LSEP>[](symbol){ungroup}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){word}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){pc}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ungroup}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){word}<LSEP>[](symbol){pc}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){word}<LSEP>[](symbol){pc}<LSEP>[](symbol){toxicity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_col}<LSEP>[argument 0; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](NULL){NULL}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[assign](){<-}<LSEP>[](symbol){frequency}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){tidy_stop}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){str_extract}<LSEP>[](symbol){word}<LSEP>[argument 1; litteral](str){[a-z']+}<LEND>[argument 1; call](){}<LSEP>[](symbol){count}<LSEP>[](symbol){toxicity}<LSEP>[](symbol){word}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){toxicity}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){spread}<LSEP>[](symbol){toxicity}<LSEP>[](symbol){proportion}<LEND>[argument 1; call](){}<LSEP>[](symbol){gather}<LSEP>[](symbol){toxicity}<LSEP>[](symbol){proportion}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){toxic}<LSEP>[](symbol){identity_hate}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){proportion}<LSEP>[](symbol){none}<LEND>[argument 2; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){none}<LSEP>[](symbol){proportion}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_abline}<LSEP>[argument 0; litteral](str){gray40}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_jitter}<LSEP>[argument 0; litteral](real){0.100000}<LSEP>[argument 1; litteral](real){2.500000}<LSEP>[argument 2; litteral](real){0.300000}<LSEP>[argument 3; litteral](real){0.300000}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){word}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](real){1.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_log10}<LEND>[argument 0; call](){}<LSEP>[](symbol){percent_format}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_y_log10}<LEND>[argument 0; call](){}<LSEP>[](symbol){percent_format}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_color_gradient}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.001000}<LEND>[argument 1; litteral](str){darkslategray4}<LSEP>[argument 2; litteral](str){gray75}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){toxicity}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){non-toxic}<LSEP>[argument 1; litteral](NULL){NULL} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/iris-train.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](str){,}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){index}<LEND>[call](){}<LSEP>[](symbol){createDataPartition}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Species}<LEND>[argument 1; litteral](real){0.700000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){testset}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){index}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){trainset}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){index}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1000.000000}<LEND>[assign](){<-}<LSEP>[](symbol){model.lda}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainset}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainset}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){6.000000}<LEND>[argument 2; litteral](str){lda}<LSEP>[argument 3; litteral](str){Accuracy}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){model.lda}<LEND>[assign](){<-}<LSEP>[](symbol){pred_test}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model.lda}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testset}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){pred_test}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testset}<LSEP>[](symbol){Species}<LEND>[assign](){<-}<LSEP>[](symbol){testdata}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/iris-test.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](str){,}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){testdata}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){pred_test}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model.lda}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testdata}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testdata}<LSEP>[](symbol){Id}<LEND>[](symbol){pred_test}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](real){5.000000} |
[](){expression}<LSEP>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){knitr}<LSEP>[](symbol){opts_chunk}<LEND>[](symbol){set}<LEND>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){plotly}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rhdf5}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[assign](){<-}<LSEP>[](symbol){dataset}<LEND>[call](){}<LSEP>[](symbol){h5read}<LSEP>[argument 0; litteral](str){../input/train.h5}<LSEP>[argument 1; litteral](str){train}<LEND>[assign](){=}<LSEP>[](symbol){block0_values}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){block0_values}<LEND>[assign](){=}<LSEP>[](symbol){block1_values}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){block1_values}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){block0_values}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){block0_items}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){block1_values}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){block1_items}<LEND>[assign](){=}<LSEP>[](symbol){dataset}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){block0_values}<LSEP>[](symbol){block1_values}<LEND>[assign](){<-}<LSEP>[](symbol){dataset}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){dataset}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_minimal}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){timestamp}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_minimal}<LEND>[assign](){<-}<LSEP>[](symbol){dataset}<LEND>[call](){}<LSEP>[](symbol){arrange}<LSEP>[](symbol){dataset}<LSEP>[](symbol){id}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){50000.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){timestamp}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_minimal}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){id}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){layout}<LSEP>[argument 0; litteral](str){Target over Time (id == 10)}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){id}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){layout}<LSEP>[argument 0; litteral](str){Target over Time (id == 20)}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){id}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){layout}<LSEP>[argument 0; litteral](str){Target over Time (id == 30)}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){id}<LEND>[argument 1; litteral](real){20.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_0}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_1}<LEND>[argument 1; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_2}<LEND>[argument 1; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_3}<LEND>[argument 1; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_4}<LEND>[argument 1; litteral](str){lines}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){id}<LEND>[argument 1; litteral](real){30.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_0}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LSEP>[argument 5; litteral](str){derived_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_1}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){derived_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_2}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){derived_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_3}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){derived_3}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_4}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){derived_4}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){id}<LEND>[argument 1; litteral](real){100.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_0}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_1}<LEND>[argument 1; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_2}<LEND>[argument 1; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_3}<LEND>[argument 1; litteral](str){lines}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_4}<LEND>[argument 1; litteral](str){lines}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){id}<LEND>[argument 1; litteral](real){30.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){fundamental_0}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LSEP>[argument 5; litteral](str){fundamental_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){fundamental_1}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){fundamental_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){fundamental_2}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){fundamental_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){fundamental_3}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){fundamental_3}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){id}<LEND>[argument 1; litteral](real){30.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){technical_0}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LSEP>[argument 5; litteral](str){technical_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){technical_1}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){technical_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){technical_2}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){technical_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){technical_3}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){technical_3}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){plot_ly}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dataset}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dataset}<LSEP>[](symbol){id}<LEND>[argument 1; litteral](real){30.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){timestamp}<LEND>[argument 2; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_0}<LEND>[argument 3; litteral](str){scatter}<LSEP>[argument 4; litteral](str){lines}<LSEP>[argument 5; litteral](str){derived_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_1}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){derived_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_2}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){derived_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_3}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){derived_3}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){derived_4}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){derived_4}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){fundamental_0}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){fundamental_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){fundamental_1}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){fundamental_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){fundamental_2}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){fundamental_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){add_trace}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){fundamental_3}<LEND>[argument 1; litteral](str){lines}<LSEP>[argument 2; litteral](str){fundamental_3} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tm}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){wordcloud}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){make_word_cloud}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){documents}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){corpus}<LEND>[call](){}<LSEP>[](symbol){Corpus}<LEND>[argument 0; call](){}<LSEP>[](symbol){VectorSource}<LEND>[argument 0; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){documents}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){corpus}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){corpus}<LSEP>[](symbol){removePunctuation}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){corpus}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){corpus}<LSEP>[](symbol){removeWords}<LEND>[argument 2; call](){}<LSEP>[](symbol){stopwords}<LSEP>[argument 0; litteral](str){english}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){frequencies}<LEND>[call](){}<LSEP>[](symbol){DocumentTermMatrix}<LSEP>[](symbol){corpus}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){word_frequencies}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){frequencies}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){words}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){word_frequencies}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){colSums}<LSEP>[](symbol){word_frequencies}<LEND>[statement 7; call](){}<LSEP>[](symbol){wordcloud}<LSEP>[](symbol){words}<LSEP>[](symbol){freq}<LEND>[argument 2; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){freq}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; litteral](real){100.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){brewer.pal}<LSEP>[argument 0; litteral](real){8.000000}<LSEP>[argument 1; litteral](str){Dark2}<LEND>[argument 4; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){make_word_cloud}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){query}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){make_word_cloud}<LEND>[argument 0; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){product_title}<LEND>[argument 1; litteral](real){1000.000000}<LEND>[call](){}<LSEP>[](symbol){make_word_cloud}<LEND>[argument 0; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){product_description}<LEND>[argument 1; litteral](real){1000.000000} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lubridate}<LEND>[assign](){<-}<LSEP>[](symbol){coltypes}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){col_datetime}<LSEP>[argument 0; litteral](str){%Y-%m-%d %H:%M:%S}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[](symbol){coltypes}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[](symbol){coltypes}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){year}<LSEP>[](symbol){Dates}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2003.000000}<LSEP>[argument 1; litteral](real){2015.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){month}<LSEP>[](symbol){Dates}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){day}<LSEP>[](symbol){Dates}<LEND>[argument 3; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){hour}<LSEP>[](symbol){Dates}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){23.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.POSIXct}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LSEP>[](symbol){Dates}<LSEP>[argument 1; litteral](str){days}<LEND>[argument 5; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Monday}<LSEP>[argument 1; litteral](str){Tuesday}<LSEP>[argument 2; litteral](str){Wednesday}<LSEP>[argument 3; litteral](str){Thursday}<LSEP>[argument 4; litteral](str){Friday}<LSEP>[argument 5; litteral](str){Saturday}<LSEP>[argument 6; litteral](str){Sunday}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Category}<LEND>[assign](){<-}<LSEP>[](symbol){mapdata}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){Category}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ASSAULT}<LSEP>[argument 1; litteral](str){ROBBERY}<LSEP>[argument 2; litteral](str){SEX OFFENSES FORCIBLE}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){Category}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggmap}<LEND>[assign](){<-}<LSEP>[](symbol){map}<LEND>[call](){}<LSEP>[](symbol){readRDS}<LSEP>[argument 0; litteral](str){../input/sf_map_copyright_open...}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LSEP>[argument 2; litteral](str){topleft}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){Category}<LEND>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Violent Crime in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){Category}<LEND>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_colour_discrete}<LSEP>[argument 0; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Category}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Violent Crime in San Francisco}<LEND>[assign](){<-}<LSEP>[](symbol){contours}<LEND>[call](){}<LSEP>[](symbol){stat_density2d}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){..level..}<LSEP>[](symbol){..level..}<LEND>[argument 1; litteral](real){0.100000}<LSEP>[](symbol){mapdata}<LSEP>[argument 3; litteral](real){200.000000}<LSEP>[argument 4; litteral](str){polygon}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LSEP>[argument 2; litteral](str){topleft}<LEND>[](symbol){contours}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Violent Crime in San Francisco}<LEND>[assign](){<-}<LSEP>[](symbol){lims}<LEND>[call](){}<LSEP>[](symbol){coord_map}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){122.470000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){122.370000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){37.700000}<LSEP>[argument 1; litteral](real){37.810000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LSEP>[argument 2; litteral](str){topleft}<LEND>[](symbol){lims}<LEND>[](symbol){contours}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Violent Crime in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contours}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Category}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Violent Crime in San Francisco}<LEND>[assign](){<-}<LSEP>[](symbol){contoursALT}<LEND>[call](){}<LSEP>[](symbol){stat_density2d}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){..level..}<LSEP>[](symbol){..level..}<LEND>[argument 1; litteral](real){0.100000}<LEND>[argument 2; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Category}<LSEP>[argument 1; litteral](str){ASSAULT}<LEND>[argument 3; litteral](real){200.000000}<LSEP>[argument 4; litteral](str){polygon}<LEND>[assign](){<-}<LSEP>[](symbol){contoursROB}<LEND>[call](){}<LSEP>[](symbol){stat_density2d}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){..level..}<LSEP>[](symbol){..level..}<LEND>[argument 1; litteral](real){0.100000}<LEND>[argument 2; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Category}<LSEP>[argument 1; litteral](str){ROBBERY}<LEND>[argument 3; litteral](real){200.000000}<LSEP>[argument 4; litteral](str){polygon}<LEND>[assign](){<-}<LSEP>[](symbol){contoursSOF}<LEND>[call](){}<LSEP>[](symbol){stat_density2d}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){..level..}<LSEP>[](symbol){..level..}<LEND>[argument 1; litteral](real){0.100000}<LEND>[argument 2; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Category}<LSEP>[argument 1; litteral](str){SEX OFFENSES FORCIBLE}<LEND>[argument 3; litteral](real){200.000000}<LSEP>[argument 4; litteral](str){polygon}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contours}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Violent Crime in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursALT}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Assaults in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursROB}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Robberies in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursSOF}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Sex Offences Forcible in San F...}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Category}<LEND>[argument 1; litteral](str){free}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contours}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Violent Crime in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursALT}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Assaults in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursROB}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Robberies in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursSOF}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Sex Offences Forcible in San F...}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Category}<LEND>[argument 1; litteral](str){free}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){DayOfWeek}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Category}<LSEP>[argument 1; litteral](str){ASSAULT}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count of Assault}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; litteral](str){free}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Category}<LSEP>[argument 1; litteral](str){ROBBERY}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count of Robbery}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){DayOfWeek}<LEND>[argument 1; litteral](str){free}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contours}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Month}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Violent Crime in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursALT}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Month}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Assaults in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursROB}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Month}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Robberies in San Francisco}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[](symbol){lims}<LEND>[](symbol){contoursSOF}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_alpha_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.250000}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_gradient}<LSEP>[argument 0; litteral](str){Violent\nCrime\nDensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Month}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Sex Offences Forcible in San F...}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Month}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){mapdata}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Month}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){black}<LSEP>[argument 1; litteral](str){skyblue}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_wrap}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Category}<LEND>[argument 1; litteral](str){free} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[assign](){<-}<LSEP>[](symbol){get_probs}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){dt}<LSEP>[](symbol){var}<LSEP>[](symbol){target}<LSEP>[](symbol){w}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){get}<LSEP>[](symbol){target}<LEND>[](symbol){.N}<LEND>[statement 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){get}<LSEP>[](symbol){target}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){w}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){.N}<LSEP>[](symbol){w}<LEND>[argument 3; call](){}<LSEP>[](symbol){eval}<LSEP>[](symbol){var}<LEND>[assign](){<-}<LSEP>[](symbol){DT_fill_NA}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){DT}<LSEP>[](symbol){replacement}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){seq_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){DT}<LEND>[body; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){DT}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){DT}<LSEP>[](symbol){j}<LEND>[](symbol){j}<LSEP>[](symbol){replacement}<LEND>[assign](){<-}<LSEP>[](symbol){super_fread}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){file}<LSEP>[](symbol){key_var}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dt}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[](symbol){file}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){key_var}<LEND>[true branch; call](){}<LSEP>[](symbol){setkeyv}<LSEP>[](symbol){dt}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){key_var}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){dt}<LEND>[assign](){<-}<LSEP>[](symbol){events}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/events.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){display_id}<LSEP>[argument 1; litteral](str){platform}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){numeric}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){character}<LSEP>[argument 2; litteral](str){numeric}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){platform}<LSEP>[argument 1; litteral](str){1}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){platform}<LSEP>[argument 1; litteral](str){2}<LEND>[call](){}<LSEP>[](symbol){setkeyv}<LSEP>[](symbol){events}<LSEP>[argument 1; litteral](str){display_id}<LEND>[assign](){<-}<LSEP>[](symbol){clicks_train}<LEND>[call](){}<LSEP>[](symbol){super_fread}<LSEP>[argument 0; litteral](str){../input/clicks_train.csv}<LSEP>[argument 1; litteral](str){display_id}<LEND>[assign](){<-}<LSEP>[](symbol){clicks_train}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){clicks_train}<LSEP>[](symbol){events}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){clicks_train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){ad_id_pl}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){ad_id}<LSEP>[argument 1; litteral](str){_}<LSEP>[](symbol){platform}<LEND>[call](){}<LSEP>[](symbol){setkeyv}<LSEP>[](symbol){clicks_train}<LSEP>[argument 1; litteral](str){ad_id_pl}<LEND>[assign](){=}<LSEP>[](symbol){click_prob}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){clicks_train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){clicked}<LEND>[](symbol){.N}<LEND>[assign](){<-}<LSEP>[](symbol){ad_id_pl_probs}<LEND>[call](){}<LSEP>[](symbol){get_probs}<LSEP>[](symbol){clicks_train}<LSEP>[argument 1; litteral](str){ad_id_pl}<LSEP>[argument 2; litteral](str){clicked}<LSEP>[argument 3; litteral](real){16.000000}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){clicks_train}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){clicks_test}<LEND>[call](){}<LSEP>[](symbol){super_fread}<LSEP>[argument 0; litteral](str){../input/clicks_test.csv}<LSEP>[argument 1; litteral](str){display_id}<LEND>[assign](){<-}<LSEP>[](symbol){clicks_test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){clicks_test}<LSEP>[](symbol){events}<LSEP>[](symbol){T}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){clicks_test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){ad_id_pl}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){ad_id}<LSEP>[argument 1; litteral](str){_}<LSEP>[](symbol){platform}<LEND>[call](){}<LSEP>[](symbol){setkeyv}<LSEP>[](symbol){clicks_test}<LSEP>[argument 1; litteral](str){ad_id_pl}<LEND>[assign](){<-}<LSEP>[](symbol){clicks_test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){clicks_test}<LSEP>[](symbol){ad_id_pl_probs}<LSEP>[](symbol){T}<LEND>[call](){}<LSEP>[](symbol){DT_fill_NA}<LSEP>[](symbol){clicks_test}<LSEP>[](symbol){click_prob}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){clicks_test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){display_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.integer}<LSEP>[](symbol){display_id}<LEND>[call](){}<LSEP>[](symbol){setkey}<LSEP>[](symbol){clicks_test}<LSEP>[argument 1; litteral](str){prob}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){clicks_test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){rev}<LSEP>[](symbol){ad_id}<LEND>[argument 1; litteral](str){ }<LEND>[](symbol){display_id}<LEND>[call](){}<LSEP>[](symbol){setkey}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){display_id}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){submissionR.csv}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){loss}<LEND>[call](){}<LSEP>[](symbol){hist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){loss} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){e1071}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){party}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){knitr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){pROC}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[assign](){<-}<LSEP>[](symbol){traintitanic}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){}<LSEP>[argument 1; litteral](str){NA}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){PassengerId}<LEND>[assign](){<-}<LSEP>[](symbol){testtitanic}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){}<LSEP>[argument 1; litteral](str){NA}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){PassengerId}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testtitanic}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){testtitanic}<LEND>[assign](){<-}<LSEP>[](symbol){titanic}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){traintitanic}<LSEP>[](symbol){testtitanic}<LEND>[](symbol){titanic}<LEND>[assign](){<-}<LSEP>[](symbol){titanicpercentages}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){titanic}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){titanic}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.vector}<LSEP>[](symbol){titanicpercentages}<LEND>[argument 1; call](){}<LSEP>[](symbol){reorder}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){titanicpercentages}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.vector}<LSEP>[](symbol){titanicpercentages}<LEND>[argument 1; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Variable}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Percentage of Missing Values}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Age}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[](symbol){T}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](logical){NA}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){titanic}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){titanic}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[](symbol){i}<LEND>[litteral](str){Infant}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[](symbol){i}<LEND>[litteral](str){Toddler}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){12.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[](symbol){i}<LEND>[litteral](str){Kid}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){19.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[](symbol){i}<LEND>[litteral](str){Teenager}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){19.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){25.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[](symbol){i}<LEND>[litteral](str){Young Adult}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){25.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){40.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[](symbol){i}<LEND>[litteral](str){Adult}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){40.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeImpute}<LEND>[](symbol){i}<LEND>[argument 1; litteral](real){60.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[](symbol){i}<LEND>[litteral](str){Middle Aged}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[](symbol){i}<LEND>[litteral](str){Senior}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){AgeGroup}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){^.*, (.*?)\\..*$}<LSEP>[argument 1; litteral](str){\\1}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Name}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[assign](){<-}<LSEP>[](symbol){miss}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Mme}<LSEP>[argument 1; litteral](str){Mlle}<LSEP>[argument 2; litteral](str){Ms}<LSEP>[argument 3; litteral](str){Mrs}<LSEP>[argument 4; litteral](str){Dona}<LEND>[assign](){<-}<LSEP>[](symbol){mister}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Master}<LSEP>[argument 1; litteral](str){Don}<LSEP>[argument 2; litteral](str){Sir}<LEND>[assign](){<-}<LSEP>[](symbol){officer}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Capt}<LSEP>[argument 1; litteral](str){Col}<LSEP>[argument 2; litteral](str){Major}<LSEP>[argument 3; litteral](str){Dr}<LEND>[assign](){<-}<LSEP>[](symbol){noble}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Lady}<LSEP>[argument 1; litteral](str){Jonkheer}<LSEP>[argument 2; litteral](str){the Countess}<LSEP>[argument 3; litteral](str){Rev}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Military}<LSEP>[argument 1; litteral](str){Noble}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){titanic}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[](symbol){miss}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[litteral](str){Miss}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[](symbol){mister}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[litteral](str){Mr}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[](symbol){officer}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[litteral](str){Military}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[](symbol){noble}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[litteral](str){Noble}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Titles}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){count}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Embarked}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){S}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[](symbol){T}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[assign](){<-}<LSEP>[](symbol){traintitanicEliminated1}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){Name}<LSEP>[](symbol){AgeGroup}<LSEP>[](symbol){Age}<LSEP>[](symbol){Cabin}<LSEP>[](symbol){Ticket}<LEND>[assign](){<-}<LSEP>[](symbol){testtitanicEliminated1}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){Name}<LSEP>[](symbol){AgeGroup}<LSEP>[](symbol){Age}<LSEP>[](symbol){Cabin}<LSEP>[](symbol){Ticket}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){traintitanicEliminated1}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](str){numeric}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){union}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[assign](){<-}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){glm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LSEP>[](symbol){.}<LEND>[](symbol){traintitanicEliminated1}<LSEP>[argument 2; litteral](str){binomial}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){full}<LEND>[assign](){<-}<LSEP>[](symbol){numVars}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Fare}<LSEP>[argument 1; litteral](str){AgeImpute}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){testtitanicEliminated1}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){testtitanicEliminated1}<LEND>[](symbol){i}<LEND>[](symbol){numVars}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){testtitanicEliminated1}<LEND>[](symbol){i}<LEND>[argument 1; litteral](str){Survived}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){union}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated1}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){traintitanicEliminated1}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){testtitanicEliminated1}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){testtitanicEliminated1}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){traintitanicEliminated2}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){Age}<LSEP>[](symbol){Name}<LSEP>[](symbol){Ticket}<LSEP>[](symbol){Cabin}<LSEP>[](symbol){AgeImpute}<LSEP>[](symbol){Fare}<LEND>[assign](){<-}<LSEP>[](symbol){testtitanicEliminated2}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){Age}<LSEP>[](symbol){Name}<LSEP>[](symbol){Ticket}<LSEP>[](symbol){Cabin}<LSEP>[](symbol){AgeImpute}<LSEP>[](symbol){Fare}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){traintitanicEliminated2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){union}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){testtitanicEliminated2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){union}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[assign](){<-}<LSEP>[](symbol){rf1}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LSEP>[](symbol){.}<LEND>[](symbol){traintitanicEliminated2}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){testtitanicEliminated2}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){svm1}<LEND>[call](){}<LSEP>[](symbol){svm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LSEP>[](symbol){.}<LEND>[](symbol){traintitanicEliminated2}<LSEP>[argument 2; litteral](str){C}<LSEP>[argument 3; litteral](str){linear}<LSEP>[](symbol){T}<LEND>[](symbol){svm1}<LEND>[assign](){<-}<LSEP>[](symbol){dtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){binary:logistic}<LSEP>[argument 1; litteral](str){gbtree}<LSEP>[argument 2; litteral](str){logloss}<LSEP>[argument 3; litteral](real){0.001000}<LSEP>[argument 4; litteral](real){15.000000}<LSEP>[argument 5; litteral](real){0.908000}<LSEP>[argument 6; litteral](real){0.592000}<LSEP>[argument 7; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_model}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LSEP>[](symbol){param}<LSEP>[](symbol){dtrain}<LSEP>[argument 2; litteral](real){30.000000}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){forward_pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict.glm}<LSEP>[](symbol){full}<LSEP>[](symbol){traintitanicEliminated1}<LEND>[argument 1; litteral](real){0.500000}<LEND>[assign](){<-}<LSEP>[](symbol){forward_confusion}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){forward_pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){forward_accuracy}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){forward_confusion}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){forward_precision}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){forward_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){forward_recall}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){forward_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[assign](){<-}<LSEP>[](symbol){forward_f1score}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){forward_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[assign](){<-}<LSEP>[](symbol){froc}<LEND>[call](){}<LSEP>[](symbol){roc}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){forward_pred}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){froc}<LEND>[assign](){<-}<LSEP>[](symbol){rf_pred}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rf1}<LSEP>[](symbol){predicted}<LEND>[assign](){<-}<LSEP>[](symbol){rf_confusion}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){rf_pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf_accuracy}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){rf_confusion}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf_precision}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){rf_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf_recall}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){rf_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf_f1score}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){rf_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rroc}<LEND>[call](){}<LSEP>[](symbol){roc}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){rf_pred}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){rroc}<LEND>[assign](){<-}<LSEP>[](symbol){svm_pred}<LEND>[call](){}<LSEP>[](symbol){fitted}<LSEP>[](symbol){svm1}<LEND>[assign](){<-}<LSEP>[](symbol){svm_confusion}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){svm_pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){svm_accuracy}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){svm_confusion}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){svm_precision}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){svm_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){svm_recall}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){svm_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[assign](){<-}<LSEP>[](symbol){svm_f1score}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){svm_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[assign](){<-}<LSEP>[](symbol){sroc}<LEND>[call](){}<LSEP>[](symbol){roc}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated2}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){svm_pred}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){sroc}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb_model}<LSEP>[](symbol){dtrain}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_pred}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){xgb_pred}<LSEP>[argument 1; litteral](real){0.500000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_confusion}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){xgb_pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_accuracy}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){xgb_confusion}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_precision}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){xgb_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_recall}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){xgb_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){6.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_f1score}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){xgb_confusion}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){7.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xroc}<LEND>[call](){}<LSEP>[](symbol){roc}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){traintitanicEliminated1}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){xgb_pred}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){xroc}<LEND>[assign](){<-}<LSEP>[](symbol){model_metrics}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){froc}<LSEP>[](symbol){auc}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rroc}<LSEP>[](symbol){auc}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sroc}<LSEP>[](symbol){auc}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){xroc}<LSEP>[](symbol){auc}<LEND>[](symbol){forward_accuracy}<LSEP>[](symbol){rf_accuracy}<LSEP>[](symbol){svm_accuracy}<LSEP>[](symbol){xgb_accuracy}<LSEP>[](symbol){forward_precision}<LSEP>[](symbol){rf_precision}<LSEP>[](symbol){svm_precision}<LSEP>[](symbol){xgb_precision}<LSEP>[](symbol){forward_recall}<LSEP>[](symbol){rf_recall}<LSEP>[](symbol){svm_recall}<LSEP>[](symbol){xgb_recall}<LSEP>[](symbol){forward_f1score}<LSEP>[](symbol){rf_f1score}<LSEP>[](symbol){svm_f1score}<LSEP>[](symbol){xgb_f1score}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Forward Regression}<LSEP>[argument 1; litteral](str){Random Forest}<LSEP>[argument 2; litteral](str){Support Vector Machine}<LSEP>[argument 3; litteral](str){Extreme Gradient Boosting}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Area Under Curve}<LSEP>[argument 1; litteral](str){Accuracy}<LSEP>[argument 2; litteral](str){Precision}<LSEP>[argument 3; litteral](str){Recall}<LSEP>[argument 4; litteral](str){F1 Score}<LEND>[call](){}<LSEP>[](symbol){kable}<LSEP>[](symbol){model_metrics}<LEND>[assign](){<-}<LSEP>[](symbol){kaggle_test}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){svm1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){testtitanicEliminated2}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){testtitanic_pID}<LEND>[call](){}<LSEP>[](symbol){subset}<LEND>[argument 0; call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){}<LSEP>[argument 1; litteral](str){NA}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[](symbol){PassengerId}<LEND>[assign](){<-}<LSEP>[](symbol){kaggle_Submit}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){testtitanic_pID}<LSEP>[](symbol){kaggle_test}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){kaggle_Submit}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){kaggle_Submit}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){kaggle_Submit}<LSEP>[argument 1; litteral](str){testtitanicSurvived.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){methods}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){e1071}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Hmisc}<LEND>[assign](){=}<LSEP>[](symbol){algo}<LSEP>[litteral](str){jRip}<LEND>[assign](){=}<LSEP>[](symbol){cls}<LEND>[assign](){=}<LSEP>[](symbol){i}<LSEP>[litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){fetEng}<LSEP>[litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){model}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){pca}<LSEP>[litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){nbmvars}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){adddummy}<LSEP>[litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){doglm}<LSEP>[litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){rFerns}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){rPART}<LSEP>[litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){crt}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){nnet}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){boost}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){c50}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){probsvm}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){cubist}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){brnn}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){qrnn}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){simca}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){cfbuild}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){vhdc}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){bigtsp}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){itree}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){Boruta}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){adabag}<LSEP>[litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1729.000000}<LEND>[assign](){=}<LSEP>[](symbol){SQWKfun}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){pred}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){preds}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){predict}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){true}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){Response}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){cuts}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){preds}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 6; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[argument 8; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){preds}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){preds}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[](symbol){preds}<LSEP>[](symbol){cuts}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){err}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Metrics}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[](symbol){preds}<LSEP>[](symbol){true}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){8.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){err}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){feature.names}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Response}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){All_Data}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[assign](){=}<LSEP>[](symbol){dfnames}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[assign](){=}<LSEP>[](symbol){fnames}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[assign](){=}<LSEP>[](symbol){nbins}<LSEP>[litteral](real){33.000000}<LEND>[control flow](){for}<LSEP>[](symbol){f}<LSEP>[](symbol){feature.names}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){f}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){levels}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){levels}<LEND>[](symbol){nbins}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){train}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){character}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){f}<LEND>[](symbol){levels}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fnames}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){fnames}<LSEP>[](symbol){f}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dfnames}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){dfnames}<LSEP>[](symbol){f}<LEND>[control flow](){if}<LSEP>[](symbol){fetEng}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){qbmic}<LSEP>[litteral](real){0.800000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){qbmic2}<LSEP>[litteral](real){0.900000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){custom_var_1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Medical_History_15}<LEND>[argument 1; litteral](real){10.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){custom_var_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){custom_var_1}<LEND>[litteral](real){0.000000}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){custom_var_3}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Product_Info_4}<LEND>[argument 1; litteral](real){0.075000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){custom_var_4}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Product_Info_4}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){custom_var_6}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){custom_var_7}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[argument 1; litteral](real){0.800000}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){custom_var_8}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Ins_Age}<LEND>[argument 1; litteral](real){8.500000}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){custom_var_9}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Ins_Age}<LEND>[argument 1; litteral](real){2.500000}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){BMI_cutoff}<LEND>[call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[](symbol){qbmic}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){custom_var_10}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[](symbol){BMI_cutoff}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){custom_var_11}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Product_Info_4}<LEND>[argument 1; litteral](real){0.900000}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){ageBMI_cutoff}<LEND>[call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Ins_Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[](symbol){qbmic2}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){custom_var_12}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Ins_Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[](symbol){ageBMI_cutoff}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){custom_var_13}<LEND>[call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){BMI}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Medical_Keyword_3}<LEND>[argument 1; litteral](real){0.500000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[statement 16; assign](){<-}<LSEP>[](symbol){feature.names1}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Medical_K}<LSEP>[](symbol){feature.names}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 17; assign](){<-}<LSEP>[](symbol){feature.names2}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Medical_H}<LSEP>[](symbol){feature.names}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){feature.names3}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Medical_}<LSEP>[](symbol){feature.names}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){custom_var_MK}<LEND>[call](){}<LSEP>[](symbol){rowSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names1}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){custom_var_MH}<LEND>[call](){}<LSEP>[](symbol){rowSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names2}<LEND>[statement 21; assign](){<-}<LSEP>[](symbol){All_Data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[](symbol){custom_var_1}<LSEP>[](symbol){custom_var_3}<LSEP>[](symbol){custom_var_4}<LSEP>[](symbol){custom_var_6}<LSEP>[](symbol){custom_var_7}<LSEP>[](symbol){custom_var_8}<LSEP>[](symbol){custom_var_9}<LSEP>[](symbol){custom_var_10}<LSEP>[](symbol){custom_var_11}<LSEP>[](symbol){custom_var_12}<LSEP>[](symbol){custom_var_13}<LSEP>[](symbol){custom_var_MH}<LSEP>[](symbol){custom_var_MK}<LEND>[argument 15; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Response}<LEND>[statement 22; assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Response}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Response}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[statement 24; assign](){<-}<LSEP>[](symbol){feature.names}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train}<LEND>[argument 1; litteral](real){1.000000}<LEND>[control flow](){if}<LSEP>[](symbol){nbmvars}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){NB medical keywords\n}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){feature.names1}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Medical_K}<LSEP>[](symbol){feature.names}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){feature.names2}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Medical_K}<LSEP>[](symbol){feature.names}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){trainMK}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names1}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){testMK}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names1}<LEND>[statement 5; call](){}<LSEP>[](symbol){date}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){nb}<LEND>[call](){}<LSEP>[](symbol){naiveBayes}<LSEP>[](symbol){trainMK}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response}<LEND>[argument 1; litteral](str){x}<LEND>[argument 2; litteral](real){0.000000}<LEND>[statement 7; call](){}<LSEP>[](symbol){date}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){predtr}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){nb}<LSEP>[](symbol){trainMK}<LSEP>[argument 2; litteral](str){raw}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){predte}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){nb}<LSEP>[](symbol){testMK}<LSEP>[argument 2; litteral](str){raw}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){predtr}<LSEP>[](symbol){predte}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){All_Data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Id}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){5.000000}<LEND>[argument 6; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){6.000000}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 8; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 9; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Response}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){feature.names}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){All_Data}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){All_Data}<LEND>[argument 1; litteral](real){1.000000}<LEND>[control flow](){if}<LSEP>[](symbol){pca}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){All_Data has %d rows and %d co...}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){All_Data}<LEND>[argument 2; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){All_Data}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){get rid of zero variance\n}<LEND>[statement 2; call](){}<LSEP>[](symbol){date}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){preProcValues}<LEND>[call](){}<LSEP>[](symbol){preProcess}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){medianImpute}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){All_Data1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){preProcValues}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 5; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){feature.names}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){All_Data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data1}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Response}<LEND>[statement 7; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Response}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Response}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){All_Data}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){All_Data}<LSEP>[](symbol){Response}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){feature.names}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){feature.names}<LEND>[control flow](){if}<LSEP>[](symbol){adddummy}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Response}<LEND>[litteral](logical){NA}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dummies}<LEND>[call](){}<LSEP>[](symbol){dummyVars}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LSEP>[](symbol){}<LEND>[argument 2; litteral](str){_}<LSEP>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){train1}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){dummies}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LSEP>[](symbol){}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){dummies}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){train1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){feature.names}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){train}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){feature.names}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){rwt}<LEND>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){pred1}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){pred}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){trainIndex}<LEND>[call](){}<LSEP>[](symbol){createDataPartition}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response}<LEND>[argument 1; litteral](real){0.670000}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Ptrain}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){trainIndex}<LSEP>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){Pval}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){trainIndex}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){Boruta}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Boruta}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Feature importance by Boruta \n}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){feature.names1}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Medical_K}<LSEP>[](symbol){feature.names}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){feature.names2}<LEND>[call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){Medical_K}<LSEP>[](symbol){feature.names}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[statement 4; call](){}<LSEP>[](symbol){date}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){Bor.pru}<LEND>[call](){}<LSEP>[](symbol){Boruta}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Response}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names1}<LSEP>[argument 1; litteral](str){Response}<LEND>[argument 2; litteral](real){2.000000}<LSEP>[argument 3; litteral](real){11.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){Bor.pru}<LEND>[statement 7; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){Bor.pru}<LEND>[statement 8; call](){}<LSEP>[](symbol){plotImpHistory}<LSEP>[](symbol){Bor.pru}<LEND>[statement 9; call](){}<LSEP>[](symbol){date}<LEND>[control flow](){if}<LSEP>[](symbol){rPART}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rpart}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){step_down}<LSEP>[litteral](real){0.500000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){step_up}<LSEP>[litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){feature.names}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LSEP>[argument 1; litteral](str){pred1}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){rpCtrl}<LEND>[call](){}<LSEP>[](symbol){rpart.control}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.001000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){5.000000}<LSEP>[argument 5; litteral](real){2.000000}<LSEP>[argument 6; litteral](real){20.000000}<LSEP>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){30.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){date}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){rpart}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Response}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LSEP>[argument 1; litteral](str){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){rwt}<LEND>[](symbol){rpCtrl}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[statement 4; call](){}<LSEP>[](symbol){date}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){predd}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){optCuts}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){7.500000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){SQWKfun}<LSEP>[](symbol){predd}<LEND>[statement 9; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[statement 10; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 11; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 12; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](str){rwt}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](str){rwt}<LEND>[](symbol){step_down}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](str){rwt}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](str){rwt}<LEND>[](symbol){step_up}<LEND>[statement 15; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){rwt}<LEND>[statement 16; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table %d\n}<LSEP>[](symbol){i}<LEND>[statement 17; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 18; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 19; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){itree}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){itree}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){itCtrl}<LEND>[call](){}<LSEP>[](symbol){itree.control}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){0.001000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){5.000000}<LSEP>[argument 5; litteral](real){2.000000}<LSEP>[argument 6; litteral](real){10.000000}<LSEP>[argument 7; litteral](real){0.000000}<LSEP>[argument 8; litteral](real){30.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){date}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){itree}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Response}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LSEP>[argument 1; litteral](str){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){rwt}<LEND>[](symbol){itCtrl}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[statement 5; call](){}<LSEP>[](symbol){date}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){predd}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){optCuts}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){7.500000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){SQWKfun}<LSEP>[](symbol){predd}<LEND>[statement 10; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[statement 11; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 12; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 13; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 14; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table %d\n}<LSEP>[](symbol){i}<LEND>[statement 15; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 16; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 17; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){adabag}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){adabag}<LEND>[statement 1; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rpart}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){rpCtrl}<LEND>[call](){}<LSEP>[](symbol){rpart.control}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){date}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){bagging.cv}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Response}<LSEP>[](symbol){.}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LSEP>[argument 1; litteral](str){Response}<LEND>[argument 3; litteral](real){9.000000}<LSEP>[](symbol){rpCtrl}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[statement 6; call](){}<LSEP>[](symbol){date}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){predd}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){optCuts}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){7.500000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){SQWKfun}<LSEP>[](symbol){predd}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[statement 12; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 13; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 14; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 15; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table %d\n}<LSEP>[](symbol){i}<LEND>[statement 16; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 17; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 18; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){doglm}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){glmnet}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){cv.glmnet}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){rwt}<LEND>[argument 3; litteral](str){gaussian}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){opt.lam}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda.min}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){lambda.1se}<LEND>[statement 6; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){opt.lam}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[](symbol){opt.lam}<LSEP>[argument 3; litteral](str){response}<LEND>[statement 8; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){pred}<LEND>[statement 9; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[](symbol){pred}<LEND>[argument 1; litteral](str){glm_val_1.csv}<LEND>[statement 10; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){table 1\n}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 12; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 13; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){2}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 14; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 15; assign](){=}<LSEP>[](symbol){predc}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){1}<LEND>[statement 16; assign](){=}<LSEP>[](symbol){optCuts}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){7.500000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){SQWKfun}<LSEP>[](symbol){predc}<LEND>[statement 17; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){optCuts}<LEND>[statement 18; assign](){=}<LSEP>[](symbol){preds}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 19; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){table 2\n}<LEND>[statement 20; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){preds}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 21; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){preds}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 22; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[](symbol){preds}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){predt}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[](symbol){opt.lam}<LSEP>[argument 3; litteral](str){response}<LEND>[statement 24; assign](){=}<LSEP>[](symbol){preds}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){predt}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 25; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){preds}<LEND>[statement 26; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[](symbol){preds}<LEND>[argument 1; litteral](str){glmnet_sub.csv}<LEND>[statement 27; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[](symbol){preds}<LEND>[statement 28; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[](symbol){opt.lam}<LSEP>[argument 3; litteral](str){response}<LEND>[statement 29; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pred}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[control flow](){if}<LSEP>[](symbol){bigtsp}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){BigTSP}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fitting BigTsp model\n}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){LDCA}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fit}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){opt.lam}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[argument 2; litteral](str){response}<LEND>[statement 6; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){pred}<LEND>[control flow](){if}<LSEP>[](symbol){nnet}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){nnet}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](real){9.000000}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](real){9.000000}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](real){9.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){multinom}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Response}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LSEP>[argument 1; litteral](str){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){rwt}<LEND>[argument 3; litteral](real){400.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fit}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 9; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){nnet_multinom_sub.csv}<LEND>[statement 10; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 11; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 12; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){crt}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tree}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){trCntrl}<LEND>[call](){}<LSEP>[](symbol){tree.control}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Ptrain}<LEND>[argument 1; litteral](real){20.000000}<LSEP>[argument 2; litteral](real){54.000000}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){Ptrain}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fitting model\n}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){tree}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Response}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LSEP>[argument 1; litteral](str){Response}<LEND>[](symbol){na.pass}<LSEP>[](symbol){trCntrl}<LSEP>[argument 4; litteral](str){recursive.partition}<LSEP>[argument 5; litteral](str){deviance}<LSEP>[argument 6; litteral](real){1000.000000}<LSEP>[argument 7; litteral](logical){TRUE}<LSEP>[argument 8; litteral](logical){FALSE}<LSEP>[argument 9; litteral](logical){TRUE}<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){predd}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){optCuts}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){7.500000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){SQWKfun}<LSEP>[](symbol){predd}<LEND>[statement 9; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[statement 10; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 11; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 12; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 13; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table crt %d\n}<LSEP>[](symbol){i}<LEND>[statement 14; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 15; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 16; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 6; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){rpart_crt_sub.csv}<LEND>[control flow](){if}<LSEP>[](symbol){rFerns}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){fitControl}<LEND>[call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){none}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){tune_grid}<LEND>[call](){}<LSEP>[](symbol){expand.grid}<LSEP>[argument 0; litteral](real){16.000000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LSEP>[litteral](NULL){NULL}<LEND>[statement 3; call](){}<LSEP>[](symbol){gc}<LEND>[statement 4; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fitting rFerns model\n}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[](symbol){algo}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 3; litteral](real){1000.000000}<LSEP>[argument 4; litteral](real){100.000000}<LSEP>[argument 5; litteral](str){shadow}<LSEP>[](symbol){fitControl}<LSEP>[](symbol){tune_grid}<LEND>[statement 6; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[statement 7; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){importance}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 9; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){pred}<LEND>[statement 10; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){table 2\n}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 12; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 13; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 15; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Test preds from rFerns summary\n}<LEND>[statement 16; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[control flow](){if}<LSEP>[](symbol){vhdc}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){VHDClassification}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){qs}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.010000}<LSEP>[argument 1; litteral](real){0.100000}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](real){0.800000}<LSEP>[argument 4; litteral](real){0.990000}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){proc}<LSEP>[litteral](str){FANThresh}<LEND>[statement 3; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fitting VHDClass LLR model\n}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){learnPartitionWithLLR}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](str){linear}<LSEP>[](symbol){proc}<LSEP>[](symbol){qs}<LSEP>[](symbol){qs}<LSEP>[](symbol){proc}<LSEP>[argument 7; litteral](logical){FALSE}<LEND>[statement 5; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fit}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 7; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[statement 8; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){table 2\n}<LEND>[statement 9; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 10; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 13; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Test preds from VHDclassificat...}<LEND>[statement 14; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[statement 15; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){VHDClass_val_1.csv}<LEND>[statement 16; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){VHDClass_sub.csv}<LEND>[statement 17; call](){}<LSEP>[](symbol){sink}<LSEP>[argument 0; litteral](str){Pru_VHDclass.txt}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 18; call](){}<LSEP>[](symbol){show}<LSEP>[](symbol){fit}<LEND>[statement 19; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){7.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){8.000000}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){Rule for %d and %d\n}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){Rule}<LEND>[call](){}<LSEP>[](symbol){getBinaryRule}<LSEP>[](symbol){fit}<LSEP>[](symbol){j}<LSEP>[](symbol){i}<LEND>[statement 2; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){Rule}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){LLR}<LEND>[call](){}<LSEP>[](symbol){getLogLikeRatio}<LSEP>[](symbol){Rule}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){LLR}<LEND>[statement 20; call](){}<LSEP>[](symbol){sink}<LEND>[control flow](){if}<LSEP>[](symbol){cfbuild}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){classyfire}<LEND>[statement 1; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fitting classyfire cfbuild mod...}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){cfBuild}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](logical){TRUE}<LSEP>[argument 5; litteral](real){16.000000}<LSEP>[argument 6; litteral](str){SOCK}<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[statement 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){predRes}<LSEP>[](symbol){totalPred}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){predRes}<LEND>[call](){}<LSEP>[](symbol){cfPredict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 6; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){attributes}<LSEP>[](symbol){predRes}<LEND>[](symbol){names}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){predRes}<LSEP>[](symbol){totalPred}<LEND>[statement 8; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){pred}<LEND>[statement 9; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){table 2\n}<LEND>[statement 10; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 11; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 12; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 13; assign](){<-}<LSEP>[](symbol){predRes}<LEND>[call](){}<LSEP>[](symbol){cfPredict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){predRes}<LSEP>[](symbol){totalPred}<LEND>[statement 15; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Test preds from rFerns summary\n}<LEND>[statement 16; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[control flow](){if}<LSEP>[](symbol){brnn}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){features.cub}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 4; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){brnn}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){brnn}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){features.cub}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](real){4.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](real){1000.000000}<LSEP>[argument 5; litteral](real){0.005000}<LSEP>[argument 6; litteral](real){0.100000}<LSEP>[argument 7; litteral](real){10.000000}<LSEP>[argument 8; litteral](real){10000000000.000000}<LSEP>[argument 9; litteral](real){0.000000}<LSEP>[argument 10; litteral](real){0.000100}<LSEP>[argument 11; litteral](real){16.000000}<LSEP>[argument 12; litteral](logical){FALSE}<LSEP>[argument 13; litteral](logical){FALSE}<LSEP>[argument 14; litteral](real){0.000001}<LSEP>[argument 15; litteral](real){40.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fit}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){features.cub}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){features.cub}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){predd}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){optCuts}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){7.500000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){SQWKfun}<LSEP>[](symbol){predd}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[statement 12; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 13; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 14; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){brnn_val_1.csv}<LEND>[statement 15; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){brnn_sub.csv}<LEND>[statement 16; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table of brnn optimcut %d\n}<LSEP>[](symbol){i}<LEND>[statement 17; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 18; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 19; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){qrnn}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){features.cub}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 1; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){qrnn}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){qrnn.fit}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){features.cub}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){Response}<LEND>[argument 2; litteral](real){4.000000}<LSEP>[argument 3; litteral](real){800.000000}<LSEP>[argument 4; litteral](real){0.500000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](logical){FALSE}<LSEP>[argument 7; litteral](real){1.000000}<LEND>[argument 8; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 9; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){18.000000}<LEND>[](symbol){sigmoid}<LSEP>[](symbol){sigmoid.prime}<LSEP>[argument 12; litteral](real){0.000000}<LSEP>[argument 13; litteral](logical){TRUE}<LEND>[statement 3; call](){}<LSEP>[](symbol){sink}<LSEP>[argument 0; litteral](str){Pru_qrnn.txt}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fit}<LEND>[statement 5; call](){}<LSEP>[](symbol){sink}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){qrnn.predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){features.cub}<LEND>[](symbol){fit}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){qrnn.predict}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){features.cub}<LEND>[](symbol){fit}<LEND>[statement 8; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){qrnn_val_1.csv}<LEND>[statement 9; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){qrnn_sub.csv}<LEND>[statement 10; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table of qrnn %d\n}<LSEP>[](symbol){i}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 12; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 13; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){simca}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){rrcovHD}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){RSimca}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](real){10.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[statement 2; call](){}<LSEP>[](symbol){sink}<LSEP>[argument 0; litteral](str){Pru_simca.txt}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fit}<LEND>[statement 4; call](){}<LSEP>[](symbol){show}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[statement 5; call](){}<LSEP>[](symbol){sink}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){vpred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){tpred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){vpred}<LSEP>[](symbol){classification}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){tpred}<LSEP>[](symbol){classification}<LEND>[statement 10; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){simca_val_1.csv}<LEND>[statement 11; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){simca_sub.csv}<LEND>[statement 12; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table of simca %d\n}<LSEP>[](symbol){i}<LEND>[statement 13; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 14; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 15; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){cubist}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Cubist}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[statement 4; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fitting cubist model with 18 c...}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){cubist}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](real){18.000000}<LEND>[statement 6; call](){}<LSEP>[](symbol){sink}<LSEP>[argument 0; litteral](str){Pru_Cubist.txt}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 7; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[statement 8; call](){}<LSEP>[](symbol){sink}<LEND>[statement 9; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Pred validation cubist model w...}<LEND>[statement 10; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 2; litteral](real){9.000000}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 2; litteral](real){9.000000}<LEND>[statement 12; assign](){=}<LSEP>[](symbol){predd}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[statement 13; assign](){=}<LSEP>[](symbol){optCuts}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){7.500000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){SQWKfun}<LSEP>[](symbol){predd}<LEND>[statement 14; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[statement 15; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 16; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 17; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 18; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table of cubist after optimcut...}<LSEP>[](symbol){i}<LEND>[statement 19; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 20; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 21; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 22; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){cubist_val_1.csv}<LEND>[statement 23; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){cubist_sub.csv}<LEND>[control flow](){if}<LSEP>[](symbol){probsvm}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){probsvm}<LEND>[statement 1; call](){}<LSEP>[](symbol){gc}<LEND>[statement 2; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fitting probsvm model\n}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){probsvm}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Ptrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Ptrain}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](str){linear}<LSEP>[argument 4; litteral](NULL){NULL}<LSEP>[argument 5; litteral](real){20.000000}<LSEP>[argument 6; litteral](str){ovr}<LEND>[argument 7; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){5.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[statement 4; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 6; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){pred}<LEND>[statement 7; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){table wsrf 2\n}<LEND>[statement 8; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 9; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 10; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 11; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 12; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Test preds from probsvm summary\n}<LEND>[statement 13; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[control flow](){if}<LSEP>[](symbol){c50}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){class using c50 \n}<LEND>[statement 1; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){C50}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){c50ctl}<LEND>[call](){}<LSEP>[](symbol){C5.0Control}<LSEP>[argument 0; litteral](logical){TRUE}<LSEP>[argument 1; litteral](real){64.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](real){0.250000}<LSEP>[argument 5; litteral](real){2.000000}<LSEP>[argument 6; litteral](logical){FALSE}<LSEP>[argument 7; litteral](real){0.000000}<LEND>[argument 8; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){sample.int}<LSEP>[argument 0; litteral](real){4096.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](integer){1}<LEND>[argument 9; litteral](logical){TRUE}<LSEP>[argument 10; litteral](str){Response}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[statement 5; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){C5.0}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](real){100.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[](symbol){c50ctl}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){trials}<LEND>[argument 1; litteral](str){Actual}<LEND>[argument 3; litteral](str){class}<LSEP>[](symbol){na.pass}<LEND>[statement 8; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){c50 table val vs response %d\n}<LSEP>[](symbol){i}<LEND>[statement 9; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 10; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[control flow](){if}<LSEP>[](symbol){boost}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Boosting using xgboost \n}<LEND>[statement 1; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[statement 2; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){Response}<LEND>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](real){400.000000}<LSEP>[argument 5; litteral](str){reg:linear}<LSEP>[argument 6; litteral](str){rmse}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Pval}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){predd}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){optCuts}<LEND>[call](){}<LSEP>[](symbol){optim}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.500000}<LSEP>[argument 1; litteral](real){7.500000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[](symbol){SQWKfun}<LSEP>[](symbol){predd}<LEND>[statement 11; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[statement 12; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 13; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 14; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){Hmisc}<LSEP>[](symbol){cut2}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Ptrain}<LSEP>[](symbol){pred1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){optCuts}<LSEP>[](symbol){par}<LEND>[argument 2; litteral](real){inf}<LEND>[statement 15; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){table val vs response %d\n}<LSEP>[](symbol){i}<LEND>[statement 16; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 17; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 18; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){Response}<LEND>[statement 19; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[argument 1; litteral](str){finalboost_sub.csv}<LEND>[statement 20; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Pval}<LSEP>[](symbol){pred}<LEND>[statement 21; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){pred}<LEND>[control flow](){if}<LSEP>[](symbol){model}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){train01}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response_1}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){c}<LEND>[argument 1; litteral](real){0.500000}<LEND>[](symbol){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){train10}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response_1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){c}<LEND>[argument 1; litteral](real){0.500000}<LEND>[](symbol){}<LEND>[statement 2; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train01}<LEND>[statement 3; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train10}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){train2}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){train01}<LSEP>[](symbol){train10}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){feature.names}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LSEP>[argument 1; litteral](str){c}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train2}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train2}<LSEP>[](symbol){Response_1}<LEND>[argument 2; litteral](real){0.001000}<LSEP>[argument 3; litteral](real){128.000000}<LSEP>[argument 4; litteral](real){40.000000}<LSEP>[argument 5; litteral](str){rank:pairwise}<LSEP>[argument 6; litteral](real){10.000000}<LSEP>[argument 7; litteral](str){error}<LEND>[statement 7; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){c2}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature.names}<LEND>[statement 8; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){c2}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response}<LEND>[statement 9; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){c2}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response_1}<LEND>[statement 10; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Run knn\n}<LEND>[statement 11; call](){}<LSEP>[](symbol){date}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 14; assign](){<-}<LSEP>[](symbol){tn}<LEND>[call](){}<LSEP>[](symbol){knn}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response}<LEND>[argument 3; litteral](real){16.000000}<LSEP>[argument 4; litteral](real){8.000000}<LSEP>[argument 5; litteral](logical){TRUE}<LEND>[statement 15; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){tn}<LEND>[statement 16; call](){}<LSEP>[](symbol){date}<LEND>[statement 17; call](){}<LSEP>[](symbol){write_csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[](symbol){tn}<LEND>[argument 1; litteral](str){knn_9_4_FALSE.csv}<LEND>[statement 18; assign](){<-}<LSEP>[](symbol){Xtrain}<LEND>[call](){}<LSEP>[](symbol){scale}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[statement 19; assign](){<-}<LSEP>[](symbol){Xtest}<LEND>[call](){}<LSEP>[](symbol){scale}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){feature.names}<LEND>[argument 1; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){Xtrain}<LSEP>[argument 1; litteral](str){scaled:center}<LEND>[argument 2; call](){}<LSEP>[](symbol){attr}<LSEP>[](symbol){Xtrain}<LSEP>[argument 1; litteral](str){scaled:scale}<LEND>[statement 20; assign](){<-}<LSEP>[](symbol){Ytrain}<LEND>[call](){}<LSEP>[](symbol){classvec2classmat}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response}<LEND>[statement 21; call](){}<LSEP>[](symbol){date}<LEND>[statement 22; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Fitting model\n}<LEND>[statement 23; assign](){<-}<LSEP>[](symbol){fit}<LEND>[call](){}<LSEP>[](symbol){som}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LSEP>[](symbol){Xtrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){somgrid}<LSEP>[argument 0; litteral](str){hexagonal}<LEND>[argument 2; litteral](real){200.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.050000}<LSEP>[argument 1; litteral](real){0.005000}<LEND>[statement 24; call](){}<LSEP>[](symbol){date}<LEND>[statement 25; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){fit}<LEND>[statement 26; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){fit}<LEND>[statement 27; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){changes}<LEND>[statement 28; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){counts}<LEND>[statement 29; assign](){<-}<LSEP>[](symbol){coolBlueHotRed}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){n}<LSEP>[](symbol){alpha}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rainbow}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){4.000000}<LSEP>[argument 1; litteral](real){6.000000}<LEND>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 30; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){quality}<LSEP>[](symbol){coolBlueHotRed}<LEND>[statement 31; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){dist.neighbours}<LSEP>[argument 2; litteral](str){SOM neighbour distances}<LEND>[statement 32; assign](){<-}<LSEP>[](symbol){som.hc}<LEND>[call](){}<LSEP>[](symbol){cutree}<LEND>[argument 0; call](){}<LSEP>[](symbol){hclust}<LEND>[argument 0; call](){}<LSEP>[](symbol){dist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){fit}<LSEP>[](symbol){codes}<LEND>[argument 1; litteral](real){8.000000}<LEND>[statement 33; call](){}<LSEP>[](symbol){add.cluster.boundaries}<LSEP>[](symbol){fit}<LSEP>[](symbol){som.hc}<LEND>[statement 34; assign](){<-}<LSEP>[](symbol){obj.classes}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response}<LEND>[statement 35; assign](){<-}<LSEP>[](symbol){colors}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){yellow}<LSEP>[argument 1; litteral](str){green}<LSEP>[argument 2; litteral](str){blue}<LSEP>[argument 3; litteral](str){red}<LSEP>[argument 4; litteral](str){orange}<LSEP>[argument 5; litteral](str){pink}<LSEP>[argument 6; litteral](str){purple}<LEND>[statement 36; call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){fit}<LSEP>[argument 1; litteral](str){mapping}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){colors}<LSEP>[](symbol){obj.classes}<LEND>[](symbol){obj.classes}<LSEP>[argument 4; litteral](str){Prudential Data}<LSEP>[argument 5; litteral](logical){TRUE}<LEND>[statement 37; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predict model\n}<LEND>[statement 38; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LSEP>[](symbol){Xtest}<LEND>[argument 2; call](){}<LSEP>[](symbol){data.matrix}<LSEP>[](symbol){Xtrain}<LEND>[](symbol){Ytrain}<LEND>[statement 39; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){pred}<LEND>[statement 40; call](){}<LSEP>[](symbol){date}<LEND>[statement 41; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){saving the submission file\n}<LEND>[statement 42; assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){prediction}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){unit.classif}<LEND>[statement 43; assign](){<-}<LSEP>[](symbol){fname}<LEND>[call](){}<LSEP>[](symbol){sprintf}<LSEP>[argument 0; litteral](str){Pru_%s_%d_prob.csv}<LSEP>[](symbol){algo}<LSEP>[](symbol){cls}<LEND>[statement 44; call](){}<LSEP>[](symbol){write_csv}<LSEP>[](symbol){submission}<LSEP>[](symbol){fname}<LEND>[statement 45; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Validation predict model\n}<LEND>[statement 46; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){fit}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LSEP>[](symbol){Xtrain}<LEND>[argument 2; call](){}<LSEP>[](symbol){data.matrix}<LSEP>[](symbol){Xtrain}<LEND>[](symbol){Ytrain}<LEND>[statement 47; call](){}<LSEP>[](symbol){date}<LEND>[statement 48; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){saving the validation file\n}<LEND>[statement 49; assign](){<-}<LSEP>[](symbol){val}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){prediction}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){unit.classif}<LEND>[statement 50; call](){}<LSEP>[](symbol){write_csv}<LSEP>[](symbol){val}<LSEP>[argument 1; litteral](str){Pru_bdk_val.csv}<LEND>[statement 51; call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){Metrics}<LEND>[statement 52; call](){}<LSEP>[](symbol){ScoreQuadraticWeightedKappa}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){prediction}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Response} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggthemes}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){mice}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){bind_rows}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){full} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){numeric_vars}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){6.000000}<LSEP>[argument 3; litteral](real){7.000000}<LSEP>[argument 4; litteral](real){8.000000}<LSEP>[argument 5; litteral](real){10.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Titanic}<LEND>[call](){}<LSEP>[](symbol){na.omit}<LSEP>[](symbol){numeric_vars}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){Titanic}<LEND>[call](){}<LSEP>[](symbol){cor}<LSEP>[](symbol){Titanic}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Titanic}<LSEP>[](symbol){Fare}<LEND>[argument 2; litteral](str){Correlation between Age and Fa...} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){list.of.packages}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){stringr}<LSEP>[argument 1; litteral](str){data.table}<LSEP>[argument 2; litteral](str){taRifx}<LSEP>[argument 3; litteral](str){methods}<LSEP>[argument 4; litteral](str){rgdal}<LSEP>[argument 5; litteral](str){sp}<LSEP>[argument 6; litteral](str){maptools}<LSEP>[argument 7; litteral](str){zoo}<LSEP>[argument 8; litteral](str){reshape2}<LSEP>[argument 9; litteral](str){plyr}<LSEP>[argument 10; litteral](str){rgeos}<LSEP>[argument 11; litteral](str){reshape}<LSEP>[argument 12; litteral](str){tidyr}<LSEP>[argument 13; litteral](str){ggplot2}<LSEP>[argument 14; litteral](str){rpart}<LSEP>[argument 15; litteral](str){rpart.plot}<LEND>[assign](){<-}<LSEP>[](symbol){new.packages}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){list.of.packages}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){list.of.packages}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){installed.packages}<LEND>[](symbol){}<LSEP>[argument 2; litteral](str){Package}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){new.packages}<LEND>[true branch; call](){}<LSEP>[](symbol){install.packages}<LSEP>[](symbol){new.packages}<LSEP>[argument 1; litteral](str){http://cran.r-project.org}<LEND>[call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){list.of.packages}<LSEP>[](symbol){library}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](str){,}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](str){,}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[](symbol){combine}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){test}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){combine.r}<LSEP>[](symbol){combine}<LEND>[assign](){<-}<LSEP>[](symbol){combine}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){combine}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){^$|^ $}<LSEP>[argument 1; litteral](logical){NA}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){combine}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){7.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){4.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[call](){}<LSEP>[](symbol){barplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){combine}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){5.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){4.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 3; litteral](str){NA Value Count}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Fare}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Fare}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Pclass}<LSEP>[argument 1; litteral](str){Fare}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){Pclass}<LEND>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Fare}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[](symbol){}<LEND>[](symbol){fare.fill}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[](symbol){}<LEND>[](symbol){Pclass}<LEND>[](symbol){}<LEND>[](symbol){fare.fill}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){tittle}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Name}<LEND>[argument 1; litteral](str){,}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){F}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){tittle}<LEND>[call](){}<LSEP>[](symbol){substr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){tittle}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){str_locate}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){tittle}<LEND>[argument 1; litteral](str){[.]}<LEND>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){tittle}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){tittle}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){tittle}<LSEP>[argument 1; litteral](str){Age}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){tittle}<LEND>[](symbol){Age}<LEND>[argument 2; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){90.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[](symbol){sumif}<LEND>[call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Age}<LSEP>[](symbol){tittle}<LEND>[](symbol){combine}<LSEP>[](symbol){median}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){sumif}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){sumif}<LEND>[argument 1; litteral](str){Age}<LEND>[litteral](str){mean.tittle}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){rownum}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){combine}<LEND>[assign](){<-}<LSEP>[](symbol){combine}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){combine}<LSEP>[](symbol){sumif}<LSEP>[argument 2; litteral](str){tittle}<LSEP>[](symbol){T}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){combine}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){rownum}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){age.fill}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){mean.tittle}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Embarked}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Embarked}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){embarked.fill}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Embarked}<LEND>[assign](){<-}<LSEP>[](symbol){temp}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){embarked.fill}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){embarked.fill}<LEND>[](symbol){}<LEND>[](symbol){embarked.fill}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){temp}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){temp}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){temp}<LSEP>[](symbol){Freq}<LEND>[](symbol){}<LEND>[](symbol){Var1}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SibS}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SibS}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Parch}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Parch}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SibS}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Parch}<LEND>[assign](){<-}<LSEP>[](symbol){test.edit}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){train.edit}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test.edit}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test.edit}<LSEP>[](symbol){tittle}<LEND>[argument 1; litteral](str){Dona.}<LEND>[](symbol){}<LEND>[](symbol){tittle}<LEND>[litteral](str){Lady.}<LEND>[assign](){<-}<LSEP>[](symbol){my_tree}<LEND>[call](){}<LSEP>[](symbol){rpart}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Sex}<LSEP>[](symbol){tittle}<LEND>[](symbol){age.fill}<LEND>[](symbol){Pclass}<LEND>[](symbol){fare.fill}<LEND>[](symbol){total.relative}<LEND>[](symbol){embarked.fill}<LEND>[](symbol){combine}<LSEP>[argument 2; litteral](str){class}<LEND>[argument 3; call](){}<LSEP>[](symbol){rpart.control}<LSEP>[argument 0; litteral](real){0.000100}<LEND>[call](){}<LSEP>[](symbol){prp}<LSEP>[](symbol){my_tree}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){100.000000}<LEND>[assign](){<-}<LSEP>[](symbol){my_prediction}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){my_tree}<LSEP>[](symbol){test.edit}<LSEP>[argument 2; litteral](str){class}<LEND>[assign](){<-}<LSEP>[](symbol){test.edit}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){test.edit}<LSEP>[](symbol){my_prediction}<LEND>[assign](){<-}<LSEP>[](symbol){test.result}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test.edit}<LSEP>[](symbol){PassengerId}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test.edit}<LSEP>[](symbol){my_prediction}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){test.result}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){PassengerId}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){test.result}<LSEP>[argument 1; litteral](str){R-EMBULAN_Titanic.csv}<LSEP>[argument 2; litteral](str){,}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Pclass}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){embarked.fill}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){embarked.fill}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){age.range}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){age.fill}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](str){TODDLER}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){age.fill}<LEND>[argument 1; litteral](real){10.000000}<LEND>[argument 1; litteral](str){HIGHSCHOOL}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){age.fill}<LEND>[argument 1; litteral](real){21.000000}<LEND>[argument 1; litteral](str){TEEN}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){age.fill}<LEND>[argument 1; litteral](real){35.000000}<LEND>[argument 1; litteral](str){ADULT}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){age.fill}<LEND>[argument 1; litteral](real){55.000000}<LEND>[argument 1; litteral](str){OLDADULT}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){age.fill}<LEND>[argument 1; litteral](real){200.000000}<LEND>[argument 1; litteral](str){ELDERLY}<LSEP>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){age.range}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){age.range}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_discrete}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){TODDLER}<LSEP>[argument 1; litteral](str){HIGHSCHOOL}<LSEP>[argument 2; litteral](str){TEEN}<LSEP>[argument 3; litteral](str){ADULT}<LSEP>[argument 4; litteral](str){OLDADULT}<LSEP>[argument 5; litteral](str){ELDERLY}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Sex}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Sex}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){age.fill}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){age.fill}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){tittle}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){tittle}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){90.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.range}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){FREE}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){CHEAP}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){CHEAP-MODERATE}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){MODERATE-EXPENSIVE}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[](symbol){fare.fill}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](str){EXPENSIVE}<LSEP>[argument 2; litteral](str){}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){fare.range}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){fare.range}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){relative.range}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SibSp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){ALONE}<LSEP>[argument 2; litteral](str){NOT_ALONE}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){relative.range}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){relative.range}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative.range}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){NO_RELATIVE}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[](symbol){total.relative}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){SMALL_FAMILY}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[](symbol){total.relative}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){SMALL-MODERATE_FAMILY}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[](symbol){total.relative}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){MODERATE-BIG_FAMILY}<LEND>[argument 2; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){quantile}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){total.relative}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[](symbol){total.relative}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](str){BIG_FAMILY}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){total.relative.range}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){total.relative.range}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){90.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_discrete}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NO_RELATIVE}<LSEP>[argument 1; litteral](str){SMALL_FAMILY}<LSEP>[argument 2; litteral](str){SMALL-MODERATE_FAMILY}<LSEP>[argument 3; litteral](str){MODERATE-BIG_FAMILY}<LSEP>[argument 4; litteral](str){BIG_FAMILY}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){sibsp.range}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){SibSp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](str){ALONE}<LSEP>[argument 2; litteral](str){NO_SIBSP}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){sibsp.range}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){sibsp.range}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){parch.range}<LEND>[call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combine}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](str){ALONE}<LSEP>[argument 2; litteral](str){NO_PARCH}<LEND>[assign](){<-}<LSEP>[](symbol){freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combine}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){parch.range}<LSEP>[argument 1; litteral](str){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){parch.range}<LSEP>[](symbol){Freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){identity}<LSEP>[argument 2; litteral](str){dodge} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidyverse}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){formattable}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){kernlab}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){gridExtra}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){splitstackshape}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){cowplot}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){e1071}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){tail}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){anyNA}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){anyNA}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){duplicated}<LSEP>[](symbol){train}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){9.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sample}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){label}<LEND>[](symbol){i}<LEND>[](symbol){}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sample}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sample}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){4.000000}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){4000.000000}<LSEP>[argument 2; litteral](real){100.000000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){digit}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sample}<LSEP>[](symbol){j}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){28.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){image}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){digit}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){rev}<LEND>[argument 1; call](){}<LSEP>[](symbol){grey.colors}<LSEP>[argument 0; litteral](real){255.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){AvgIntensity}<LEND>[call](){}<LSEP>[](symbol){rowMeans}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){AvgIntensity}<LEND>[call](){}<LSEP>[](symbol){rowMeans}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){label}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){label}<LEND>[call](){}<LSEP>[](symbol){theme_set}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){theme_classic}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){0.500000}<LSEP>[argument 1; litteral](real){12.000000}<LSEP>[argument 2; litteral](str){bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 5; litteral](str){none}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){label}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarize}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){AvgIntensity}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){label}<LEND>[](symbol){AvgInt}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){label}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_col}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Numbers}<LSEP>[argument 1; litteral](str){Number vs Avg. Intensity in Tr...}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){label}<LEND>[](symbol){AvgIntensity}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){label}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_violin}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Numbers}<LSEP>[argument 1; litteral](str){Avg. Intensity Distribution in...}<LEND>[call](){}<LSEP>[](symbol){percent}<LEND>[argument 0; call](){}<LSEP>[](symbol){prop.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){label}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[assign](){<-}<LSEP>[](symbol){sample_train}<LEND>[call](){}<LSEP>[](symbol){stratified}<LSEP>[](symbol){train}<LSEP>[argument 1; litteral](str){label}<LSEP>[argument 2; litteral](real){500.000000}<LEND>[call](){}<LSEP>[](symbol){percent}<LEND>[argument 0; call](){}<LSEP>[](symbol){prop.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sample_train}<LSEP>[](symbol){label}<LEND>[assign](){<-}<LSEP>[](symbol){sample_train}<LEND>[call](){}<LSEP>[](symbol){as.tibble}<LSEP>[](symbol){sample_train}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){linear_model}<LEND>[call](){}<LSEP>[](symbol){ksvm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){label}<LSEP>[](symbol){.}<LEND>[](symbol){sample_train}<LSEP>[](symbol){F}<LSEP>[argument 3; litteral](str){vanilladot}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){RBF_model}<LEND>[call](){}<LSEP>[](symbol){ksvm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){label}<LSEP>[](symbol){.}<LEND>[](symbol){sample_train}<LSEP>[](symbol){F}<LSEP>[argument 3; litteral](str){rbfdot}<LEND>[assign](){<-}<LSEP>[](symbol){linear_eval_train}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){linear_model}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){linear_eval_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){label}<LEND>[assign](){<-}<LSEP>[](symbol){RBF_eval_train}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){RBF_model}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){RBF_eval_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){label}<LEND>[assign](){<-}<LSEP>[](symbol){trainControl}<LEND>[call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){cv}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){metric}<LSEP>[litteral](str){Accuracy}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){20.000000}<LEND>[assign](){<-}<LSEP>[](symbol){grid}<LEND>[call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.000000}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){options}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){svm_cv}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){label}<LSEP>[](symbol){.}<LEND>[](symbol){sample_train}<LSEP>[argument 2; litteral](str){svmRadial}<LSEP>[](symbol){metric}<LSEP>[](symbol){grid}<LSEP>[](symbol){trainControl}<LEND>[call](){}<LSEP>[](symbol){options}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){svm_cv}<LEND>[assign](){<-}<LSEP>[](symbol){RBF_final_model}<LEND>[call](){}<LSEP>[](symbol){ksvm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){label}<LSEP>[](symbol){.}<LEND>[](symbol){sample_train}<LSEP>[](symbol){F}<LSEP>[argument 3; litteral](real){3.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 5; litteral](str){rbfdot}<LEND>[assign](){<-}<LSEP>[](symbol){RBF_final_eval_train}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){RBF_final_model}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; assign](){<-}<LSEP>[](symbol){conf_train}<LEND>[call](){}<LSEP>[](symbol){confusionMatrix}<LSEP>[](symbol){RBF_final_eval_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){label}<LEND>[call](){}<LSEP>[](symbol){colMeans}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){conf_train}<LSEP>[](symbol){byClass}<LEND>[assign](){<-}<LSEP>[](symbol){test_result}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){28000.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){RBF_final_model}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){write_csv}<LSEP>[](symbol){test_result} |
[](){expression} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){rpart}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){rpart.plot}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){combi}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Name}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Name}<LEND>[call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Name}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){[,.]}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Name}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){[,.]}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Name}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](str){[,.]}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Name}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){[,.]}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){sub}<LSEP>[argument 0; litteral](str){ }<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){PassengerId}<LEND>[argument 1; litteral](real){797.000000}<LEND>[litteral](str){Mrs}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Lady}<LSEP>[argument 1; litteral](str){the Countess}<LSEP>[argument 2; litteral](str){Mlle}<LSEP>[argument 3; litteral](str){Mee}<LSEP>[argument 4; litteral](str){Ms}<LEND>[litteral](str){Miss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Capt}<LSEP>[argument 1; litteral](str){Don}<LSEP>[argument 2; litteral](str){Major}<LSEP>[argument 3; litteral](str){Sir}<LSEP>[argument 4; litteral](str){Col}<LSEP>[argument 5; litteral](str){Jonkheer}<LSEP>[argument 6; litteral](str){Rev}<LSEP>[argument 7; litteral](str){Dr}<LSEP>[argument 8; litteral](str){Master}<LEND>[litteral](str){Mr}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Dona}<LEND>[litteral](str){Mrs}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Title}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Embarked}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[litteral](str){S}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Embarked}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Embarked}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){1044.000000}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){family_size}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){SibSp}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Child}<LEND>[call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Female}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){female}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){UpperClass}<LEND>[call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Pclass}<LEND>[argument 1; litteral](str){1}<LEND>[assign](){<-}<LSEP>[](symbol){predicted_age}<LEND>[call](){}<LSEP>[](symbol){rpart}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){SibSp}<LEND>[](symbol){Parch}<LEND>[](symbol){Fare}<LEND>[](symbol){Embarked}<LEND>[](symbol){Title}<LEND>[](symbol){family_size}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combi}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Age}<LEND>[](symbol){}<LEND>[argument 2; litteral](str){anova}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){predicted_age}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combi}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){combi}<LSEP>[](symbol){Age}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){train_new}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combi}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){test_new}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){combi}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){892.000000}<LSEP>[argument 1; litteral](real){1309.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_new}<LSEP>[](symbol){Survived}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_new}<LSEP>[](symbol){Cabin}<LEND>[call](){}<LSEP>[](symbol){substr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_new}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_new}<LSEP>[](symbol){Cabin}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_new}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){H}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_new}<LSEP>[](symbol){Cabin}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_new}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](str){T}<LEND>[litteral](str){H}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_new}<LSEP>[](symbol){Cabin}<LEND>[call](){}<LSEP>[](symbol){substr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_new}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_new}<LSEP>[](symbol){Cabin}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_new}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](str){}<LEND>[litteral](str){H}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_new}<LSEP>[](symbol){Cabin}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_new}<LSEP>[](symbol){Cabin}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_new}<LSEP>[](symbol){Cabin}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_new}<LSEP>[](symbol){Cabin}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){train_new}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){test_new}<LEND>[assign](){<-}<LSEP>[](symbol){my_tree}<LEND>[call](){}<LSEP>[](symbol){rpart}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Child}<LSEP>[](symbol){Female}<LEND>[](symbol){UpperClass}<LEND>[](symbol){family_size}<LEND>[](symbol){train_new}<LSEP>[argument 2; litteral](str){class}<LEND>[argument 3; call](){}<LSEP>[](symbol){rpart.control}<LSEP>[argument 0; litteral](real){0.000100}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){my_tree}<LEND>[call](){}<LSEP>[](symbol){prp}<LSEP>[](symbol){my_tree}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){100.000000}<LEND>[assign](){<-}<LSEP>[](symbol){my_prediction}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){my_tree}<LSEP>[](symbol){test_new}<LSEP>[argument 2; litteral](str){class}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){my_prediction}<LEND>[assign](){<-}<LSEP>[](symbol){vector_passengerid}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_new}<LSEP>[](symbol){PassengerId}<LEND>[assign](){<-}<LSEP>[](symbol){my_solution}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){vector_passengerid}<LSEP>[](symbol){my_prediction}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){my_solution}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){my_solution}<LSEP>[argument 1; litteral](str){my_solution.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[assign](){<-}<LSEP>[](symbol){events}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/events.csv}<LEND>[assign](){<-}<LSEP>[](symbol){views}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/page_views_sample.csv}<LEND>[assign](){<-}<LSEP>[](symbol){views}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){views}<LSEP>[](symbol){}<LSEP>[](symbol){.N}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){document_id}<LSEP>[argument 1; litteral](str){uuid}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){leak}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){views}<LEND>[argument 1; call](){}<LSEP>[](symbol){J}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){events}<LSEP>[](symbol){document_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){events}<LSEP>[](symbol){uuid}<LEND>[](symbol){N}<LEND>[call](){}<LSEP>[](symbol){setkeyv}<LSEP>[](symbol){events}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){display_id}<LSEP>[argument 1; litteral](str){document_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){views}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/clicks_train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/clicks_test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){promoted}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/promoted_content.csv}<LEND>[call](){}<LSEP>[](symbol){setkeyv}<LSEP>[](symbol){promoted}<LSEP>[argument 1; litteral](str){ad_id}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){document_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){promoted}<LEND>[argument 1; call](){}<LSEP>[](symbol){J}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){ad_id}<LEND>[](symbol){document_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){promoted}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){prob_by_adid}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){clicked}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){clicked}<LEND>[argument 3; litteral](str){ad_id}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){M}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){clicked}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){prob_by_adid}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){likelihood}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){V1}<LSEP>[](symbol){V2}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){12.000000}<LSEP>[](symbol){M}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){12.000000}<LSEP>[](symbol){V2}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){prob_by_adid}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){Now Map testset probs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){prob_by_adid}<LEND>[argument 1; call](){}<LSEP>[](symbol){J}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){ad_id}<LEND>[](symbol){likelihood}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){prob}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){prob}<LSEP>[](symbol){M}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){leak}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events}<LEND>[argument 1; call](){}<LSEP>[](symbol){J}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){display_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){document_id}<LEND>[](symbol){leak}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){leak}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){prob}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){test}<LSEP>[argument 1; litteral](real){20.000000}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){leak}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){prob_by_adid}<LSEP>[](symbol){events}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){Now Build the Submission}<LEND>[call](){}<LSEP>[](symbol){setorderv}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){display_id}<LSEP>[argument 1; litteral](str){prob}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){ad_id}<LSEP>[argument 1; litteral](str){ }<LEND>[argument 3; litteral](str){display_id}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){sub}<LSEP>[argument 1; litteral](str){submission_leak1.csv}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){car}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){df_train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train_users.csv}<LEND>[assign](){=}<LSEP>[](symbol){df_test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test_users.csv}<LEND>[assign](){=}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_train}<LSEP>[argument 1; litteral](str){country_destination}<LEND>[assign](){=}<LSEP>[](symbol){df_train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){country_destination}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){df_train}<LEND>[assign](){=}<LSEP>[](symbol){df_all}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){df_train}<LSEP>[](symbol){df_test}<LEND>[assign](){=}<LSEP>[](symbol){df_all}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){df_all}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){date_first_booking}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){df_all}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){dac}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){str_split_fixed}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df_all}<LSEP>[](symbol){date_account_created}<LEND>[argument 1; litteral](str){-}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[argument 1; litteral](str){dac_year}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dac}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[argument 1; litteral](str){dac_month}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dac}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[argument 1; litteral](str){dac_day}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dac}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[assign](){=}<LSEP>[](symbol){df_all}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){df_all}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){date_account_created}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){tfa_year}<LEND>[call](){}<LSEP>[](symbol){substring}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){timestamp_first_active}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){4.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[argument 1; litteral](str){tfa_month}<LEND>[call](){}<LSEP>[](symbol){substring}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[argument 1; litteral](str){timestamp_first_active}<LEND>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){6.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[argument 1; litteral](str){tfa_day}<LEND>[call](){}<LSEP>[](symbol){substring}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[argument 1; litteral](str){timestamp_first_active}<LEND>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[assign](){=}<LSEP>[](symbol){df_all}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){df_all}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){timestamp_first_active}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LEND>[argument 1; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df_all}<LSEP>[](symbol){age}<LEND>[argument 1; litteral](real){14.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df_all}<LSEP>[](symbol){age}<LEND>[argument 1; litteral](real){100.000000}<LEND>[argument 2; litteral](str){age}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){ohe_feats}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){gender}<LSEP>[argument 1; litteral](str){signup_method}<LSEP>[argument 2; litteral](str){signup_flow}<LSEP>[argument 3; litteral](str){language}<LSEP>[argument 4; litteral](str){affiliate_channel}<LSEP>[argument 5; litteral](str){affiliate_provider}<LSEP>[argument 6; litteral](str){first_affiliate_tracked}<LSEP>[argument 7; litteral](str){signup_app}<LSEP>[argument 8; litteral](str){first_device_type}<LSEP>[argument 9; litteral](str){first_browser}<LEND>[assign](){<-}<LSEP>[](symbol){dummies}<LEND>[call](){}<LSEP>[](symbol){dummyVars}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){gender}<LSEP>[](symbol){signup_method}<LEND>[](symbol){signup_flow}<LEND>[](symbol){language}<LEND>[](symbol){affiliate_channel}<LEND>[](symbol){affiliate_provider}<LEND>[](symbol){first_affiliate_tracked}<LEND>[](symbol){signup_app}<LEND>[](symbol){first_device_type}<LEND>[](symbol){first_browser}<LEND>[](symbol){df_all}<LEND>[assign](){<-}<LSEP>[](symbol){df_all_ohe}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){dummies}<LSEP>[](symbol){df_all}<LEND>[assign](){<-}<LSEP>[](symbol){df_all_combined}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){df_all}<LEND>[](symbol){ohe_feats}<LEND>[](symbol){df_all_ohe}<LEND>[assign](){=}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all_combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df_all_combined}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df_train}<LSEP>[](symbol){id}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){recode}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){labels}<LSEP>[](symbol){country_destination}<LEND>[argument 1; litteral](str){'NDF'=0; 'US'=1; 'other'=2; 'F...}<LEND>[assign](){=}<LSEP>[](symbol){X_test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df_all_combined}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df_all_combined}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){df_test}<LSEP>[](symbol){id}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){xgb}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){y}<LSEP>[argument 2; litteral](real){0.100000}<LSEP>[argument 3; litteral](real){9.000000}<LSEP>[argument 4; litteral](real){25.000000}<LSEP>[argument 5; litteral](real){0.500000}<LSEP>[argument 6; litteral](real){0.500000}<LSEP>[argument 7; litteral](real){1.000000}<LSEP>[argument 8; litteral](str){merror}<LSEP>[argument 9; litteral](str){multi:softprob}<LSEP>[argument 10; litteral](real){12.000000}<LSEP>[argument 11; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){y_pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X_test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){y_pred}<LSEP>[argument 1; litteral](real){12.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NDF}<LSEP>[argument 1; litteral](str){US}<LSEP>[argument 2; litteral](str){other}<LSEP>[argument 3; litteral](str){FR}<LSEP>[argument 4; litteral](str){CA}<LSEP>[argument 5; litteral](str){GB}<LSEP>[argument 6; litteral](str){ES}<LSEP>[argument 7; litteral](str){IT}<LSEP>[argument 8; litteral](str){PT}<LSEP>[argument 9; litteral](str){NL}<LSEP>[argument 10; litteral](str){DE}<LSEP>[argument 11; litteral](str){AU}<LEND>[assign](){<-}<LSEP>[](symbol){predictions_top5}<LEND>[call](){}<LSEP>[](symbol){as.vector}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){predictions}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){12.000000}<LSEP>[argument 1; litteral](real){8.000000}<LEND>[assign](){<-}<LSEP>[](symbol){ids}<LSEP>[litteral](NULL){NULL}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){NROW}<LSEP>[](symbol){X_test}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){idx}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){X_test}<LSEP>[](symbol){id}<LEND>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){ids}<LEND>[call](){}<LSEP>[](symbol){append}<LSEP>[](symbol){ids}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){idx}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LSEP>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){id}<LEND>[](symbol){ids}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){country}<LEND>[](symbol){predictions_top5}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){submission.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){ggthemes}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){scales}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){mice}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){bind_rows}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){full}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){(.*, )|(\\..*)}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Name}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[assign](){<-}<LSEP>[](symbol){rare_title}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Dona}<LSEP>[argument 1; litteral](str){Lady}<LSEP>[argument 2; litteral](str){the Countess}<LSEP>[argument 3; litteral](str){Capt}<LSEP>[argument 4; litteral](str){Col}<LSEP>[argument 5; litteral](str){Don}<LSEP>[argument 6; litteral](str){Dr}<LSEP>[argument 7; litteral](str){Major}<LSEP>[argument 8; litteral](str){Rev}<LSEP>[argument 9; litteral](str){Sir}<LSEP>[argument 10; litteral](str){Jonkheer}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mlle}<LEND>[litteral](str){Miss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Ms}<LEND>[litteral](str){Miss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mme}<LEND>[litteral](str){Mrs}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[](symbol){rare_title}<LEND>[litteral](str){Rare Title}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Surname}<LEND>[call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Name}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){[,.]}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){We have <b>}<LEND>[argument 1; call](){}<LSEP>[](symbol){nlevels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Surname}<LEND>[argument 2; litteral](str){</b> unique surnames. I would ...}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){SibSp}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Family}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Surname}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 2; litteral](str){_}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Fsize}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Family Size}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){FsizeD}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){singleton}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){FsizeD}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){small}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){FsizeD}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 1; litteral](real){4.000000}<LEND>[litteral](str){large}<LEND>[call](){}<LSEP>[](symbol){mosaicplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){FsizeD}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){Family Size by Survival}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Cabin}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){28.000000}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](NULL){NULL}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Deck}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Cabin}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](NULL){NULL}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Embarked}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){We will infer their values for...}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Fare}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){</b>and<b> $}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Fare}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 4; litteral](str){</b>respectively and their cla...}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Pclass}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 6; litteral](str){</b>and<b>}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Pclass}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 8; litteral](str){</b>. So from where did they e...}<LEND>[assign](){<-}<LSEP>[](symbol){embark_fare}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){PassengerId}<LSEP>[argument 1; litteral](real){62.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){PassengerId}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){embark_fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Embarked}<LSEP>[](symbol){Fare}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[argument 0; litteral](real){80.000000}<LEND>[argument 1; litteral](str){red}<LSEP>[argument 2; litteral](str){dashed}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_y_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){dollar_format}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Embarked}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[litteral](str){C}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[argument 1; litteral](real){1044.000000}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Pclass}<LEND>[argument 1; litteral](str){3}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){S}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LSEP>[argument 0; litteral](str){#99d6ff}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_vline}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){median}<LSEP>[](symbol){Fare}<LSEP>[](symbol){T}<LEND>[argument 1; litteral](str){red}<LSEP>[argument 2; litteral](str){dashed}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){dollar_format}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){1044.000000}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Pclass}<LEND>[argument 1; litteral](str){3}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){S}<LEND>[](symbol){}<LEND>[](symbol){Fare}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[](symbol){factor_vars}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){PassengerId}<LSEP>[argument 1; litteral](str){Pclass}<LSEP>[argument 2; litteral](str){Sex}<LSEP>[argument 3; litteral](str){Embarked}<LSEP>[argument 4; litteral](str){Title}<LSEP>[argument 5; litteral](str){Surname}<LSEP>[argument 6; litteral](str){Family}<LSEP>[argument 7; litteral](str){FsizeD}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[](symbol){factor_vars}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[](symbol){factor_vars}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){129.000000}<LEND>[assign](){<-}<LSEP>[](symbol){mice_mod}<LEND>[call](){}<LSEP>[](symbol){mice}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){PassengerId}<LSEP>[argument 1; litteral](str){Name}<LSEP>[argument 2; litteral](str){Ticket}<LSEP>[argument 3; litteral](str){Cabin}<LSEP>[argument 4; litteral](str){Family}<LSEP>[argument 5; litteral](str){Surname}<LSEP>[argument 6; litteral](str){Survived}<LEND>[argument 1; litteral](str){rf}<LEND>[assign](){<-}<LSEP>[](symbol){mice_output}<LEND>[call](){}<LSEP>[](symbol){complete}<LSEP>[](symbol){mice_mod}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){hist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[](symbol){F}<LSEP>[argument 2; litteral](str){Age: Original Data}<LSEP>[argument 3; litteral](str){darkgreen}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.040000}<LEND>[call](){}<LSEP>[](symbol){hist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mice_output}<LSEP>[](symbol){Age}<LEND>[](symbol){F}<LSEP>[argument 2; litteral](str){Age: MICE Output}<LSEP>[argument 3; litteral](str){lightgreen}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.040000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mice_output}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[litteral](str){Child}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[litteral](str){Adult}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[litteral](str){Not Mother}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){female}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Miss}<LEND>[litteral](str){Mother}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[call](){}<LSEP>[](symbol){md.pattern}<LSEP>[](symbol){full}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){892.000000}<LSEP>[argument 1; litteral](real){1309.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){754.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf_model}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Age}<LEND>[](symbol){SibSp}<LEND>[](symbol){Parch}<LEND>[](symbol){Fare}<LEND>[](symbol){Embarked}<LEND>[](symbol){Title}<LEND>[](symbol){FsizeD}<LEND>[](symbol){Child}<LEND>[](symbol){Mother}<LEND>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){rf_model}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.360000}<LEND>[call](){}<LSEP>[](symbol){legend}<LSEP>[argument 0; litteral](str){topright}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rf_model}<LSEP>[](symbol){err.rate}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){importance}<LEND>[call](){}<LSEP>[](symbol){importance}<LSEP>[](symbol){rf_model}<LEND>[assign](){<-}<LSEP>[](symbol){varImportance}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){row.names}<LSEP>[](symbol){importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){importance}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){MeanDecreaseGini}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rankImportance}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){varImportance}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){#}<LEND>[argument 1; call](){}<LSEP>[](symbol){dense_rank}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Importance}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){rankImportance}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){Variables}<LSEP>[](symbol){Importance}<LEND>[](symbol){Importance}<LSEP>[](symbol){Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Variables}<LSEP>[argument 1; litteral](real){0.500000}<LSEP>[](symbol){Rank}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.550000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](str){red}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Variables}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[](symbol){prediction}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf_model}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){solution}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PassengerId}<LEND>[](symbol){prediction}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){solution}<LSEP>[argument 1; litteral](str){rf_mod_Solution.csv}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidyverse}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lubridate}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){wordcloud}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidytext}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){DT}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){leaflet}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){igraph}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggraph}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){topicmodels}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tm}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){SnowballC}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){text2vec}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){glmnet}<LEND>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[assign](){=}<LSEP>[](symbol){fillColor}<LSEP>[litteral](str){#FFA07A}<LEND>[assign](){=}<LSEP>[](symbol){fillColor2}<LSEP>[litteral](str){#F1C40F}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){=}<LSEP>[](symbol){resources}<LEND>[call](){}<LSEP>[](symbol){read_csv}<LSEP>[argument 0; litteral](str){../input/resources.csv}<LEND>[assign](){=}<LSEP>[](symbol){train3}<LSEP>[](symbol){train}<LEND>[assign](){=}<LSEP>[](symbol){test3}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){glimpse}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){glimpse}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){glimpse}<LSEP>[](symbol){resources}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_is_approved}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_is_approved}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_is_approved}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){project_category_grouped_data}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){project_grade_category}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){project_grade_category}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Count}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){project_category_grouped_data}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){project_grade_category}<LSEP>[](symbol){Count}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Type of Project Grade Category}<LSEP>[argument 1; litteral](str){Count}<LSEP>[argument 2; litteral](str){Project Grade Category and Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[call](){}<LSEP>[](symbol){datatable}<LSEP>[](symbol){project_category_grouped_data}<LSEP>[argument 1; litteral](str){bootstrap}<LSEP>[argument 2; litteral](str){table-condensed}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){tp}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){project_subject_categories}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){project_subject_categories}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){ungroup}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){project_subject_categories}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){head}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){project_subject_categories}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LSEP>[](symbol){fillColor2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){project_subject_categories}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){(}<LSEP>[](symbol){Count}<LSEP>[argument 2; litteral](str){)}<LSEP>[argument 3; litteral](str){}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](str){black}<LSEP>[argument 5; litteral](str){bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Type of Project Subject Category}<LSEP>[argument 1; litteral](str){Count}<LSEP>[argument 2; litteral](str){Project Subject Category}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[assign](){=}<LSEP>[](symbol){project_subject_categories_data}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){project_subject_categories}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){project_subject_categories}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){head}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){project_subject_categories_data}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){project_subject_categories}<LSEP>[](symbol){Count}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Type of Project Subject Category}<LSEP>[argument 1; litteral](str){Count}<LSEP>[argument 2; litteral](str){Project Subject Category}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[call](){}<LSEP>[](symbol){datatable}<LSEP>[](symbol){project_subject_categories_data}<LSEP>[argument 1; litteral](str){bootstrap}<LSEP>[argument 2; litteral](str){table-condensed}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){tp}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){project_subject_subcategories}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){project_subject_subcategories}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){ungroup}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){project_subject_subcategories}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){head}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){project_subject_subcategories}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LSEP>[](symbol){fillColor2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){project_subject_subcategories}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){(}<LSEP>[](symbol){Count}<LSEP>[argument 2; litteral](str){)}<LSEP>[argument 3; litteral](str){}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](str){black}<LSEP>[argument 5; litteral](str){bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Type of Project Subject SubCat...}<LSEP>[argument 1; litteral](str){Count}<LSEP>[argument 2; litteral](str){Project Subject SubCategory}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){school_state}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){school_state}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){ungroup}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){school_state}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){head}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){school_state}<LSEP>[](symbol){Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LSEP>[](symbol){fillColor2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){school_state}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){(}<LSEP>[](symbol){Count}<LSEP>[argument 2; litteral](str){)}<LSEP>[argument 3; litteral](str){}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](str){black}<LSEP>[argument 5; litteral](str){bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){States}<LSEP>[argument 1; litteral](str){Count}<LSEP>[argument 2; litteral](str){States and Count}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_1}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_1}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){=}<LSEP>[](symbol){prep_fun}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stringr}<LSEP>[](symbol){str_replace_all}<LEND>[argument 0; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](str){[^[:graph:]]}<LSEP>[argument 2; litteral](str){ }<LEND>[assign](){<-}<LSEP>[](symbol){myTokeniser}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){str}<LEND>[body; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){str}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stringr}<LSEP>[](symbol){str_replace_all}<LEND>[argument 0; litteral](str){[']|[\xE2\x80\x99]}<LSEP>[argument 1; litteral](str){ }<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){tokenizers}<LSEP>[](symbol){tokenize_words}<LEND>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){tokenizers}<LSEP>[](symbol){stopwords}<LEND>[argument 0; litteral](str){en}<LEND>[assign](){<-}<LSEP>[](symbol){create_vocab}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){dataset}<LSEP>[](symbol){id}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dataset}<LEND>[call](){}<LSEP>[](symbol){iconv}<LSEP>[](symbol){dataset}<LSEP>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){tok_fun}<LSEP>[](symbol){myTokeniser}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){it_train}<LEND>[call](){}<LSEP>[](symbol){itoken}<LSEP>[](symbol){dataset}<LSEP>[](symbol){prep_fun}<LSEP>[](symbol){tok_fun}<LSEP>[](symbol){id}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){create_vocabulary}<LSEP>[](symbol){it_train}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){tokenizers}<LSEP>[](symbol){stopwords}<LEND>[argument 0; litteral](str){en}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){vocab}<LEND>[argument 1; call](){}<LSEP>[](symbol){prune_vocabulary}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){0.500000}<LSEP>[argument 2; litteral](real){0.010000}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){vocab}<LEND>[assign](){<-}<LSEP>[](symbol){createWordCloud}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){vocab}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){vocab}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){term_count}<LEND>[argument 1; call](){}<LSEP>[](symbol){head}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){with}<LEND>[argument 0; call](){}<LSEP>[](symbol){wordcloud}<LSEP>[](symbol){term}<LSEP>[](symbol){term_count}<LSEP>[argument 2; litteral](real){30.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){brewer.pal}<LSEP>[argument 0; litteral](real){8.000000}<LSEP>[argument 1; litteral](str){Dark2}<LEND>[assign](){<-}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){create_vocab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){id}<LEND>[call](){}<LSEP>[](symbol){createWordCloud}<LSEP>[](symbol){vocab}<LEND>[assign](){<-}<LSEP>[](symbol){plotPositiveWords}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){vocab}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){vocab}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LEND>[argument 0; call](){}<LSEP>[](symbol){get_sentiments}<LSEP>[argument 0; litteral](str){afinn}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){word}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){term}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarize}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){score}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){contribution}<LEND>[argument 1; call](){}<LSEP>[](symbol){head}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){term}<LSEP>[](symbol){contribution}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){word}<LSEP>[](symbol){contribution}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_col}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[](symbol){fillColor}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[call](){}<LSEP>[](symbol){plotPositiveWords}<LSEP>[](symbol){vocab}<LEND>[assign](){<-}<LSEP>[](symbol){plotNegativeWords}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){vocab}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){vocab}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LEND>[argument 0; call](){}<LSEP>[](symbol){get_sentiments}<LSEP>[argument 0; litteral](str){afinn}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){word}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){term}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarize}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){score}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){contribution}<LEND>[argument 1; call](){}<LSEP>[](symbol){tail}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){term}<LSEP>[](symbol){contribution}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){word}<LSEP>[](symbol){contribution}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_col}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[](symbol){fillColor2}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[call](){}<LSEP>[](symbol){plotNegativeWords}<LSEP>[](symbol){vocab}<LEND>[assign](){<-}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){create_vocab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_2}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){id}<LEND>[call](){}<LSEP>[](symbol){createWordCloud}<LSEP>[](symbol){vocab}<LEND>[assign](){<-}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){create_vocab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_3}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){id}<LEND>[call](){}<LSEP>[](symbol){createWordCloud}<LSEP>[](symbol){vocab}<LEND>[assign](){<-}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){create_vocab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_4}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){id}<LEND>[call](){}<LSEP>[](symbol){createWordCloud}<LSEP>[](symbol){vocab}<LEND>[assign](){<-}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){create_vocab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_title}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){id}<LEND>[call](){}<LSEP>[](symbol){createWordCloud}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){plotPositiveWords}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){plotNegativeWords}<LSEP>[](symbol){vocab}<LEND>[assign](){<-}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){create_vocab}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_resource_summary}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){id}<LEND>[call](){}<LSEP>[](symbol){createWordCloud}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){plotPositiveWords}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){plotNegativeWords}<LSEP>[](symbol){vocab}<LEND>[assign](){=}<LSEP>[](symbol){resources}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){quantity}<LSEP>[](symbol){price}<LEND>[assign](){=}<LSEP>[](symbol){resources2}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){dplyr}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){TotalAmount}<LEND>[assign](){=}<LSEP>[](symbol){resources_quantity}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){dplyr}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){quantity}<LEND>[assign](){=}<LSEP>[](symbol){resources_median_amount}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){dplyr}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){median}<LSEP>[](symbol){TotalAmount}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){TotalAmount}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_log10}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){scales}<LSEP>[](symbol){trans_breaks}<LEND>[argument 0; litteral](str){log10}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){scales}<LSEP>[](symbol){trans_format}<LEND>[argument 0; litteral](str){log10}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){scales}<LSEP>[](symbol){math_format}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_y_log10}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){scales}<LSEP>[](symbol){trans_breaks}<LEND>[argument 0; litteral](str){log10}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){scales}<LSEP>[](symbol){trans_format}<LEND>[argument 0; litteral](str){log10}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){scales}<LSEP>[](symbol){math_format}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LSEP>[](symbol){fillColor2}<LSEP>[argument 1; litteral](real){50.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Project Amount}<LSEP>[argument 1; litteral](str){Count}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Distribution of}<LSEP>[argument 1; litteral](str){Project Amount}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){resources}<LSEP>[](symbol){TotalAmount}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){left_join}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources2}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){TotalAmountPerID}<LSEP>[](symbol){id}<LEND>[argument 2; litteral](str){id}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){left_join}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources_quantity}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){TotalQty}<LSEP>[](symbol){id}<LEND>[argument 2; litteral](str){id}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){left_join}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources_median_amount}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){MedianAmount}<LSEP>[](symbol){id}<LEND>[argument 2; litteral](str){id}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){left_join}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources2}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){TotalAmountPerID}<LSEP>[](symbol){id}<LEND>[argument 2; litteral](str){id}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){left_join}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources_quantity}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){TotalQty}<LSEP>[](symbol){id}<LEND>[argument 2; litteral](str){id}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){left_join}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){resources_median_amount}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){MedianAmount}<LSEP>[](symbol){id}<LEND>[argument 2; litteral](str){id}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_1_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_1}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_2_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_2}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_3_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_3}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_4_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_4}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_title}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_title}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_resource_summary_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_resource_summary}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_1_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_1}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_2_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_2}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_3_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_3}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_4_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_4}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_title}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_title}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_resource_summary_count}<LEND>[call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_resource_summary}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_1_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_1}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_2_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_2}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_3_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_3}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_4_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_essay_4}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_title_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_title}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_resource_summary_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_resource_summary}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_1_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_1}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_2_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_2}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_3_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_3}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_4_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_essay_4}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_title_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_title}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_resource_summary_len}<LEND>[call](){}<LSEP>[](symbol){str_length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_resource_summary}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_submitted_month}<LEND>[call](){}<LSEP>[](symbol){month}<LEND>[argument 0; call](){}<LSEP>[](symbol){ymd_hms}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_submitted_datetime}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_submitted_month}<LEND>[call](){}<LSEP>[](symbol){month}<LEND>[argument 0; call](){}<LSEP>[](symbol){ymd_hms}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_submitted_datetime}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_submitted_day}<LEND>[call](){}<LSEP>[](symbol){day}<LEND>[argument 0; call](){}<LSEP>[](symbol){ymd_hms}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){project_submitted_datetime}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_submitted_day}<LEND>[call](){}<LSEP>[](symbol){day}<LEND>[argument 0; call](){}<LSEP>[](symbol){ymd_hms}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){project_submitted_datetime}<LEND>[assign](){=}<LSEP>[](symbol){train2}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_essay_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_essay_2}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_essay_3}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_essay_4}<LEND>[argument 4; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_resource_summary}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){id}<LEND>[argument 6; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){teacher_id}<LEND>[argument 7; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_submitted_datetime}<LEND>[assign](){=}<LSEP>[](symbol){test2}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_essay_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_essay_2}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_essay_3}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_essay_4}<LEND>[argument 4; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_resource_summary}<LEND>[argument 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){id}<LEND>[argument 6; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){teacher_id}<LEND>[argument 7; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){project_submitted_datetime}<LEND>[call](){}<LSEP>[](symbol){datatable}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.tibble}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){train2}<LEND>[argument 1; litteral](str){bootstrap}<LSEP>[argument 2; litteral](str){table-condensed}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){tp}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){features}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){train2}<LEND>[control flow](){for}<LSEP>[](symbol){f}<LSEP>[](symbol){features}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){train2}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){factor}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){train2}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){character}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){train2}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){train2}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){train2}<LSEP>[](symbol){f}<LEND>[](symbol){levels}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train2}<LSEP>[](symbol){project_is_approved}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train2}<LSEP>[](symbol){project_is_approved}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train2}<LSEP>[](symbol){project_is_approved}<LEND>[call](){}<LSEP>[](symbol){make.names}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train2}<LSEP>[](symbol){project_is_approved}<LEND>[assign](){<-}<LSEP>[](symbol){features}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){test2}<LEND>[control flow](){for}<LSEP>[](symbol){f}<LSEP>[](symbol){features}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){||}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){test2}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){factor}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){test2}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){character}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){test2}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){test2}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){test2}<LSEP>[](symbol){f}<LEND>[](symbol){levels}<LEND>[assign](){=}<LSEP>[](symbol){formula}<LEND>[call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){project_is_approved}<LSEP>[](symbol){.}<LEND>[assign](){<-}<LSEP>[](symbol){fitControl}<LEND>[call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){cv}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){xgbGrid}<LEND>[call](){}<LSEP>[](symbol){expand.grid}<LSEP>[argument 0; litteral](real){100.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){0.050000}<LSEP>[argument 3; litteral](real){0.000000}<LSEP>[argument 4; litteral](real){0.800000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){13.000000}<LEND>[assign](){=}<LSEP>[](symbol){ProjectXGB}<LEND>[call](){}<LSEP>[](symbol){train}<LSEP>[](symbol){formula}<LSEP>[](symbol){train2}<LSEP>[argument 2; litteral](str){xgbTree}<LSEP>[](symbol){fitControl}<LSEP>[](symbol){xgbGrid}<LSEP>[](symbol){na.pass}<LEND>[](symbol){ProjectXGB}<LEND>[assign](){=}<LSEP>[](symbol){importance}<LEND>[call](){}<LSEP>[](symbol){varImp}<LSEP>[](symbol){ProjectXGB}<LEND>[assign](){<-}<LSEP>[](symbol){varImportance}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){row.names}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){importance}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){importance}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){Overall}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rankImportance}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){varImportance}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){#}<LEND>[argument 1; call](){}<LSEP>[](symbol){dense_rank}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){head}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[assign](){=}<LSEP>[](symbol){rankImportancefull}<LSEP>[](symbol){rankImportance}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){rankImportance}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){Variables}<LSEP>[](symbol){Importance}<LEND>[](symbol){Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LSEP>[argument 1; litteral](str){white}<LSEP>[](symbol){fillColor}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Variables}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){Rank}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](str){black}<LSEP>[argument 5; litteral](str){bold}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Variables}<LSEP>[argument 1; litteral](str){Relative Variable Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_bw}<LEND>[assign](){=}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){ProjectXGB}<LSEP>[](symbol){test2}<LSEP>[argument 2; litteral](str){prob}<LSEP>[](symbol){na.pass}<LEND>[assign](){<-}<LSEP>[](symbol){solution}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){predictions}<LSEP>[](symbol){X1}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){solution}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){solution}<LSEP>[argument 1; litteral](str){XGBMarch32018.csv}<LSEP>[](symbol){F}<LEND>[assign](){=}<LSEP>[](symbol){solution2}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){predictions}<LSEP>[](symbol){X1}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train2}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_1}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_1}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_1}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_1}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_2}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_2}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_2}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_2}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_3}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_3}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_3}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_3}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_4}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_4}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_4}<LEND>[call](){}<LSEP>[](symbol){iconv}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_4}<LEND>[argument 1; litteral](str){UTF-8}<LSEP>[argument 2; litteral](str){ASCII}<LEND>[assign](){=}<LSEP>[](symbol){combined_train_text}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_2}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_3}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_essay_4}<LEND>[assign](){=}<LSEP>[](symbol){combined_test_text}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_2}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_3}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){project_essay_4}<LEND>[assign](){=}<LSEP>[](symbol){prep_fun}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stringr}<LSEP>[](symbol){str_replace_all}<LEND>[argument 0; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](str){[^[:graph:]]}<LSEP>[argument 2; litteral](str){ }<LEND>[assign](){<-}<LSEP>[](symbol){myTokeniser}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){str}<LEND>[body; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){str}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){stringr}<LSEP>[](symbol){str_replace_all}<LEND>[argument 0; litteral](str){[']|[\xE2\x80\x99]}<LSEP>[argument 1; litteral](str){ }<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){tokenizers}<LSEP>[](symbol){tokenize_words}<LEND>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){tokenizers}<LSEP>[](symbol){stopwords}<LEND>[argument 0; litteral](str){en}<LEND>[assign](){=}<LSEP>[](symbol){tok_fun}<LSEP>[](symbol){myTokeniser}<LEND>[assign](){=}<LSEP>[](symbol){it_train}<LEND>[call](){}<LSEP>[](symbol){itoken}<LSEP>[](symbol){combined_train_text}<LSEP>[](symbol){prep_fun}<LSEP>[](symbol){tok_fun}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){id}<LEND>[argument 4; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){it_test}<LEND>[call](){}<LSEP>[](symbol){itoken}<LSEP>[](symbol){combined_test_text}<LSEP>[](symbol){prep_fun}<LSEP>[](symbol){tok_fun}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){id}<LEND>[argument 4; litteral](logical){FALSE}<LEND>[assign](){=}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){create_vocabulary}<LSEP>[](symbol){it_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](integer){1}<LSEP>[argument 1; litteral](integer){3}<LEND>[argument 2; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){tokenizers}<LSEP>[](symbol){stopwords}<LEND>[argument 0; litteral](str){en}<LEND>[assign](){=}<LSEP>[](symbol){vocab}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){vocab}<LEND>[argument 1; call](){}<LSEP>[](symbol){prune_vocabulary}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){0.500000}<LSEP>[argument 2; litteral](real){0.010000}<LSEP>[argument 3; litteral](real){5000.000000}<LEND>[assign](){=}<LSEP>[](symbol){vectorizer}<LEND>[call](){}<LSEP>[](symbol){vocab_vectorizer}<LSEP>[](symbol){vocab}<LEND>[assign](){=}<LSEP>[](symbol){dtm_train}<LEND>[call](){}<LSEP>[](symbol){create_dtm}<LSEP>[](symbol){it_train}<LSEP>[](symbol){vectorizer}<LEND>[assign](){=}<LSEP>[](symbol){dtm_test}<LEND>[call](){}<LSEP>[](symbol){create_dtm}<LSEP>[](symbol){it_test}<LSEP>[](symbol){vectorizer}<LEND>[assign](){=}<LSEP>[](symbol){tfidf}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){TfIdf}<LSEP>[](symbol){new}<LEND>[assign](){=}<LSEP>[](symbol){dtm_train_tfidf}<LEND>[call](){}<LSEP>[](symbol){fit_transform}<LSEP>[](symbol){dtm_train}<LSEP>[](symbol){tfidf}<LEND>[assign](){=}<LSEP>[](symbol){dtm_test_tfidf}<LEND>[call](){}<LSEP>[](symbol){create_dtm}<LSEP>[](symbol){it_test}<LSEP>[](symbol){vectorizer}<LEND>[assign](){=}<LSEP>[](symbol){dtm_test_tfidf}<LEND>[call](){}<LSEP>[](symbol){transform}<LSEP>[](symbol){dtm_test_tfidf}<LSEP>[](symbol){tfidf}<LEND>[assign](){=}<LSEP>[](symbol){colnamesSame}<LEND>[call](){}<LSEP>[](symbol){intersect}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){dtm_train_tfidf}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){dtm_test_tfidf}<LEND>[assign](){=}<LSEP>[](symbol){dtm_train_tfidf}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dtm_train_tfidf}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){dtm_train_tfidf}<LEND>[](symbol){colnamesSame}<LEND>[assign](){=}<LSEP>[](symbol){dtm_test_tfidf}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dtm_test_tfidf}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){dtm_test_tfidf}<LEND>[](symbol){colnamesSame}<LEND>[assign](){=}<LSEP>[](symbol){NFOLDS}<LSEP>[litteral](real){3.000000}<LEND>[assign](){=}<LSEP>[](symbol){glmnet_classifier}<LEND>[call](){}<LSEP>[](symbol){cv.glmnet}<LSEP>[](symbol){dtm_train_tfidf}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train3}<LSEP>[](symbol){project_is_approved}<LEND>[argument 2; litteral](str){binomial}<LSEP>[argument 3; litteral](real){1.000000}<LSEP>[argument 4; litteral](str){auc}<LSEP>[](symbol){NFOLDS}<LSEP>[argument 6; litteral](real){0.001000}<LSEP>[argument 7; litteral](real){10000.000000}<LEND>[assign](){=}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){glmnet_classifier}<LSEP>[](symbol){dtm_test_tfidf}<LSEP>[argument 2; litteral](str){response}<LEND>[assign](){=}<LSEP>[](symbol){predictions}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){predictions}<LEND>[assign](){<-}<LSEP>[](symbol){solution_glm}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){predictions}<LSEP>[](symbol){1}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){solution_glm}<LSEP>[argument 1; litteral](str){GLMNetMarch62018.csv}<LSEP>[](symbol){F}<LEND>[assign](){=}<LSEP>[](symbol){solution_combined}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){solution2}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){solution_glm}<LSEP>[](symbol){project_is_approved}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){solution_glm_xgb}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test3}<LSEP>[](symbol){id}<LEND>[](symbol){solution_combined}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){solution_glm_xgb}<LSEP>[argument 1; litteral](str){XGB_GLMNet_March62018.csv}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){FeatureHashing}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){plyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){pROC}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Matrix}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){train_length}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){train_length}<LEND>[assign](){<-}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/people.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){group unique}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[argument 1; litteral](real){5.000000}<LEND>[litteral](str){group small}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){group_1}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LEND>[assign](){<-}<LSEP>[](symbol){temp_x}<LEND>[call](){}<LSEP>[](symbol){ddply}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LEND>[](symbol){summarize}<LEND>[argument 3; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){outcome}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){temp_x}<LSEP>[argument 2; litteral](str){group_1}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){outcome}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){test_activity_id}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){activity_id}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){temp_x}<LSEP>[argument 2; litteral](str){group_1}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){outcome_avg}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){outcome_avg}<LEND>[call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){outcome}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){temp_x}<LEND>[assign](){<-}<LSEP>[](symbol){train1}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){t1}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train1}<LSEP>[](symbol){people_id}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){t1}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){people_id}<LSEP>[argument 1; litteral](str){people_freq}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){t1}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){people_id}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){t1}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){people_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){t1}<LEND>[assign](){<-}<LSEP>[](symbol){train1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train1}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train1}<LSEP>[](symbol){date.x}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){train1}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train1}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){row_number}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){train1}<LEND>[assign](){<-}<LSEP>[](symbol){train1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_id}<LSEP>[argument 1; litteral](str){SEQ_people}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){train1}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){train1}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_id}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){train1}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_id}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train1}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){people}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){ratio_activity}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){SEQ_people}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){people_freq}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){month.x}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date.x}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[argument 1; litteral](str){%m}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){weekdays.x}<LEND>[call](){}<LSEP>[](symbol){weekdays}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date.x}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){year.x}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){format}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date.x}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[argument 1; litteral](str){%Y}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){weekdays.x}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){weekdays.x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){difftime}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date.x}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date.y}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){mod_activity}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){_.*}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.character}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){activity_id}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){mod_activity}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){mod_activity}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){index}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){train_length}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.750000}<LSEP>[](symbol){train_length}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){char_38}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){char_38}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){before sparse matrix creation}<LEND>[assign](){<-}<LSEP>[](symbol){tlabels}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){outcome}<LEND>[](symbol){index}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){people_id}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){activity_id}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date.x}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){date.y}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){outcome}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){index}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){train_length}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){m1}<LEND>[call](){}<LSEP>[](symbol){sparse.model.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LEND>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){after sparse matrix creation}<LEND>[call](){}<LSEP>[](symbol){table}<LSEP>[](symbol){tlabels}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){length(index) and tlabels}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){index}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){tlabels}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){m1}<LEND>[assign](){<-}<LSEP>[](symbol){index}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){index}<LEND>[assign](){=}<LSEP>[](symbol){xgbtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){m1}<LSEP>[](symbol){index}<LSEP>[](symbol){}<LEND>[](symbol){tlabels}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){dim(xgbtrain)}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){xgbtrain}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){yy}<LEND>[assign](){<-}<LSEP>[](symbol){xgbtest}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){m1}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){index}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){xx}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){m1}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){tlabels}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){binary:logistic}<LSEP>[argument 1; litteral](str){auc}<LSEP>[argument 2; litteral](str){gbtree}<LSEP>[argument 3; litteral](real){0.300000}<LSEP>[argument 4; litteral](real){0.700000}<LSEP>[argument 5; litteral](real){0.700000}<LSEP>[argument 6; litteral](real){0.000000}<LSEP>[argument 7; litteral](real){10.000000}<LEND>[assign](){<-}<LSEP>[](symbol){xgbmodel}<LEND>[call](){}<LSEP>[](symbol){xgb.train}<LSEP>[](symbol){xgbtrain}<LSEP>[](symbol){param}<LSEP>[argument 2; litteral](real){260.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){xgbtrain}<LEND>[argument 4; litteral](real){21.000000}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){xgbtrain}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){m1, xgbtrain deleted}<LEND>[assign](){<-}<LSEP>[](symbol){xgbpred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgbmodel}<LSEP>[](symbol){xgbtest}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){xgbtest}<LEND>[assign](){<-}<LSEP>[](symbol){finalfile}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){test_activity_id}<LSEP>[](symbol){xgbpred}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){finalfile}<LSEP>[argument 1; litteral](str){finalfile.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Doing Loiso's magic leak\n}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Working on people\n}<LEND>[assign](){<-}<LSEP>[](symbol){ppl}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/people.csv}<LEND>[assign](){<-}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){ppl}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){ppl}<LSEP>[](symbol){is.logical}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LSEP>[](symbol){p_logi}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){ppl}<LSEP>[](symbol){col}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){ppl}<LSEP>[](symbol){col}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ppl}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){date}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){date}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Working on data\n}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){TestActivs}<LSEP>[](symbol){outcome}<LEND>[litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){activs}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){TestActivs}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Merging\n}<LEND>[assign](){<-}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){activs}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){people_id}<LSEP>[argument 1; litteral](str){outcome}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[argument 3; litteral](str){date}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){activs}<LSEP>[](symbol){ppl}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){testset}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){activdate}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.Date}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.character}<LSEP>[](symbol){date.x}<LEND>[argument 1; litteral](str){%Y-%m-%d}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){activs}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Creating interaction\n}<LEND>[assign](){<-}<LSEP>[](symbol){minactivdate}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){maxactivdate}<LEND>[call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){alldays}<LEND>[call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){minactivdate}<LSEP>[](symbol){maxactivdate}<LSEP>[argument 2; litteral](str){day}<LEND>[assign](){<-}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[](symbol){alldays}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[call](){}<LSEP>[](symbol){setkey}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[argument 1; litteral](str){group_1}<LSEP>[argument 2; litteral](str){date.p}<LEND>[assign](){<-}<LSEP>[](symbol){meanbycomdate}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[argument 2; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){outcome}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[assign](){<-}<LSEP>[](symbol){allCompaniesAndDays}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){meanbycomdate}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){interpolateFun}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){borders}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[argument 2; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){forward_border}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){borders}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){borders}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){backward_border}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){borders}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){borders}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){forward_border_x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){forward_border}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_border_x}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){backward_border_x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LSEP>[](symbol){backward_border}<LEND>[statement 6; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){backward_border_x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){forward_border_x}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){0.100000}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){forward_x_fill}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){forward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 8; assign](){<-}<LSEP>[](symbol){backward_x_fill}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){backward_border_x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){forward_x_fill_2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){forward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_x_fill}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){backward_x_fill_2}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){forward_x_fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){backward_border}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){forward_border}<LSEP>[](symbol){backward_border}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){vec}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){forward_x_fill}<LSEP>[](symbol){backward_x_fill}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 12; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){vec}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[statement 13; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Applying interaction interpola...}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){filled}<LEND>[argument 1; call](){}<LSEP>[](symbol){interpolateFun}<LSEP>[](symbol){V1}<LEND>[argument 3; litteral](str){group_1}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){d1}<LSEP>[](symbol){allCompaniesAndDays}<LSEP>[](symbol){T}<LSEP>[](symbol){F}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){activdate}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){group_1}<LSEP>[argument 1; litteral](str){date.p}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predicting leak\n}<LEND>[assign](){<-}<LSEP>[](symbol){testsetdt}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){d1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ppl}<LSEP>[](symbol){people_id}<LEND>[](symbol){testset}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_id}<LSEP>[argument 1; litteral](str){filled}<LEND>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){testsetdt}<LSEP>[argument 1; litteral](str){Submission.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Cleaning up...\n}<LEND>[call](){}<LSEP>[](symbol){remove}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LEND>[call](){}<LSEP>[](symbol){gc}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){Sys.time}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Combining two submissions on t...}<LEND>[assign](){<-}<LSEP>[](symbol){submit1}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){Submission.csv}<LEND>[assign](){<-}<LSEP>[](symbol){submit2}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){finalfile.csv}<LEND>[assign](){<-}<LSEP>[](symbol){submit3}<LEND>[call](){}<LSEP>[](symbol){merge}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){submit1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit1}<LSEP>[](symbol){filled}<LEND>[](symbol){}<LEND>[](symbol){submit2}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){submit4}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){submit1}<LSEP>[](symbol){submit3}<LSEP>[argument 2; litteral](str){activity_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){outcome}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[assign](){<-}<LSEP>[](symbol){submit5}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){activity_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submit4}<LSEP>[](symbol){filled.x}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submit5}<LSEP>[argument 1; litteral](str){submit_6.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){xgbpred}<LSEP>[argument 1; litteral](str){xgbpred.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){outcome}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){index}<LEND>[argument 1; litteral](str){outcome.csv}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){auc}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){outcome}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){index}<LEND>[](symbol){xgbpred} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[assign](){=}<LSEP>[](symbol){device}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/phone_brand_device_mo...}<LEND>[assign](){=}<LSEP>[](symbol){events}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/events.csv}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){events} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggmap}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){map}<LEND>[call](){}<LSEP>[](symbol){readRDS}<LSEP>[argument 0; litteral](str){../input/sf_map_copyright_open...}<LEND>[assign](){<-}<LSEP>[](symbol){map_crime}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){crime_df}<LSEP>[](symbol){crime}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){filtered}<LEND>[call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){crime_df}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){Category}<LSEP>[](symbol){crime}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){plot}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[](symbol){filtered}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){Category}<LEND>[argument 2; litteral](real){0.600000}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){plot}<LEND>[call](){}<LSEP>[](symbol){map_crime}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){SUICIDE}<LSEP>[argument 1; litteral](str){ARSON} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[assign](){<-}<LSEP>[](symbol){Allstatetraindata}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){Allstatetestdata}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LSEP>[](symbol){Allstatetraindata}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LSEP>[](symbol){Allstatetestdata}<LEND>[call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){Matrix}<LEND>[call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){data.table}<LEND>[assign](){<-}<LSEP>[](symbol){trainfact}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){110.000000}<LSEP>[argument 1; litteral](real){111.000000}<LSEP>[argument 2; litteral](real){113.000000}<LSEP>[argument 3; litteral](real){114.000000}<LSEP>[argument 4; litteral](real){117.000000}<LEND>[assign](){<-}<LSEP>[](symbol){testfact}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){110.000000}<LSEP>[argument 1; litteral](real){111.000000}<LSEP>[argument 2; litteral](real){113.000000}<LSEP>[argument 3; litteral](real){114.000000}<LSEP>[argument 4; litteral](real){117.000000}<LEND>[assign](){<-}<LSEP>[](symbol){testfact}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){testfact}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){=}<LSEP>[](symbol){train_sparse_matrix}<LEND>[call](){}<LSEP>[](symbol){sparse.model.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){loss}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){.}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){trainfact}<LEND>[assign](){=}<LSEP>[](symbol){test_sparse_matrix}<LEND>[call](){}<LSEP>[](symbol){sparse.model.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){loss}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){.}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){testfact}<LEND>[assign](){=}<LSEP>[](symbol){train_output_vector}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){trainfact}<LSEP>[](symbol){loss}<LEND>[assign](){<-}<LSEP>[](symbol){trainbst}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LSEP>[](symbol){train_sparse_matrix}<LSEP>[](symbol){train_output_vector}<LSEP>[argument 2; litteral](real){17.000000}<LSEP>[argument 3; litteral](str){reg:linear}<LEND>[assign](){=}<LSEP>[](symbol){trainpreds}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){trainbst}<LSEP>[](symbol){test_sparse_matrix}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testfact}<LSEP>[](symbol){loss}<LEND>[](symbol){trainpreds}<LEND>[assign](){<-}<LSEP>[](symbol){solution}<LSEP>[](symbol){testfact}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){solution}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){126.000000}<LEND>[litteral](NULL){NULL}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){solution}<LSEP>[argument 1; litteral](str){Kumar_Anand_Allstate_Solution_...}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ranger}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){8451.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rfo}<LEND>[call](){}<LSEP>[](symbol){ranger}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){y}<LSEP>[](symbol){.}<LEND>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){rfo}<LEND>[assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rfo}<LSEP>[](symbol){test}<LEND>[](symbol){predictions}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq_len}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){submission} |
[](){expression}<LSEP>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){knitr}<LSEP>[](symbol){opts_chunk}<LEND>[](symbol){set}<LEND>[argument 0; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){plyr}<LEND>[assign](){<-}<LSEP>[](symbol){teams}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/datafiles/Teams.csv}<LEND>[assign](){<-}<LSEP>[](symbol){seasons}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/datafiles/Seasons.csv}<LEND>[assign](){<-}<LSEP>[](symbol){rsdr}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/datafiles/RegularSeas...}<LEND>[assign](){<-}<LSEP>[](symbol){tdr}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/datafiles/NCAATourney...}<LEND>[assign](){<-}<LSEP>[](symbol){multiplot}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){...}<LSEP>[](symbol){plotlist}<LSEP>[](symbol){file}<LSEP>[](symbol){cols}<LSEP>[](symbol){layout}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){grid}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){plots}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){...}<LEND>[](symbol){plotlist}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){numPlots}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){plots}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){layout}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){layout}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){cols}<LEND>[argument 1; call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){numPlots}<LSEP>[](symbol){cols}<LEND>[](symbol){cols}<LEND>[argument 2; call](){}<LSEP>[](symbol){ceiling}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){numPlots}<LSEP>[](symbol){cols}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){numPlots}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){plots}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){grid.newpage}<LEND>[statement 1; call](){}<LSEP>[](symbol){pushViewport}<LEND>[argument 0; call](){}<LSEP>[](symbol){viewport}<LEND>[argument 0; call](){}<LSEP>[](symbol){grid.layout}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){layout}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){layout}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){numPlots}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){matchidx}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){layout}<LSEP>[](symbol){i}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 1; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){plots}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){viewport}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){row}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){matchidx}<LSEP>[](symbol){col}<LEND>[assign](){<-}<LSEP>[](symbol){rs_loc_freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WLoc}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rs_loc_freq}<LSEP>[argument 1; litteral](str){percentage}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_loc_freq}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_loc_freq}<LSEP>[](symbol){freq}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rs_loc_freq}<LSEP>[argument 1; litteral](str){percentage_r}<LEND>[call](){}<LSEP>[](symbol){signif}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_loc_freq}<LSEP>[](symbol){percentage}<LEND>[argument 1; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rs_loc_freq}<LSEP>[argument 1; litteral](str){pos}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){cumsum}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_loc_freq}<LSEP>[](symbol){percentage}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_loc_freq}<LSEP>[](symbol){percentage}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_loc_freq}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_loc_freq}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_loc_freq}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){blank_theme}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){theme_minimal}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 2; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 3; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 4; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 5; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 6; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){14.000000}<LSEP>[argument 1; litteral](str){bold}<LSEP>[argument 2; litteral](real){0.500000}<LEND>[assign](){<-}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){rs_loc_freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[argument 0; litteral](str){}<LSEP>[](symbol){percentage_r}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LEND>[](symbol){blank_theme}<LEND>[assign](){<-}<LSEP>[](symbol){pie}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_polar}<LSEP>[argument 0; litteral](str){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Season: Percentage of games wo...}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_brewer}<LSEP>[argument 0; litteral](str){Blues}<LEND>[argument 1; call](){}<LSEP>[](symbol){guides}<LEND>[argument 0; call](){}<LSEP>[](symbol){guide_legend}<LSEP>[argument 0; litteral](str){Location}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){pos}<LSEP>[](symbol){percentage_r}<LEND>[argument 1; litteral](real){4.000000}<LEND>[](symbol){pie}<LEND>[assign](){<-}<LSEP>[](symbol){rs_ot_freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){NumOT}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_ot_freq}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_ot_freq}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){blank_theme2}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){theme_bw}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 2; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){12.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 5; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){13.000000}<LSEP>[argument 1; litteral](str){bold}<LSEP>[argument 2; litteral](real){0.500000}<LEND>[argument 6; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){13.000000}<LEND>[argument 7; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){13.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){rs_ot_freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){x}<LSEP>[](symbol){freq}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Season: Number of Overtime Per...}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Overtime Periods}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){freq}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){0.300000}<LEND>[argument 2; litteral](real){3.500000}<LEND>[assign](){<-}<LSEP>[](symbol){rs_team_Wfreq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WTeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_team_Wfreq}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_team_Wfreq}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){rs_team_Lfreq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LTeam}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_team_Lfreq}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rs_team_Lfreq}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){rs_team_Wfreq}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){rs_team_Lfreq}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[](symbol){rs_team_Wfreq}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){rs_team_Wfreq}<LSEP>[](symbol){teams}<LSEP>[argument 2; litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[](symbol){win_frequency}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){rs_team_Wfreq}<LSEP>[](symbol){rs_team_Lfreq}<LSEP>[argument 2; litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){win_frequency}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){Win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){win_frequency}<LEND>[argument 1; litteral](real){4.000000}<LEND>[litteral](str){Loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){win_frequency}<LSEP>[argument 1; litteral](str){Percentage}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){Win}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){Loss}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){Win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){TeamID}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){Team_Id}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){TeamID}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){Team_Id}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){Percentage}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){win_frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){TeamID}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){Percentage}<LEND>[](symbol){Percentage}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Season: Percentage of games won}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_blank}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Teams}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){What are the top 30 teams? }<LEND>[assign](){<-}<LSEP>[](symbol){top_30_teams}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){win_frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){Percentage}<LEND>[](symbol){}<LEND>[argument 1; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[](symbol){top_30_teams}<LEND>[call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){top_30_teams}<LSEP>[](symbol){TeamName}<LSEP>[](symbol){Percentage}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){top_30_teams}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){What are the worst 30 teams? }<LEND>[assign](){<-}<LSEP>[](symbol){worst_30_teams}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){win_frequency}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){win_frequency}<LSEP>[](symbol){Percentage}<LEND>[](symbol){}<LEND>[argument 1; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[](symbol){worst_30_teams}<LEND>[call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){worst_30_teams}<LSEP>[](symbol){TeamName}<LSEP>[](symbol){Percentage}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){worst_30_teams}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Wscores}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WTeam}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Wscores}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Wscores}<LSEP>[argument 1; litteral](str){Score}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WScore}<LEND>[assign](){<-}<LSEP>[](symbol){Lscores}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LTeam}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Lscores}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Lscores}<LSEP>[argument 1; litteral](str){Score}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LScore}<LEND>[assign](){<-}<LSEP>[](symbol){AllScores}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){Wscores}<LSEP>[](symbol){Lscores}<LEND>[assign](){<-}<LSEP>[](symbol){Agg_Scores}<LEND>[call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Score}<LSEP>[](symbol){TeamID}<LEND>[](symbol){AllScores}<LSEP>[argument 2; litteral](str){mean}<LEND>[assign](){<-}<LSEP>[](symbol){Agg_Scores}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){teams}<LSEP>[argument 2; litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){TeamID}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){TeamID}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){TeamID}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){TeamID}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){Score}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){Agg_Scores}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){TeamID}<LSEP>[](symbol){Score}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){100.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Season: Average Points Scored ...}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Teams}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Average Points Scored}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_blank}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){What are the top 30 teams? }<LEND>[assign](){<-}<LSEP>[](symbol){top_socring_30}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Agg_Scores}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){Score}<LEND>[](symbol){}<LEND>[argument 1; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[](symbol){top_socring_30}<LEND>[call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){top_socring_30}<LSEP>[](symbol){TeamName}<LSEP>[](symbol){Score}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){top_socring_30}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){What are the worst 30 teams? }<LEND>[assign](){<-}<LSEP>[](symbol){least_scoring_30}<LEND>[call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Agg_Scores}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Agg_Scores}<LSEP>[](symbol){Score}<LEND>[](symbol){}<LEND>[argument 1; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[](symbol){least_scoring_30}<LEND>[call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){least_scoring_30}<LSEP>[](symbol){TeamName}<LSEP>[](symbol){Score}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){least_scoring_30}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[](symbol){Wscores2}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WTeam}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Wscores2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Wscores2}<LSEP>[argument 1; litteral](str){Score}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WScore}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Wscores2}<LSEP>[argument 1; litteral](str){Result}<LEND>[litteral](str){Win}<LEND>[assign](){<-}<LSEP>[](symbol){Lscores2}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LTeam}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Lscores2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){TeamID}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Lscores2}<LSEP>[argument 1; litteral](str){Score}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LScore}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Lscores2}<LSEP>[argument 1; litteral](str){Result}<LEND>[litteral](str){Loss}<LEND>[assign](){<-}<LSEP>[](symbol){AllScores2}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){Wscores2}<LSEP>[](symbol){Lscores2}<LEND>[assign](){<-}<LSEP>[](symbol){winMean}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){AllScores2}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Result}<LSEP>[argument 1; litteral](str){Win}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){Score}<LEND>[assign](){<-}<LSEP>[](symbol){lossMean}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){AllScores2}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Result}<LSEP>[argument 1; litteral](str){Loss}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){Score}<LEND>[assign](){<-}<LSEP>[](symbol){AllScoresMean}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){winMean}<LSEP>[](symbol){lossMean}<LEND>[assign](){<-}<LSEP>[](symbol){AllScoresMean}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){AllScoresMean}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Win}<LSEP>[argument 1; litteral](str){Loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){AllScoresMean}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Average}<LSEP>[argument 1; litteral](str){Result}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){AllScores2}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Score}<LSEP>[](symbol){Result}<LSEP>[](symbol){Result}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){150.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ggtitle}<LSEP>[argument 0; litteral](str){Season: Game Result Relative t...}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LSEP>[argument 0; litteral](real){0.500000}<LSEP>[argument 1; litteral](real){0.500000}<LSEP>[argument 2; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_vline}<LSEP>[](symbol){AllScoresMean}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Average}<LSEP>[](symbol){Result}<LEND>[argument 2; litteral](str){dashed}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Points Scored in Game}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Result}<LEND>[assign](){<-}<LSEP>[](symbol){Wscores_freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Wscores}<LSEP>[](symbol){Score}<LEND>[assign](){<-}<LSEP>[](symbol){Lscores_freq}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Lscores}<LSEP>[](symbol){Score}<LEND>[assign](){<-}<LSEP>[](symbol){scores_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){Wscores_freq}<LSEP>[](symbol){Lscores_freq}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){scores_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){score}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){scores_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){scores_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[](symbol){probCalc}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){d}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d}<LSEP>[](symbol){win}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d}<LSEP>[](symbol){win}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d}<LSEP>[](symbol){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){scores_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){scores_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wfgm}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WFGM}<LEND>[assign](){<-}<LSEP>[](symbol){lfgm}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LFGM}<LEND>[assign](){<-}<LSEP>[](symbol){fgm_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wfgm}<LSEP>[](symbol){lfgm}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fgm_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.fgm}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fgm_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fgm_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fgm_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){fgm_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wfga}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WFGA}<LEND>[assign](){<-}<LSEP>[](symbol){lfga}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LFGA}<LEND>[assign](){<-}<LSEP>[](symbol){fga_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wfga}<LSEP>[](symbol){lfga}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fga_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.fga}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fga_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fga_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fga_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){fga_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wfgm3}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WFGM3}<LEND>[assign](){<-}<LSEP>[](symbol){lfgm3}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LFGM3}<LEND>[assign](){<-}<LSEP>[](symbol){fgm3_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wfgm3}<LSEP>[](symbol){lfgm3}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fgm3_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.fgm3}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fgm3_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fgm3_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fgm3_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){fgm3_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wfga3}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WFGA3}<LEND>[assign](){<-}<LSEP>[](symbol){lfga3}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LFGA3}<LEND>[assign](){<-}<LSEP>[](symbol){fga3_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wfga3}<LSEP>[](symbol){lfga3}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fga3_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.fga3}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fga3_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fga3_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fga3_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){fga3_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wftm}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WFTM}<LEND>[assign](){<-}<LSEP>[](symbol){lftm}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LFTM}<LEND>[assign](){<-}<LSEP>[](symbol){ftm_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wftm}<LSEP>[](symbol){lftm}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){ftm_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.ftm}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){ftm_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){ftm_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ftm_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){ftm_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wfta}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WFTA}<LEND>[assign](){<-}<LSEP>[](symbol){lfta}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LFTA}<LEND>[assign](){<-}<LSEP>[](symbol){fta_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wfta}<LSEP>[](symbol){lfta}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fta_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.fta}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fta_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){fta_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){fta_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){fta_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wor}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WOR}<LEND>[assign](){<-}<LSEP>[](symbol){lor}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LOR}<LEND>[assign](){<-}<LSEP>[](symbol){or_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wor}<LSEP>[](symbol){lor}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){or_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.or}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){or_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){or_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){or_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){or_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wdr}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WDR}<LEND>[assign](){<-}<LSEP>[](symbol){ldr}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LDR}<LEND>[assign](){<-}<LSEP>[](symbol){dr_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wdr}<LSEP>[](symbol){ldr}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){dr_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.dr}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){dr_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){dr_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dr_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){dr_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wast}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WAst}<LEND>[assign](){<-}<LSEP>[](symbol){last}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LAst}<LEND>[assign](){<-}<LSEP>[](symbol){ast_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wast}<LSEP>[](symbol){last}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){ast_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.ast}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){ast_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){ast_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ast_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){ast_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wto}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WTO}<LEND>[assign](){<-}<LSEP>[](symbol){lto}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LTO}<LEND>[assign](){<-}<LSEP>[](symbol){to_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wto}<LSEP>[](symbol){lto}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){to_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.to}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){to_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){to_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){to_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){to_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wstl}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WStl}<LEND>[assign](){<-}<LSEP>[](symbol){lstl}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LStl}<LEND>[assign](){<-}<LSEP>[](symbol){stl_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wstl}<LSEP>[](symbol){lstl}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){stl_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.stl}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){stl_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){stl_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){stl_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){stl_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wblk}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WBlk}<LEND>[assign](){<-}<LSEP>[](symbol){lblk}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LBlk}<LEND>[assign](){<-}<LSEP>[](symbol){blk_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wblk}<LSEP>[](symbol){lblk}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){blk_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.blk}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){blk_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){blk_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){blk_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){blk_prob}<LEND>[assign](){<-}<LSEP>[](symbol){wpf}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){WPF}<LEND>[assign](){<-}<LSEP>[](symbol){lpf}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rsdr}<LSEP>[](symbol){LPF}<LEND>[assign](){<-}<LSEP>[](symbol){pf_prob}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){wpf}<LSEP>[](symbol){lpf}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){x}<LEND>[argument 3; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){pf_prob}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){no.pf}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){pf_prob}<LEND>[argument 1; litteral](real){2.000000}<LEND>[litteral](str){win}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){pf_prob}<LEND>[argument 1; litteral](real){3.000000}<LEND>[litteral](str){loss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){pf_prob}<LSEP>[argument 1; litteral](str){prob}<LEND>[call](){}<LSEP>[](symbol){probCalc}<LSEP>[](symbol){pf_prob}<LEND>[assign](){<-}<LSEP>[](symbol){p1}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){scores_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){score}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){Points Scored in Game}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p2}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){fgm_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.fgm}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){fgm}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p3}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){fga_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.fga}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){fga}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p4}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){fgm3_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.fgm3}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){fgm3}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p5}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){fga3_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.fga3}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){fga3}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p6}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){ftm_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.ftm}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){ftm}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p7}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){fta_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.fta}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){fta}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p8}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){or_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.or}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){or}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p9}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){dr_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.dr}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){dr}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p10}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){ast_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.ast}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){ast}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p11}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){to_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.to}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){to}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p12}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){stl_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.stl}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){stl}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p13}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){blk_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.blk}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){blk}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){p14}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){pf_prob}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){no.pf}<LSEP>[](symbol){prob}<LEND>[](symbol){blank_theme2}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_smooth}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylim}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){xlab}<LSEP>[argument 0; litteral](str){pf}<LEND>[argument 1; call](){}<LSEP>[](symbol){ylab}<LSEP>[argument 0; litteral](str){Win Probability}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){multiplot}<LSEP>[](symbol){p1}<LSEP>[](symbol){p2}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){multiplot}<LSEP>[](symbol){p3}<LSEP>[](symbol){p4}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){multiplot}<LSEP>[](symbol){p5}<LSEP>[](symbol){p6}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){multiplot}<LSEP>[](symbol){p7}<LSEP>[](symbol){p8}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){multiplot}<LSEP>[](symbol){p9}<LSEP>[](symbol){p10}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){multiplot}<LSEP>[](symbol){p11}<LSEP>[](symbol){p12}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){multiplot}<LSEP>[](symbol){p13}<LSEP>[](symbol){p14}<LSEP>[argument 2; litteral](real){2.000000} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggmap}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){map}<LEND>[call](){}<LSEP>[](symbol){readRDS}<LSEP>[argument 0; litteral](str){../input/sf_map_copyright_open...}<LEND>[assign](){<-}<LSEP>[](symbol){map_crime}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){crime_df}<LSEP>[](symbol){crime}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){filtered}<LEND>[call](){}<LSEP>[](symbol){filter}<LSEP>[](symbol){crime_df}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){Category}<LSEP>[](symbol){crime}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){plot}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggmap}<LSEP>[](symbol){map}<LSEP>[argument 1; litteral](str){device}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[](symbol){filtered}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){X}<LSEP>[](symbol){Y}<LSEP>[](symbol){Category}<LEND>[argument 2; litteral](real){0.600000}<LEND>[statement 2; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){plot}<LEND>[call](){}<LSEP>[](symbol){map_crime}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){SUICIDE}<LSEP>[argument 1; litteral](str){ARSON} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Matrix}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tm}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){syuzhet}<LEND>[assign](){<-}<LSEP>[](symbol){labelCountEncoding}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){column}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){match}<LSEP>[](symbol){column}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LSEP>[](symbol){column}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){column}<LEND>[argument 1; call](){}<LSEP>[](symbol){nlevels}<LSEP>[](symbol){column}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Read data}<LEND>[assign](){<-}<LSEP>[](symbol){train_text}<LEND>[call](){}<LSEP>[](symbol){do.call}<LSEP>[](symbol){rbind}<LEND>[argument 1; call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){readLines}<LSEP>[argument 0; litteral](str){../input/training_text}<LEND>[argument 1; litteral](str){||}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){train_text}<LEND>[call](){}<LSEP>[](symbol){as.data.table}<LSEP>[](symbol){train_text}<LEND>[assign](){<-}<LSEP>[](symbol){train_text}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_text}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){train_text}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ID}<LSEP>[argument 1; litteral](str){Text}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_text}<LSEP>[](symbol){ID}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train_text}<LSEP>[](symbol){ID}<LEND>[assign](){<-}<LSEP>[](symbol){test_text}<LEND>[call](){}<LSEP>[](symbol){do.call}<LSEP>[](symbol){rbind}<LEND>[argument 1; call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){readLines}<LSEP>[argument 0; litteral](str){../input/test_text}<LEND>[argument 1; litteral](str){||}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){test_text}<LEND>[call](){}<LSEP>[](symbol){as.data.table}<LSEP>[](symbol){test_text}<LEND>[assign](){<-}<LSEP>[](symbol){test_text}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test_text}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){test_text}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ID}<LSEP>[argument 1; litteral](str){Text}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_text}<LSEP>[](symbol){ID}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test_text}<LSEP>[](symbol){ID}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/training_variants}<LSEP>[argument 1; litteral](str){,}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/test_variants}<LSEP>[argument 1; litteral](str){,}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){train_text}<LSEP>[argument 2; litteral](str){ID}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){test_text}<LSEP>[argument 2; litteral](str){ID}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){test_text}<LSEP>[](symbol){train_text}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Class}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Basic text features}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){nchar}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){nchar}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Text}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){nwords}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){str_count}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Text}<LEND>[argument 1; litteral](str){\\S+}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){TF-IDF}<LEND>[assign](){<-}<LSEP>[](symbol){txt}<LEND>[call](){}<LSEP>[](symbol){Corpus}<LEND>[argument 0; call](){}<LSEP>[](symbol){VectorSource}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Text}<LEND>[assign](){<-}<LSEP>[](symbol){txt}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){txt}<LSEP>[](symbol){stripWhitespace}<LEND>[assign](){<-}<LSEP>[](symbol){txt}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){txt}<LEND>[argument 1; call](){}<LSEP>[](symbol){content_transformer}<LSEP>[](symbol){tolower}<LEND>[assign](){<-}<LSEP>[](symbol){txt}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){txt}<LSEP>[](symbol){removePunctuation}<LEND>[assign](){<-}<LSEP>[](symbol){txt}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){txt}<LSEP>[](symbol){removeWords}<LEND>[argument 2; call](){}<LSEP>[](symbol){stopwords}<LSEP>[argument 0; litteral](str){english}<LEND>[assign](){<-}<LSEP>[](symbol){txt}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){txt}<LSEP>[](symbol){stemDocument}<LSEP>[argument 2; litteral](str){english}<LEND>[assign](){<-}<LSEP>[](symbol){txt}<LEND>[call](){}<LSEP>[](symbol){tm_map}<LSEP>[](symbol){txt}<LSEP>[](symbol){removeNumbers}<LEND>[assign](){<-}<LSEP>[](symbol){dtm}<LEND>[call](){}<LSEP>[](symbol){DocumentTermMatrix}<LSEP>[](symbol){txt}<LEND>[argument 1; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){weightTfIdf}<LEND>[assign](){<-}<LSEP>[](symbol){dtm}<LEND>[call](){}<LSEP>[](symbol){removeSparseTerms}<LSEP>[](symbol){dtm}<LSEP>[argument 1; litteral](real){0.950000}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.matrix}<LSEP>[](symbol){dtm}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Gene}<LEND>[call](){}<LSEP>[](symbol){labelCountEncoding}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Gene}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Variation}<LEND>[call](){}<LSEP>[](symbol){labelCountEncoding}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Variation}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Sentiment analysis}<LEND>[assign](){<-}<LSEP>[](symbol){sentiment}<LEND>[call](){}<LSEP>[](symbol){get_nrc_sentiment}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Text}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){cbind}<LSEP>[](symbol){data}<LSEP>[](symbol){sentiment}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){2016.000000}<LEND>[assign](){<-}<LSEP>[](symbol){cvFoldsList}<LEND>[call](){}<LSEP>[](symbol){createFolds}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Create sparse matrix}<LEND>[assign](){<-}<LSEP>[](symbol){varnames}<LEND>[call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){ID}<LSEP>[argument 1; litteral](str){Class}<LSEP>[argument 2; litteral](str){Text}<LEND>[assign](){<-}<LSEP>[](symbol){train_sparse}<LEND>[call](){}<LSEP>[](symbol){Matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){varnames}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[](symbol){as.numeric}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){test_sparse}<LEND>[call](){}<LSEP>[](symbol){Matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){varnames}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[](symbol){as.numeric}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){y_train}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){Class}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){test_ids}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[](symbol){ID}<LEND>[assign](){<-}<LSEP>[](symbol){dtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){train_sparse}<LSEP>[](symbol){y_train}<LEND>[assign](){<-}<LSEP>[](symbol){dtest}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){test_sparse}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){gbtree}<LSEP>[argument 1; litteral](str){multi:softprob}<LSEP>[argument 2; litteral](str){mlogloss}<LSEP>[argument 3; litteral](real){9.000000}<LSEP>[argument 4; litteral](real){0.200000}<LSEP>[argument 5; litteral](real){1.000000}<LSEP>[argument 6; litteral](real){5.000000}<LSEP>[argument 7; litteral](real){1.000000}<LSEP>[argument 8; litteral](real){0.700000}<LSEP>[argument 9; litteral](real){0.700000}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){XGB cross validation}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_cv}<LEND>[call](){}<LSEP>[](symbol){xgb.cv}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){param}<LSEP>[argument 2; litteral](real){1000.000000}<LSEP>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](logical){TRUE}<LSEP>[](symbol){cvFoldsList}<LSEP>[argument 6; litteral](real){5.000000}<LSEP>[argument 7; litteral](real){100.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rounds}<LEND>[call](){}<LSEP>[](symbol){which.min}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){xgb_cv}<LSEP>[](symbol){dt}<LEND>[](symbol){}<LSEP>[](symbol){test.mlogloss.mean}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){XGB training}<LEND>[assign](){<-}<LSEP>[](symbol){xgb_model}<LEND>[call](){}<LSEP>[](symbol){xgb.train}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){param}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dtrain}<LEND>[](symbol){rounds}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[argument 5; litteral](real){5.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Plotting feature importance}<LEND>[assign](){<-}<LSEP>[](symbol){names}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dimnames}<LSEP>[](symbol){train_sparse}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){importance_matrix}<LEND>[call](){}<LSEP>[](symbol){xgb.importance}<LSEP>[](symbol){names}<LSEP>[](symbol){xgb_model}<LEND>[call](){}<LSEP>[](symbol){xgb.plot.importance}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){importance_matrix}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){30.000000}<LEND>[](symbol){}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){Predictions}<LEND>[assign](){<-}<LSEP>[](symbol){preds}<LEND>[call](){}<LSEP>[](symbol){as.data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){xgb_model}<LSEP>[](symbol){dtest}<LEND>[argument 1; litteral](real){9.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){dtest}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){preds}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){class1}<LSEP>[argument 1; litteral](str){class2}<LSEP>[argument 2; litteral](str){class3}<LSEP>[argument 3; litteral](str){class4}<LSEP>[argument 4; litteral](str){class5}<LSEP>[argument 5; litteral](str){class6}<LSEP>[argument 6; litteral](str){class7}<LSEP>[argument 7; litteral](str){class8}<LSEP>[argument 8; litteral](str){class9}<LEND>[call](){}<LSEP>[](symbol){write.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.table}<LSEP>[](symbol){test_ids}<LSEP>[](symbol){preds}<LEND>[argument 1; litteral](str){submission.csv}<LSEP>[argument 2; litteral](str){,}<LSEP>[argument 3; litteral](str){.}<LSEP>[argument 4; litteral](logical){FALSE}<LSEP>[argument 5; litteral](logical){FALSE} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){pkgs}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){corrplot}<LSEP>[argument 1; litteral](str){caret}<LSEP>[argument 2; litteral](str){data.table}<LSEP>[argument 3; litteral](str){plyr}<LSEP>[argument 4; litteral](str){xgboost}<LSEP>[argument 5; litteral](str){parallel}<LSEP>[argument 6; litteral](str){Metrics}<LSEP>[argument 7; litteral](str){maps}<LSEP>[argument 8; litteral](str){ggmap}<LSEP>[argument 9; litteral](str){lubridate}<LSEP>[argument 10; litteral](str){fasttime}<LSEP>[argument 11; litteral](str){gridExtra}<LSEP>[argument 12; litteral](str){geosphere}<LEND>[control flow](){for}<LSEP>[](symbol){pkg}<LSEP>[](symbol){pkgs}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){pkg}<LEND>[argument 1; call](){}<LSEP>[](symbol){rownames}<LEND>[argument 0; call](){}<LSEP>[](symbol){installed.packages}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){install.packages}<LSEP>[](symbol){pkg}<LEND>[statement 1; call](){}<LSEP>[](symbol){require}<LSEP>[](symbol){pkg}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){pkgs}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){pkg}<LEND>[call](){}<LSEP>[](symbol){rm}<LEND>[argument 0; call](){}<LSEP>[](symbol){ls}<LSEP>[argument 0; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){kIsOnKaggle}<LSEP>[litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){fread}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.path}<LSEP>[argument 0; litteral](str){..}<LSEP>[argument 1; litteral](str){input}<LSEP>[argument 2; litteral](str){train.csv}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Platform}<LSEP>[](symbol){file.sep}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NA}<LSEP>[argument 1; litteral](str){?}<LSEP>[argument 2; litteral](str){}<LEND>[assign](){<-}<LSEP>[](symbol){Xt}<LEND>[call](){}<LSEP>[](symbol){fread}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.path}<LSEP>[argument 0; litteral](str){..}<LSEP>[argument 1; litteral](str){input}<LSEP>[argument 2; litteral](str){test.csv}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Platform}<LSEP>[](symbol){file.sep}<LEND>[argument 1; litteral](logical){TRUE}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NA}<LSEP>[argument 1; litteral](str){?}<LSEP>[argument 2; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_duration}<LSEP>[argument 1; litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Xt}<LSEP>[](symbol){trip_duration}<LEND>[call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){X}<LSEP>[](symbol){trip_duration}<LEND>[assign](){<-}<LSEP>[](symbol){isConstant}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){duplicated}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](integer){1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){dropoff_datetime}<LSEP>[argument 1; litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[](symbol){toIgnore}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){id}<LSEP>[argument 1; litteral](str){trip_duration}<LEND>[assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){X}<LSEP>[](symbol){pickup_longitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){74.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){X}<LSEP>[](symbol){pickup_latitude}<LEND>[argument 1; litteral](real){40.570000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){maxThreshold}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){3.000000}<LSEP>[argument 1; litteral](real){1.480000}<LEND>[argument 1; call](){}<LSEP>[](symbol){mad}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){X}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){X}<LSEP>[](symbol){trip_duration}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){X}<LSEP>[](symbol){trip_duration}<LEND>[](symbol){maxThreshold}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){maxThreshold}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){distance_as_the_crow_flies}<LEND>[argument 1; call](){}<LSEP>[](symbol){distHaversine}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.table}<LSEP>[](symbol){pickup_longitude}<LSEP>[](symbol){pickup_latitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.table}<LSEP>[](symbol){dropoff_longitude}<LSEP>[](symbol){dropoff_latitude}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){distance_as_the_crow_flies}<LEND>[argument 1; call](){}<LSEP>[](symbol){distHaversine}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.table}<LSEP>[](symbol){pickup_longitude}<LSEP>[](symbol){pickup_latitude}<LEND>[argument 1; call](){}<LSEP>[](symbol){data.table}<LSEP>[](symbol){dropoff_longitude}<LSEP>[](symbol){dropoff_latitude}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){pickup_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){fastPOSIXct}<LSEP>[](symbol){pickup_datetime}<LSEP>[argument 1; litteral](str){EST}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){wday}<LEND>[argument 1; call](){}<LSEP>[](symbol){wday}<LSEP>[](symbol){pickup_datetime}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){hour}<LSEP>[](symbol){pickup_datetime}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){pickup_datetime}<LEND>[argument 1; call](){}<LSEP>[](symbol){fastPOSIXct}<LSEP>[](symbol){pickup_datetime}<LSEP>[argument 1; litteral](str){EST}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){wday}<LEND>[argument 1; call](){}<LSEP>[](symbol){wday}<LSEP>[](symbol){pickup_datetime}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){hour}<LEND>[argument 1; call](){}<LSEP>[](symbol){hour}<LSEP>[](symbol){pickup_datetime}<LEND>[assign](){<-}<LSEP>[](symbol){toIgnore}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){toIgnore}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){pickup_datetime}<LEND>[assign](){<-}<LSEP>[](symbol){numVal}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[assign](){<-}<LSEP>[](symbol){nonNumVal}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[control flow](){for}<LSEP>[](symbol){feature}<LEND>[range; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){X}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){feature}<LSEP>[](symbol){toIgnore}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){next}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){X}<LSEP>[](symbol){feature}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){integer}<LSEP>[argument 1; litteral](str){numeric}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sd}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){X}<LSEP>[](symbol){feature}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){toIgnore}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){toIgnore}<LSEP>[](symbol){feature}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){numVal}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature}<LSEP>[](symbol){numVal}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){nonNumVal}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){feature}<LSEP>[](symbol){nonNumVal}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){feature}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){store_and_fwd_flag}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){store_and_fwd_flag}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){store_and_fwd_flag}<LEND>[argument 1; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){store_and_fwd_flag}<LSEP>[argument 1; litteral](str){N}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){kIsOnKaggle}<LSEP>[litteral](logical){TRUE}<LEND>[control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[argument 0; litteral](str){h2o}<LEND>[argument 1; call](){}<LSEP>[](symbol){rownames}<LEND>[argument 0; call](){}<LSEP>[](symbol){installed.packages}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){install.packages}<LSEP>[argument 0; litteral](str){h2o}<LEND>[call](){}<LSEP>[](symbol){require}<LSEP>[argument 0; litteral](str){h2o}<LEND>[call](){}<LSEP>[](symbol){tryCatch}<LEND>[argument 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){h2o.clusterIsUp}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){h2o.shutdown}<LSEP>[argument 0; litteral](logical){FALSE}<LEND>[statement 1; call](){}<LSEP>[](symbol){Sys.sleep}<LSEP>[argument 0; litteral](real){5.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){e}<LEND>[body; block](){}<LEND>[call](){}<LSEP>[](symbol){h2o.init}<LEND>[argument 0; call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){:::}<LSEP>[](symbol){parallel}<LSEP>[](symbol){detectCores}<LEND>[argument 1; litteral](str){15g}<LSEP>[argument 2; litteral](str){1g}<LEND>[call](){}<LSEP>[](symbol){h2o.removeAll}<LEND>[call](){}<LSEP>[](symbol){h2o.clusterStatus}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){pickup_datetime}<LSEP>[argument 1; litteral](NULL){NULL}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){pickup_datetime}<LSEP>[argument 1; litteral](NULL){NULL}<LEND>[control flow](){if}<LSEP>[](symbol){kIsOnKaggle}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){trainIndexes}<LEND>[call](){}<LSEP>[](symbol){createDataPartition}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){X}<LSEP>[argument 1; litteral](str){trip_duration}<LEND>[argument 1; litteral](real){0.150000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){as.h2o}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){X}<LSEP>[](symbol){trainIndexes}<LSEP>[](symbol){}<LEND>[statement 3; call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){trainIndexes}<LEND>[statement 4; call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_duration}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){as.h2o}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Xt}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.250000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Xt}<LEND>[](symbol){}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){as.h2o}<LSEP>[](symbol){X}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){as.h2o}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Xt}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){trip_duration}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){trainUnsupervised}<LEND>[call](){}<LSEP>[](symbol){h2o.rbind}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){splits}<LEND>[call](){}<LSEP>[](symbol){h2o.splitFrame}<LSEP>[](symbol){train}<LSEP>[argument 1; litteral](real){0.700000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){trainSupervised}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){splits}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){validSupervised}<LEND>[call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){splits}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){predictors}<LEND>[call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){X}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){toIgnore}<LEND>[control flow](){if}<LSEP>[](symbol){kIsOnKaggle}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){hyperParamsAutoencoder}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){9.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){9.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){8.000000}<LSEP>[argument 2; litteral](real){11.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){8.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Tanh}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){hyperParamsAutoencoder}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){8.000000}<LSEP>[argument 2; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){8.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){9.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){9.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){8.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){7.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 5; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){6.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){6.000000}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){11.000000}<LEND>[argument 7; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){7.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[argument 8; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){9.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){9.000000}<LEND>[argument 9; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){8.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 10; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){7.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 11; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){6.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){6.000000}<LEND>[argument 12; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){11.000000}<LEND>[argument 13; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){6.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[argument 14; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){9.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){9.000000}<LEND>[argument 15; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){8.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){8.000000}<LEND>[argument 16; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){7.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){7.000000}<LEND>[argument 17; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){6.000000}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){6.000000}<LEND>[argument 18; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){11.000000}<LEND>[argument 19; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[argument 20; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){11.000000}<LEND>[argument 21; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){4.000000}<LSEP>[argument 2; litteral](real){10.000000}<LEND>[argument 22; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){11.000000}<LSEP>[argument 1; litteral](real){8.000000}<LSEP>[argument 2; litteral](real){5.000000}<LSEP>[argument 3; litteral](real){8.000000}<LSEP>[argument 4; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Tanh}<LEND>[assign](){<-}<LSEP>[](symbol){gridAutoencoder}<LEND>[call](){}<LSEP>[](symbol){h2o.grid}<LSEP>[](symbol){predictors}<LSEP>[argument 1; litteral](logical){TRUE}<LSEP>[](symbol){trainUnsupervised}<LSEP>[](symbol){hyperParamsAutoencoder}<LEND>[argument 4; call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){Cartesian}<LEND>[argument 5; litteral](str){deeplearning}<LSEP>[argument 6; litteral](str){grid_autoencoder}<LSEP>[argument 7; litteral](logical){TRUE}<LSEP>[argument 8; litteral](real){1.000000}<LSEP>[argument 9; litteral](logical){FALSE}<LSEP>[argument 10; litteral](str){AUTO}<LSEP>[argument 11; litteral](real){10.000000}<LSEP>[argument 12; litteral](real){800.000000}<LSEP>[argument 13; litteral](logical){TRUE}<LSEP>[argument 14; litteral](logical){TRUE}<LSEP>[argument 15; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){hyperParamsAutoencoder}<LEND>[assign](){<-}<LSEP>[](symbol){sortedGridAutoencoder}<LEND>[call](){}<LSEP>[](symbol){h2o.getGrid}<LSEP>[argument 0; litteral](str){grid_autoencoder}<LSEP>[argument 1; litteral](str){mse}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){tmpDf}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){sortedGridAutoencoder}<LSEP>[](symbol){summary_table}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){knitr}<LSEP>[](symbol){kable}<LEND>[argument 0; call](){}<LSEP>[](symbol){head}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmpDf}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){grep}<LSEP>[argument 0; litteral](str){model_ids}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){tmpDf}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){tmpDf}<LEND>[assign](){<-}<LSEP>[](symbol){bestAutoencoder}<LEND>[call](){}<LSEP>[](symbol){h2o.getModel}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){sortedGridAutoencoder}<LSEP>[](symbol){model_ids}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){bestAutoencoderErr}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){h2o.anomaly}<LSEP>[](symbol){bestAutoencoder}<LSEP>[](symbol){train}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){plotReconstructionError}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){error}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){cut}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sd}<LSEP>[](symbol){error}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sortedErr}<LEND>[call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){error}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){sortedErrFrame}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){sortedErr}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){sortedErr}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){ylim}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){error}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){error}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){xlim}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){index}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){index}<LEND>[statement 5; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){index}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){error}<LEND>[](symbol){cut}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){error}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){error}<LEND>[](symbol){cut}<LEND>[argument 2; litteral](str){o}<LSEP>[argument 3; litteral](str){forestgreen}<LSEP>[argument 4; litteral](real){1.000000}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[argument 7; litteral](str){mse}<LSEP>[argument 8; litteral](str){Reconstruction Error}<LSEP>[argument 9; litteral](str){Sorted Index}<LEND>[statement 6; call](){}<LSEP>[](symbol){par}<LSEP>[argument 0; litteral](logical){TRUE}<LEND>[statement 7; call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){index}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){error}<LEND>[](symbol){cut}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){error}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sortedErrFrame}<LSEP>[](symbol){error}<LEND>[](symbol){cut}<LEND>[argument 2; litteral](str){o}<LSEP>[argument 3; litteral](str){firebrick3}<LSEP>[argument 4; litteral](str){n}<LSEP>[argument 5; litteral](str){n}<LSEP>[argument 6; litteral](logical){FALSE}<LSEP>[](symbol){ylim}<LSEP>[](symbol){xlim}<LSEP>[argument 9; litteral](str){}<LEND>[statement 8; call](){}<LSEP>[](symbol){return}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){layout}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){plotReconstructionError}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestAutoencoderErr}<LSEP>[](symbol){Reconstruction.MSE}<LEND>[assign](){<-}<LSEP>[](symbol){h}<LEND>[call](){}<LSEP>[](symbol){hist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestAutoencoderErr}<LSEP>[](symbol){Reconstruction.MSE}<LEND>[argument 1; litteral](real){100.000000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){cuts}<LEND>[call](){}<LSEP>[](symbol){cut}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){h}<LSEP>[](symbol){breaks}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){inf}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){0.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sd}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){bestAutoencoderErr}<LSEP>[](symbol){Reconstruction.MSE}<LEND>[argument 2; litteral](real){inf}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){h}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){forestgreen}<LSEP>[argument 1; litteral](str){firebrick3}<LEND>[](symbol){cuts}<LEND>[argument 2; litteral](str){Reconstruction Error}<LSEP>[argument 3; litteral](str){mse}<LSEP>[argument 4; litteral](str){blank}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){h}<LSEP>[](symbol){cuts}<LEND>[assign](){<-}<LSEP>[](symbol){layer}<LSEP>[litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){bestAutoencoder}<LEND>[assign](){<-}<LSEP>[](symbol){plotDeepFeatures}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){maxPlot}<LSEP>[](symbol){ncol}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){count}<LSEP>[litteral](real){1.000000}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){plotList}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){data}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){plotList}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){p}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes_string}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){DF.L}<LSEP>[](symbol){layer}<LSEP>[argument 2; litteral](str){.C}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){DF.L}<LSEP>[](symbol){layer}<LSEP>[argument 2; litteral](str){.C}<LSEP>[](symbol){j}<LEND>[argument 2; litteral](str){log_trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_point}<LSEP>[argument 0; litteral](real){0.900000}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){log_trip_duration}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_colour_gradientn}<LEND>[argument 0; call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){rainbow}<LSEP>[argument 0; litteral](real){10.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){8.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){count}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[](symbol){maxPlot}<LEND>[argument 1; litteral](str){right}<LSEP>[argument 2; litteral](str){none}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){log(t)}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){count}<LSEP>[](symbol){maxPlot}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){break}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){count}<LSEP>[](symbol){maxPlot}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){break}<LEND>[statement 4; call](){}<LSEP>[](symbol){grid.arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.list}<LSEP>[](symbol){plotList}<LEND>[](symbol){ncol}<LEND>[assign](){<-}<LSEP>[](symbol){deepFeature}<LEND>[call](){}<LSEP>[](symbol){h2o.deepfeatures}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){train}<LSEP>[](symbol){layer}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){deepFeature}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){log_trip_duration}<LEND>[call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.vector}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){trip_duration}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){plotDeepFeatures}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[argument 0; litteral](real){10000.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){data}<LEND>[](symbol){}<LEND>[argument 1; litteral](real){9.000000}<LSEP>[argument 2; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){deepFeature}<LSEP>[](symbol){data}<LEND>[assign](){<-}<LSEP>[](symbol){getDlRegressor}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){predictors}<LSEP>[](symbol){response}<LSEP>[](symbol){trainSupervised}<LSEP>[](symbol){validSupervised}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){dlSupervisedModel}<LEND>[call](){}<LSEP>[](symbol){h2o.deeplearning}<LSEP>[](symbol){response}<LSEP>[](symbol){predictors}<LSEP>[](symbol){trainSupervised}<LSEP>[](symbol){validSupervised}<LEND>[argument 4; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){model_id}<LEND>[argument 5; litteral](logical){TRUE}<LSEP>[argument 6; litteral](logical){FALSE}<LSEP>[argument 7; litteral](logical){FALSE}<LSEP>[argument 8; litteral](real){1.000000}<LEND>[argument 9; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){parameters}<LEND>[](symbol){hidden}<LEND>[argument 10; litteral](str){AUTO}<LEND>[argument 11; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){parameters}<LEND>[](symbol){epochs}<LEND>[argument 12; litteral](logical){TRUE}<LEND>[argument 13; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){parameters}<LEND>[](symbol){activation}<LEND>[statement 1; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){dlSupervisedModel}<LEND>[assign](){<-}<LSEP>[](symbol){count}<LSEP>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){models}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[assign](){<-}<LSEP>[](symbol){modelRmsles}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[assign](){<-}<LSEP>[](symbol){modelPretrainMses}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[assign](){<-}<LSEP>[](symbol){modelHidden}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[assign](){<-}<LSEP>[](symbol){testPreds}<LEND>[call](){}<LSEP>[](symbol){list}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){sortedGridAutoencoder}<LSEP>[](symbol){model_ids}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){autoencoder}<LEND>[call](){}<LSEP>[](symbol){h2o.getModel}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){sortedGridAutoencoder}<LSEP>[](symbol){model_ids}<LEND>[](symbol){i}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){dlSupervisedModel}<LEND>[call](){}<LSEP>[](symbol){getDlRegressor}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){predictors}<LSEP>[argument 2; litteral](str){trip_duration}<LSEP>[](symbol){trainSupervised}<LSEP>[](symbol){validSupervised}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){h2o.predict}<LSEP>[](symbol){dlSupervisedModel}<LSEP>[](symbol){validSupervised}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){predVect}<LEND>[call](){}<LSEP>[](symbol){as.vector}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){pred}<LSEP>[](symbol){predict}<LEND>[statement 4; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){predVect}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){predVect}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){0.000000}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){models}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){models}<LSEP>[](symbol){dlSupervisedModel}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){modelRmsles}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){modelRmsles}<LEND>[argument 1; call](){}<LSEP>[](symbol){rmsle}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.vector}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){validSupervised}<LSEP>[argument 1; litteral](str){trip_duration}<LEND>[](symbol){predVect}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){modelPretrainMses}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){modelPretrainMses}<LEND>[argument 1; call](){}<LSEP>[](symbol){h2o.mse}<LSEP>[](symbol){autoencoder}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){modelHidden}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){@}<LSEP>[](symbol){autoencoder}<LSEP>[](symbol){parameters}<LEND>[](symbol){hidden}<LEND>[statement 9; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){testPreds}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){h2o.predict}<LSEP>[](symbol){dlSupervisedModel}<LSEP>[](symbol){test}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){dfResults}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){modelRmsles}<LEND>[argument 1; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){lapply}<LSEP>[](symbol){modelHidden}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){(}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){, }<LEND>[argument 2; litteral](str){)}<LEND>[](symbol){modelPretrainMses}<LEND>[argument 3; call](){}<LSEP>[](symbol){seq}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){modelRmsles}<LEND>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){ordering}<LEND>[call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dfResults}<LSEP>[](symbol){validRmsle}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){dfResults}<LSEP>[](symbol){PretrainMse}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){dfResults}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dfResults}<LSEP>[](symbol){ordering}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){knitr}<LSEP>[](symbol){kable}<LEND>[argument 0; call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){dfResults}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Xt}<LEND>[assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){min}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){dfResults}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){result}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.vector}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){testPreds}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dfResults}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[](symbol){index}<LEND>[assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){result}<LSEP>[](symbol){n}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){result}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){fwrite}<LEND>[argument 0; call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){Xt}<LSEP>[](symbol){id}<LEND>[](symbol){result}<LEND>[argument 1; call](){}<LSEP>[](symbol){file.path}<LSEP>[argument 0; litteral](str){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){output-nn-}<LEND>[argument 1; call](){}<LSEP>[](symbol){Sys.Date}<LEND>[argument 2; litteral](str){.csv}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){.Platform}<LSEP>[](symbol){file.sep}<LEND>[argument 2; litteral](logical){FALSE}<LSEP>[argument 3; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[assign](){=}<LSEP>[](symbol){tData}<LEND>[call](){}<LSEP>[](symbol){read.table}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](str){,}<LSEP>[](symbol){T}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){tData}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){rnorm}<LSEP>[argument 0; litteral](real){100.000000} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){FeatureHashing}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Matrix}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){88.000000}<LEND>[assign](){=}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_train.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){=}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/act_test.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){=}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){fread}<LSEP>[argument 0; litteral](str){../input/people.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.frame}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){char_1}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){people_}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[assign](){<-}<LSEP>[](symbol){p_logi}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){people}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){people}<LSEP>[](symbol){is.logical}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LSEP>[](symbol){p_logi}<LEND>[body; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){people}<LSEP>[](symbol){col}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){people}<LSEP>[](symbol){col}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){names}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){people}<LSEP>[](symbol){people_group_1}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){group unique}<LEND>[assign](){=}<LSEP>[](symbol){unique.char_10}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){train}<LSEP>[](symbol){people_id}<LSEP>[](symbol){char_10}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){train}<LSEP>[](symbol){people_id}<LSEP>[](symbol){char_10}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){char_10}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarize}<LEND>[argument 0; call](){}<LSEP>[](symbol){n_distinct}<LSEP>[](symbol){people_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){char_10}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.vector}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){char_10}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){char_10}<LEND>[](symbol){unique.char_10}<LEND>[litteral](str){type unique}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){char_10}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){char_10}<LEND>[](symbol){unique.char_10}<LEND>[litteral](str){type unique}<LEND>[assign](){<-}<LSEP>[](symbol){d1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){train}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){d2}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){test}<LSEP>[](symbol){people}<LSEP>[argument 2; litteral](str){people_id}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){Y}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d1}<LSEP>[](symbol){outcome}<LEND>[litteral](NULL){NULL}<LEND>[assign](){=}<LSEP>[](symbol){row.train}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){=}<LSEP>[](symbol){D}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){d1}<LSEP>[](symbol){d2}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){D}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){test_activity_id}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){activity_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LSEP>[](symbol){d1}<LSEP>[](symbol){d2}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){=}<LSEP>[](symbol){char.cols}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){activity_category}<LSEP>[argument 1; litteral](str){people_group_1}<LSEP>[argument 2; litteral](str){char_1}<LSEP>[argument 3; litteral](str){char_2}<LSEP>[argument 4; litteral](str){char_3}<LSEP>[argument 5; litteral](str){char_4}<LSEP>[argument 6; litteral](str){char_5}<LSEP>[argument 7; litteral](str){char_6}<LSEP>[argument 8; litteral](str){char_7}<LSEP>[argument 9; litteral](str){char_8}<LSEP>[argument 10; litteral](str){char_9}<LSEP>[argument 11; litteral](str){char_10}<LSEP>[argument 12; litteral](str){people_char_2}<LSEP>[argument 13; litteral](str){people_char_3}<LSEP>[argument 14; litteral](str){people_char_4}<LSEP>[argument 15; litteral](str){people_char_5}<LSEP>[argument 16; litteral](str){people_char_6}<LSEP>[argument 17; litteral](str){people_char_7}<LSEP>[argument 18; litteral](str){people_char_8}<LSEP>[argument 19; litteral](str){people_char_9}<LEND>[control flow](){for}<LSEP>[](symbol){f}<LSEP>[](symbol){char.cols}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){class}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[argument 1; litteral](str){character}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){levels}<LEND>[call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[statement 1; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){D}<LSEP>[](symbol){f}<LEND>[](symbol){levels}<LEND>[assign](){=}<LSEP>[](symbol){D.sparse}<LEND>[call](){}<LSEP>[](symbol){cBind}<LEND>[argument 0; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){activity_category}<LEND>[argument 1; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_group_1}<LEND>[argument 2; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_1}<LEND>[argument 3; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_2}<LEND>[argument 4; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_3}<LEND>[argument 5; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_4}<LEND>[argument 6; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_5}<LEND>[argument 7; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_6}<LEND>[argument 8; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_7}<LEND>[argument 9; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_8}<LEND>[argument 10; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){char_9}<LEND>[argument 11; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_2}<LEND>[argument 12; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_3}<LEND>[argument 13; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_4}<LEND>[argument 14; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_5}<LEND>[argument 15; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_6}<LEND>[argument 16; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_7}<LEND>[argument 17; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_8}<LEND>[argument 18; call](){}<LSEP>[](symbol){sparseMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_9}<LEND>[assign](){=}<LSEP>[](symbol){D.sparse}<LEND>[call](){}<LSEP>[](symbol){cBind}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_10}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_11}<LEND>[argument 3; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_12}<LEND>[argument 4; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_13}<LEND>[argument 5; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_14}<LEND>[argument 6; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_15}<LEND>[argument 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_16}<LEND>[argument 8; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_17}<LEND>[argument 9; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_18}<LEND>[argument 10; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_19}<LEND>[argument 11; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_20}<LEND>[argument 12; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_21}<LEND>[argument 13; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_22}<LEND>[argument 14; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_23}<LEND>[argument 15; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_24}<LEND>[argument 16; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_25}<LEND>[argument 17; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_26}<LEND>[argument 18; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_27}<LEND>[argument 19; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_28}<LEND>[argument 20; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_29}<LEND>[argument 21; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_30}<LEND>[argument 22; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_31}<LEND>[argument 23; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_32}<LEND>[argument 24; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_33}<LEND>[argument 25; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_34}<LEND>[argument 26; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_35}<LEND>[argument 27; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_36}<LEND>[argument 28; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_37}<LEND>[argument 29; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){people_char_38}<LEND>[argument 30; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){D}<LSEP>[](symbol){binay_sum}<LEND>[assign](){=}<LSEP>[](symbol){train.sparse}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){row.train}<LEND>[](symbol){}<LEND>[assign](){=}<LSEP>[](symbol){test.sparse}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){D.sparse}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){row.train}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){D.sparse}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){dtrain}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){train.sparse}<LSEP>[](symbol){Y}<LEND>[assign](){<-}<LSEP>[](symbol){dtest}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LSEP>[](symbol){test.sparse}<LEND>[assign](){<-}<LSEP>[](symbol){param}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){binary:logistic}<LSEP>[argument 1; litteral](str){auc}<LSEP>[argument 2; litteral](str){gbtree}<LSEP>[argument 3; litteral](real){0.080000}<LSEP>[argument 4; litteral](real){0.710000}<LSEP>[argument 5; litteral](real){0.700000}<LSEP>[argument 6; litteral](real){0.000000}<LSEP>[argument 7; litteral](real){11.000000}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){88.000000}<LEND>[assign](){<-}<LSEP>[](symbol){m2}<LEND>[call](){}<LSEP>[](symbol){xgb.train}<LSEP>[](symbol){dtrain}<LSEP>[](symbol){param}<LSEP>[argument 2; litteral](real){700.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){dtrain}<LEND>[argument 4; litteral](real){10.000000}<LEND>[assign](){<-}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){m2}<LSEP>[](symbol){dtest}<LEND>[assign](){<-}<LSEP>[](symbol){sub}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){test_activity_id}<LSEP>[](symbol){out}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){sub}<LSEP>[argument 1; litteral](str){xgb_0.9825_v3.csv}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){datasets}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){scatterplot3d}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){attenu}<LSEP>[](symbol){data.class}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){attenu}<LEND>[call](){}<LSEP>[](symbol){attach}<LSEP>[](symbol){attenu}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){accel}<LSEP>[](symbol){dist}<LEND>[argument 1; litteral](str){accel vs dist}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){accel}<LSEP>[](symbol){mag}<LEND>[](symbol){attenu}<LSEP>[argument 2; litteral](str){accel vs mag}<LEND>[call](){}<LSEP>[](symbol){scatterplot3d}<LSEP>[](symbol){dist}<LSEP>[](symbol){mag}<LSEP>[](symbol){accel}<LSEP>[argument 3; litteral](real){16.000000}<LSEP>[argument 4; litteral](logical){TRUE}<LSEP>[argument 5; litteral](str){h}<LSEP>[argument 6; litteral](str){accel vs dist & mag}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attenu}<LSEP>[](symbol){distisq}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attenu}<LSEP>[](symbol){dist}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attenu}<LSEP>[](symbol){dist}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attenu}<LSEP>[](symbol){maggau}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attenu}<LSEP>[](symbol){mag}<LEND>[argument 1; litteral](real){6.500000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){attenu}<LSEP>[](symbol){mag}<LEND>[argument 1; litteral](real){6.500000}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){accel}<LSEP>[](symbol){dist}<LEND>[](symbol){attenu}<LEND>[](symbol){coefficients}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){accel}<LSEP>[](symbol){distisq}<LEND>[](symbol){attenu}<LEND>[](symbol){coefficients}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){accel}<LSEP>[](symbol){mag}<LEND>[](symbol){attenu}<LEND>[](symbol){coefficients}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){accel}<LSEP>[](symbol){maggau}<LEND>[](symbol){attenu}<LEND>[](symbol){coefficients}<LEND>[assign](){<-}<LSEP>[](symbol){coef}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){accel}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){distisq}<LSEP>[](symbol){maggau}<LEND>[](symbol){attenu}<LEND>[](symbol){coefficients}<LEND>[](symbol){coef}<LEND>[call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){accel =}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coef}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 2; litteral](str){+ (}<LEND>[argument 3; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coef}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 4; litteral](str){/(dist^2)) + (}<LEND>[argument 5; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){coef}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 6; litteral](str){/exp((mag-6.5)^2))} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Survived}<LSEP>[argument 1; litteral](str){Died}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){1st Class}<LSEP>[argument 1; litteral](str){2nd Class}<LSEP>[argument 2; litteral](str){3rd Class}<LEND>[call](){}<LSEP>[](symbol){png}<LSEP>[argument 0; litteral](str){1_survival_by_class.png}<LSEP>[argument 1; litteral](real){800.000000}<LSEP>[argument 2; litteral](real){600.000000}<LEND>[call](){}<LSEP>[](symbol){mosaicplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){Passenger Survival by Class}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){#8dd3c7}<LSEP>[argument 1; litteral](str){#fb8072}<LEND>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](str){}<LSEP>[argument 5; litteral](str){}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 7; litteral](real){1.400000}<LEND>[call](){}<LSEP>[](symbol){dev.off} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){Find_Max_CCF}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){a}<LSEP>[](symbol){b}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){d}<LEND>[call](){}<LSEP>[](symbol){ccf}<LSEP>[](symbol){a}<LSEP>[](symbol){b}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){cor}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d}<LSEP>[](symbol){acf}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){d}<LSEP>[](symbol){lag}<LEND>[](symbol){}<LSEP>[](symbol){}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){res}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){cor}<LSEP>[](symbol){lag}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){res_max}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){res}<LEND>[argument 1; call](){}<LSEP>[](symbol){which.max}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){res}<LSEP>[](symbol){cor}<LEND>[](symbol){}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){res_max}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){R.matlab}<LEND>[assign](){=}<LSEP>[](symbol){input}<LSEP>[litteral](str){../input/train_1}<LEND>[assign](){=}<LSEP>[](symbol){output}<LSEP>[litteral](str){train_1_features.csv}<LEND>[assign](){<-}<LSEP>[](symbol){filenames}<LEND>[call](){}<LSEP>[](symbol){list.files}<LSEP>[](symbol){input}<LSEP>[argument 1; litteral](str){*.mat}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[assign](){=}<LSEP>[](symbol){trainset}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){filenames}<LEND>[argument 2; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){16.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){120.000000}<LSEP>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){=}<LSEP>[](symbol){trainset}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LSEP>[](symbol){trainset}<LEND>[assign](){=}<LSEP>[](symbol){length}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){filenames}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){trainset}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){id}<LSEP>[argument 1; litteral](str){target}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){mean_}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 2; litteral](str){}<LEND>[argument 3; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){median_}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 2; litteral](str){}<LEND>[argument 4; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){sem_}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 2; litteral](str){}<LEND>[argument 5; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){abssum_}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 2; litteral](str){}<LEND>[argument 6; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){cor_}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 2; litteral](str){}<LEND>[argument 7; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){dist_}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 2; litteral](str){}<LEND>[argument 8; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){ccf_}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 2; litteral](str){}<LEND>[argument 9; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){lag_}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){120.000000}<LEND>[argument 2; litteral](str){}<LEND>[control flow](){for}<LSEP>[](symbol){n}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](str){\t}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){n}<LSEP>[](symbol){length}<LEND>[argument 3; litteral](str){\n}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){targets}<LEND>[call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){filenames}<LSEP>[](symbol){n}<LEND>[argument 1; litteral](str){/}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){name}<LEND>[call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){targets}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[argument 1; litteral](str){_}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){target}<LEND>[call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){name}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; litteral](str){.mat}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){readMat}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){filenames}<LSEP>[](symbol){n}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){data}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){row_sub}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){df}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){row}<LEND>[body; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){row}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){df}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df}<LSEP>[](symbol){row_sub}<LSEP>[](symbol){}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){df}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainset}<LSEP>[](symbol){n}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){targets}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[](symbol){target}<LEND>[argument 2; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){trainset}<LEND>[argument 1; litteral](real){2.000000}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){min_list}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){df}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){min}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){max_list}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){df}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){max}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){min_all}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){min_list}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){df}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){max_all}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){max_list}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){df}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){df2}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){df}<LSEP>[](symbol){min_all}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){max_all}<LSEP>[](symbol){min_all}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){sum_list}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){df2}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){sum}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){mean_list}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){df2}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){mean}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){median_list}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){df2}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){median}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){sem_list}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){df2}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sd}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){abssum_list}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){df2}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){x}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){cor}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){15.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 11; assign](){=}<LSEP>[](symbol){k}<LSEP>[litteral](real){0.000000}<LEND>[statement 12; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){df2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){df2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){cor}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){cor}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df2}<LSEP>[](symbol){}<LSEP>[](symbol){j}<LEND>[statement 13; assign](){=}<LSEP>[](symbol){dist}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){15.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 14; assign](){=}<LSEP>[](symbol){k}<LSEP>[litteral](real){0.000000}<LEND>[statement 15; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){df2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){df2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dist}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){sqrt}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df2}<LSEP>[](symbol){}<LSEP>[](symbol){j}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 16; assign](){=}<LSEP>[](symbol){ccf}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){15.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 17; assign](){=}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){15.000000}<LSEP>[argument 1; litteral](real){16.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 18; assign](){=}<LSEP>[](symbol){k}<LSEP>[litteral](real){0.000000}<LEND>[statement 19; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){df2}<LEND>[argument 1; litteral](real){1.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){df2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){ccf_max}<LEND>[call](){}<LSEP>[](symbol){Find_Max_CCF}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df2}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){df2}<LSEP>[](symbol){}<LSEP>[](symbol){j}<LEND>[statement 2; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ccf}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ccf_max}<LSEP>[](symbol){cor}<LEND>[statement 3; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lag}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ccf_max}<LSEP>[](symbol){lag}<LEND>[statement 20; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){trainset}<LSEP>[](symbol){n}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){targets}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){4.000000}<LEND>[](symbol){target}<LSEP>[](symbol){mean_list}<LSEP>[](symbol){median_list}<LSEP>[](symbol){sem_list}<LSEP>[](symbol){abssum_list}<LEND>[argument 6; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){cor}<LEND>[argument 7; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){dist}<LEND>[argument 8; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){ccf}<LEND>[argument 9; call](){}<LSEP>[](symbol){as.numeric}<LSEP>[](symbol){lag}<LEND>[call](){}<LSEP>[](symbol){write.table}<LSEP>[](symbol){trainset}<LSEP>[](symbol){output}<LSEP>[](symbol){F}<LSEP>[](symbol){F}<LSEP>[](symbol){T}<LSEP>[argument 5; litteral](str){,} |
[](){expression}<LSEP>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){knitr}<LSEP>[](symbol){opts_chunk}<LEND>[](symbol){set}<LEND>[argument 0; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){cowplot}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){gender_submission}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/gender_submission.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NA}<LSEP>[argument 1; litteral](str){}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NA}<LSEP>[argument 1; litteral](str){}<LEND>[assign](){<-}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){bind_rows}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_label}<LSEP>[argument 0; litteral](str){count}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){..count..}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){People died and survived in tr...}<LEND>[assign](){<-}<LSEP>[](symbol){p1}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Sex}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_label}<LSEP>[argument 0; litteral](str){count}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){..count..}<LEND>[argument 2; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Sex}<LSEP>[argument 1; litteral](str){Count}<LEND>[assign](){<-}<LSEP>[](symbol){p2}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Sex}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Sex}<LSEP>[argument 1; litteral](str){Percent}<LEND>[call](){}<LSEP>[](symbol){plot_grid}<LSEP>[](symbol){p1}<LSEP>[](symbol){p2}<LEND>[assign](){<-}<LSEP>[](symbol){p3}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_label}<LSEP>[argument 0; litteral](str){count}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){..count..}<LEND>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Pclass}<LSEP>[argument 1; litteral](str){Count}<LEND>[assign](){<-}<LSEP>[](symbol){p4}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Pclass}<LSEP>[argument 1; litteral](str){Percent}<LEND>[call](){}<LSEP>[](symbol){plot_grid}<LSEP>[](symbol){p3}<LSEP>[](symbol){p4}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){cut}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){16.000000}<LEND>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_label}<LSEP>[argument 0; litteral](str){count}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){..count..}<LEND>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Age stratification}<LSEP>[argument 1; litteral](str){Count}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){cut}<LEND>[argument 0; call](){}<LSEP>[](symbol){floor}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){16.000000}<LEND>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme}<LEND>[argument 0; call](){}<LSEP>[](symbol){element_text}<LSEP>[argument 0; litteral](real){30.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Age stratification}<LSEP>[argument 1; litteral](str){Percent}<LEND>[assign](){<-}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){SibSp}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Fsize}<LEND>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_label}<LSEP>[argument 0; litteral](str){count}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){..count..}<LEND>[argument 2; litteral](real){0.500000}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Family size}<LSEP>[argument 1; litteral](str){Count}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Fsize}<LEND>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){fill}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Family size}<LSEP>[argument 1; litteral](str){Percent}<LEND>[assign](){<-}<LSEP>[](symbol){important_var}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Survived}<LSEP>[argument 1; litteral](str){Pclass}<LSEP>[argument 2; litteral](str){Sex}<LSEP>[argument 3; litteral](str){Age}<LSEP>[argument 4; litteral](str){Fare}<LSEP>[argument 5; litteral](str){Embarked}<LSEP>[argument 6; litteral](str){Fsize}<LEND>[assign](){<-}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[](symbol){}<LSEP>[](symbol){important_var}<LEND>[call](){}<LSEP>[](symbol){colSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fare}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fare}<LEND>[argument 2; litteral](str){Fare}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Pclass}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 2; litteral](str){Fare}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Embarked}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){Embarked}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarize}<LEND>[argument 0; call](){}<LSEP>[](symbol){median}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){quantile}<LSEP>[](symbol){Fare}<LSEP>[argument 1; litteral](real){0.250000}<LEND>[argument 2; call](){}<LSEP>[](symbol){quantile}<LSEP>[](symbol){Fare}<LSEP>[argument 1; litteral](real){0.750000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Embarked}<LEND>[argument 2; litteral](str){Embarked}<LEND>[litteral](str){C}<LEND>[assign](){<-}<LSEP>[](symbol){age_lm}<LEND>[call](){}<LSEP>[](symbol){lm}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Fare}<LEND>[](symbol){Embarked}<LEND>[](symbol){Fsize}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){age_lm}<LEND>[assign](){<-}<LSEP>[](symbol){age_pre}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){age_lm}<LSEP>[](symbol){full}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[argument 2; litteral](str){Age}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){age_pre}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){598.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf_model}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Age}<LEND>[](symbol){Fare}<LEND>[](symbol){Embarked}<LEND>[](symbol){Fsize}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){rf_model}<LEND>[call](){}<LSEP>[](symbol){legend}<LSEP>[argument 0; litteral](str){topright}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rf_model}<LSEP>[](symbol){err.rate}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){importance}<LEND>[call](){}<LSEP>[](symbol){importance}<LSEP>[](symbol){rf_model}<LEND>[assign](){<-}<LSEP>[](symbol){var_importance}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){row.names}<LSEP>[](symbol){importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){importance}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){MeanDecreaseGini}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){var_importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Importance}<LEND>[assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf_model}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){892.000000}<LSEP>[argument 1; litteral](real){1309.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){PassengerId}<LEND>[](symbol){result}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){result}<LSEP>[argument 1; litteral](str){rf_model_result.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NA}<LSEP>[argument 1; litteral](str){}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){NA}<LSEP>[argument 1; litteral](str){}<LEND>[](symbol){F}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinNum}<LEND>[call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Cabin}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){[A-Z]}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinNum}<LEND>[call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinNum}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinPos}<LEND>[litteral](logical){NA}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinPos}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinNum}<LEND>[argument 1; litteral](real){50.000000}<LEND>[litteral](str){Front}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinPos}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinNum}<LEND>[argument 1; litteral](real){50.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinNum}<LEND>[argument 1; litteral](real){100.000000}<LEND>[litteral](str){Middle}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinPos}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinNum}<LEND>[argument 1; litteral](real){100.000000}<LEND>[litteral](str){End}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinNum}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinPos}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){CabinPos}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){CabinNum}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LSEP>[argument 0; litteral](real){0.600000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Cabin Number}<LEND>[call](){}<LSEP>[](symbol){plot}<LEND>[argument 0; call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LSEP>[](symbol){CabinPos}<LEND>[](symbol){train}<LSEP>[](symbol){mean} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){ggthemes}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){scales}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){mice}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[argument 0; litteral](str){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[](symbol){F}<LEND>[assign](){<-}<LSEP>[](symbol){full}<LEND>[call](){}<LSEP>[](symbol){bind_rows}<LSEP>[](symbol){train}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){full}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){(.*, )|(\\..*)}<LSEP>[argument 1; litteral](str){}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Name}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[assign](){<-}<LSEP>[](symbol){rare_title}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Dona}<LSEP>[argument 1; litteral](str){Lady}<LSEP>[argument 2; litteral](str){the Countess}<LSEP>[argument 3; litteral](str){Capt}<LSEP>[argument 4; litteral](str){Col}<LSEP>[argument 5; litteral](str){Don}<LSEP>[argument 6; litteral](str){Dr}<LSEP>[argument 7; litteral](str){Major}<LSEP>[argument 8; litteral](str){Rev}<LSEP>[argument 9; litteral](str){Sir}<LSEP>[argument 10; litteral](str){Jonkheer}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mlle}<LEND>[litteral](str){Miss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Ms}<LEND>[litteral](str){Miss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mme}<LEND>[litteral](str){Mrs}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[](symbol){rare_title}<LEND>[litteral](str){Rare Title}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Surname}<LEND>[call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Name}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](str){[,.]}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){We have <b>}<LEND>[argument 1; call](){}<LSEP>[](symbol){nlevels}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Surname}<LEND>[argument 2; litteral](str){</b> unique surnames. I would ...}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){SibSp}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Family}<LEND>[call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Surname}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 2; litteral](str){_}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Fsize}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){dodge}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){11.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Family Size}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){FsizeD}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){singleton}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){FsizeD}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 1; litteral](real){5.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 1; litteral](real){1.000000}<LEND>[litteral](str){small}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){FsizeD}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fsize}<LEND>[argument 1; litteral](real){4.000000}<LEND>[litteral](str){large}<LEND>[call](){}<LSEP>[](symbol){mosaicplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){FsizeD}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){Family Size by Survival}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Cabin}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){28.000000}<LEND>[call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](NULL){NULL}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Deck}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Cabin}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){strsplit}<LSEP>[](symbol){x}<LSEP>[argument 1; litteral](NULL){NULL}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Embarked}<LEND>[call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){We will infer their values for...}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Fare}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 2; litteral](str){</b>and<b> $}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Fare}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 4; litteral](str){</b>respectively and their cla...}<LEND>[argument 5; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Pclass}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 6; litteral](str){</b>and<b>}<LEND>[argument 7; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[argument 2; litteral](str){Pclass}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){2.000000}<LEND>[argument 8; litteral](str){</b>. So from where did they e...}<LEND>[assign](){<-}<LSEP>[](symbol){embark_fare}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){PassengerId}<LSEP>[argument 1; litteral](real){62.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){PassengerId}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){embark_fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Embarked}<LSEP>[](symbol){Fare}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_hline}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[argument 0; litteral](real){80.000000}<LEND>[argument 1; litteral](str){red}<LSEP>[argument 2; litteral](str){dashed}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_y_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){dollar_format}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Embarked}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){62.000000}<LSEP>[argument 1; litteral](real){830.000000}<LEND>[litteral](str){C}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[argument 1; litteral](real){1044.000000}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Pclass}<LEND>[argument 1; litteral](str){3}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){S}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_density}<LSEP>[argument 0; litteral](str){#99d6ff}<LSEP>[argument 1; litteral](real){0.400000}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_vline}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){median}<LSEP>[](symbol){Fare}<LSEP>[](symbol){T}<LEND>[argument 1; litteral](str){red}<LSEP>[argument 2; litteral](str){dashed}<LSEP>[argument 3; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_x_continuous}<LEND>[argument 0; call](){}<LSEP>[](symbol){dollar_format}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){1044.000000}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Pclass}<LEND>[argument 1; litteral](str){3}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Embarked}<LEND>[argument 1; litteral](str){S}<LEND>[](symbol){}<LEND>[](symbol){Fare}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[](symbol){factor_vars}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){PassengerId}<LSEP>[argument 1; litteral](str){Pclass}<LSEP>[argument 2; litteral](str){Sex}<LSEP>[argument 3; litteral](str){Embarked}<LSEP>[argument 4; litteral](str){Title}<LSEP>[argument 5; litteral](str){Surname}<LSEP>[argument 6; litteral](str){Family}<LSEP>[argument 7; litteral](str){FsizeD}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[](symbol){factor_vars}<LEND>[call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[](symbol){factor_vars}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){129.000000}<LEND>[assign](){<-}<LSEP>[](symbol){mice_mod}<LEND>[call](){}<LSEP>[](symbol){mice}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){PassengerId}<LSEP>[argument 1; litteral](str){Name}<LSEP>[argument 2; litteral](str){Ticket}<LSEP>[argument 3; litteral](str){Cabin}<LSEP>[argument 4; litteral](str){Family}<LSEP>[argument 5; litteral](str){Surname}<LSEP>[argument 6; litteral](str){Survived}<LEND>[argument 1; litteral](str){rf}<LEND>[assign](){<-}<LSEP>[](symbol){mice_output}<LEND>[call](){}<LSEP>[](symbol){complete}<LSEP>[](symbol){mice_mod}<LEND>[call](){}<LSEP>[](symbol){par}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[call](){}<LSEP>[](symbol){hist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[](symbol){F}<LSEP>[argument 2; litteral](str){Age: Original Data}<LSEP>[argument 3; litteral](str){darkgreen}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.040000}<LEND>[call](){}<LSEP>[](symbol){hist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mice_output}<LSEP>[](symbol){Age}<LEND>[](symbol){F}<LSEP>[argument 2; litteral](str){Age: MICE Output}<LSEP>[argument 3; litteral](str){lightgreen}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.040000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){mice_output}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_histogram}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[litteral](str){Child}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[litteral](str){Adult}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[litteral](str){Not Mother}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){female}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Miss}<LEND>[litteral](str){Mother}<LEND>[call](){}<LSEP>[](symbol){table}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Child}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){full}<LSEP>[](symbol){Mother}<LEND>[call](){}<LSEP>[](symbol){md.pattern}<LSEP>[](symbol){full}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){891.000000}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){full}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){892.000000}<LSEP>[argument 1; litteral](real){1309.000000}<LEND>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){754.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rf_model}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Age}<LEND>[](symbol){SibSp}<LEND>[](symbol){Parch}<LEND>[](symbol){Fare}<LEND>[](symbol){Embarked}<LEND>[](symbol){Title}<LEND>[](symbol){FsizeD}<LEND>[](symbol){Child}<LEND>[](symbol){Mother}<LEND>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){plot}<LSEP>[](symbol){rf_model}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){0.360000}<LEND>[call](){}<LSEP>[](symbol){legend}<LSEP>[argument 0; litteral](str){topright}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){rf_model}<LSEP>[](symbol){err.rate}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[assign](){<-}<LSEP>[](symbol){importance}<LEND>[call](){}<LSEP>[](symbol){importance}<LSEP>[](symbol){rf_model}<LEND>[assign](){<-}<LSEP>[](symbol){varImportance}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){row.names}<LSEP>[](symbol){importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){importance}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](str){MeanDecreaseGini}<LEND>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){rankImportance}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){varImportance}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){#}<LEND>[argument 1; call](){}<LSEP>[](symbol){dense_rank}<LEND>[argument 0; call](){}<LSEP>[](symbol){desc}<LSEP>[](symbol){Importance}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){rankImportance}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LEND>[argument 0; call](){}<LSEP>[](symbol){reorder}<LSEP>[](symbol){Variables}<LSEP>[](symbol){Importance}<LEND>[](symbol){Importance}<LSEP>[](symbol){Importance}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){identity}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_text}<LEND>[argument 0; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Variables}<LSEP>[argument 1; litteral](real){0.500000}<LSEP>[](symbol){Rank}<LEND>[argument 1; litteral](real){0.000000}<LSEP>[argument 2; litteral](real){0.550000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](str){red}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Variables}<LEND>[argument 1; call](){}<LSEP>[](symbol){coord_flip}<LEND>[argument 1; call](){}<LSEP>[](symbol){theme_few}<LEND>[assign](){<-}<LSEP>[](symbol){prediction}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf_model}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){solution}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PassengerId}<LEND>[](symbol){prediction}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){solution}<LSEP>[argument 1; litteral](str){rf_mod_Solution.csv}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){highcharter}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){VIM}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){plotly}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){data_train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){data_test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){data_train}<LEND>[call](){}<LSEP>[](symbol){aggr}<LSEP>[](symbol){data_train}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){colSums}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){data_train}<LEND>[assign](){<-}<LSEP>[](symbol){data_train}<LEND>[call](){}<LSEP>[](symbol){na.roughfix}<LSEP>[](symbol){data_train}<LEND>[assign](){<-}<LSEP>[](symbol){data_test}<LEND>[call](){}<LSEP>[](symbol){na.roughfix}<LSEP>[](symbol){data_test}<LEND>[assign](){<-}<LSEP>[](symbol){cpdata}<LEND>[call](){}<LSEP>[](symbol){rbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data_train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){81.000000}<LEND>[](symbol){data_test}<LEND>[assign](){<-}<LSEP>[](symbol){trainInd}<LEND>[call](){}<LSEP>[](symbol){createDataPartition}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data_train}<LSEP>[](symbol){SalePrice}<LEND>[argument 1; litteral](real){0.800000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){train_housing}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data_train}<LSEP>[](symbol){trainInd}<LSEP>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){test_housing}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){trainInd}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){train_housing}<LEND>[call](){}<LSEP>[](symbol){na.roughfix}<LSEP>[](symbol){train_housing}<LEND>[assign](){<-}<LSEP>[](symbol){test_housing}<LEND>[call](){}<LSEP>[](symbol){na.roughfix}<LSEP>[](symbol){test_housing}<LEND>[assign](){<-}<LSEP>[](symbol){data_train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data_train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){7.000000}<LSEP>[argument 1; litteral](real){73.000000}<LSEP>[argument 2; litteral](real){74.000000}<LSEP>[argument 3; litteral](real){75.000000}<LEND>[call](){}<LSEP>[](symbol){hchart}<LEND>[argument 0; call](){}<LSEP>[](symbol){density}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data_train}<LSEP>[](symbol){SalePrice}<LEND>[argument 1; litteral](str){area}<LSEP>[argument 2; litteral](str){Price}<LEND>[assign](){<-}<LSEP>[](symbol){data_trainnoF}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data_train}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){4.000000}<LSEP>[argument 3; litteral](real){5.000000}<LSEP>[argument 4; litteral](real){17.000000}<LSEP>[argument 5; litteral](real){18.000000}<LSEP>[argument 6; litteral](real){19.000000}<LSEP>[argument 7; litteral](real){20.000000}<LSEP>[argument 8; litteral](real){26.000000}<LSEP>[argument 9; litteral](real){34.000000}<LSEP>[argument 10; litteral](real){36.000000}<LSEP>[argument 11; litteral](real){37.000000}<LSEP>[argument 12; litteral](real){38.000000}<LSEP>[argument 13; litteral](real){43.000000}<LSEP>[argument 14; litteral](real){44.000000}<LSEP>[argument 15; litteral](real){45.000000}<LSEP>[argument 16; litteral](real){46.000000}<LSEP>[argument 17; litteral](real){47.000000}<LSEP>[argument 18; litteral](real){48.000000}<LSEP>[argument 19; litteral](real){50.000000}<LSEP>[argument 20; litteral](real){51.000000}<LSEP>[argument 21; litteral](real){52.000000}<LSEP>[argument 22; litteral](real){54.000000}<LSEP>[argument 23; litteral](real){56.000000}<LSEP>[argument 24; litteral](real){59.000000}<LSEP>[argument 25; litteral](real){61.000000}<LSEP>[argument 26; litteral](real){62.000000}<LSEP>[argument 27; litteral](real){66.000000}<LSEP>[argument 28; litteral](real){66.000000}<LSEP>[argument 29; litteral](real){67.000000}<LSEP>[argument 30; litteral](real){68.000000}<LSEP>[argument 31; litteral](real){69.000000}<LSEP>[argument 32; litteral](real){70.000000}<LSEP>[argument 33; litteral](real){71.000000}<LSEP>[argument 34; litteral](real){72.000000}<LSEP>[argument 35; litteral](real){73.000000}<LSEP>[argument 36; litteral](real){74.000000}<LSEP>[argument 37; litteral](real){77.000000}<LEND>[assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data_trainnoF}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){data_trainnoF}<LEND>[litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){data_trainnoF}<LEND>[call](){}<LSEP>[](symbol){hchart}<LEND>[argument 0; call](){}<LSEP>[](symbol){cor}<LSEP>[](symbol){data_trainnoF}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){MSZoning}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Street}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){LotShape}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){LandContour}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Utilities}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){LotConfig}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){LandSlope}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Neighborhood}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Condition1}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Condition2}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){BldgType}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){HouseStyle}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){RoofStyle}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){RoofMatl}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Exterior1st}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Exterior2nd}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){MasVnrType}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){ExterQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){ExterCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Foundation}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){BsmtQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){BsmtCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){BsmtExposure}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){BsmtFinType1}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){BsmtFinType2}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Heating}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){HeatingQC}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){CentralAir}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Electrical}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){KitchenQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){Functional}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){FireplaceQu}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){GarageType}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){GarageFinish}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){GarageQual}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){GarageCond}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){PavedDrive}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){SaleType}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){data_train}<LSEP>[](symbol){SaleCondition}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[assign](){<-}<LSEP>[](symbol){rf_housing}<LEND>[call](){}<LSEP>[](symbol){randomForest}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){SalePrice}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){OverallQual}<LSEP>[](symbol){YearBuilt}<LEND>[](symbol){YearRemodAdd}<LEND>[](symbol){TotalBsmtSF}<LEND>[](symbol){X1stFlrSF}<LEND>[](symbol){GrLivArea}<LEND>[](symbol){GarageCars}<LEND>[](symbol){GarageArea}<LEND>[](symbol){LotShape}<LEND>[](symbol){Neighborhood}<LEND>[](symbol){MasVnrType}<LEND>[](symbol){ExterQual}<LEND>[](symbol){Foundation}<LEND>[](symbol){BsmtQual}<LEND>[](symbol){BsmtFinType1}<LEND>[](symbol){KitchenQual}<LEND>[](symbol){GarageFinish}<LEND>[](symbol){train_housing}<LSEP>[argument 2; litteral](real){1000.000000}<LEND>[assign](){<-}<LSEP>[](symbol){pred_housing}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf_housing}<LSEP>[](symbol){test_housing}<LEND>[assign](){<-}<LSEP>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){rf_housing}<LSEP>[](symbol){data_test}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data_test}<LSEP>[](symbol){Id}<LEND>[](symbol){pred}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){submission.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){survival}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){MASS}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){glmnet}<LEND>[assign](){=}<LSEP>[](symbol){scad}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){theta}<LSEP>[](symbol){lambda}<LSEP>[](symbol){a}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){eps}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.050000}<LEND>[argument 1; litteral](real){0.001000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){o}<LEND>[call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){theta}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){a}<LSEP>[](symbol){lambda}<LEND>[](symbol){o}<LEND>[statement 3; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){theta}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){o}<LSEP>[](symbol){eps}<LEND>[](symbol){o}<LEND>[](symbol){eps}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){eps}<LSEP>[](symbol){o}<LEND>[argument 1; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){o}<LSEP>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){t}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){a}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){o}<LSEP>[](symbol){lambda}<LEND>[assign](){=}<LSEP>[](symbol){CoxRegression}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){Z}<LSEP>[](symbol){Time}<LSEP>[](symbol){status}<LSEP>[](symbol){part}<LSEP>[](symbol){SCAD}<LSEP>[](symbol){beta_init}<LSEP>[](symbol){WLW_init}<LSEP>[](symbol){lambda}<LSEP>[](symbol){lambda_vec}<LSEP>[](symbol){Cmatrix}<LSEP>[](symbol){print_path}<LSEP>[](symbol){print_detail}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){Z}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){Time}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){status}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Error: Z is null}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){Z}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){Z}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){Time}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){Time}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){status}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){status}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Z}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){Z}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){K}<LEND>[call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){Time}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){Time}<LEND>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){status}<LEND>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){status}<LEND>[](symbol){K}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Error: please check the size o...}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){K}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){stop}<LSEP>[argument 0; litteral](str){Error: please check the size o...}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){beta_init}<LSEP>[](symbol){K}<LSEP>[](symbol){p}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){ord}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){Time}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){order}<LEND>[statement 11; assign](){=}<LSEP>[](symbol){ord_events}<LSEP>[](symbol){ord}<LEND>[statement 12; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_events}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){status}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[statement 13; assign](){=}<LSEP>[](symbol){num_events}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){status}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){sum}<LEND>[statement 14; assign](){=}<LSEP>[](symbol){t_dNk}<LSEP>[](symbol){Time}<LEND>[statement 15; assign](){=}<LSEP>[](symbol){ord_e}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){ord_events}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 16; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_events}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_events}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){k}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t_dNk}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Time}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){n}<LEND>[true branch; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t_dNk}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[](symbol){k}<LEND>[litteral](real){0.000000}<LEND>[statement 17; assign](){=}<LSEP>[](symbol){ord_e_rev}<LSEP>[](symbol){ord_e}<LEND>[statement 18; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e_rev}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){k}<LEND>[statement 19; assign](){=}<LSEP>[](symbol){lambda_best}<LSEP>[litteral](real){0.000000}<LEND>[statement 20; assign](){=}<LSEP>[](symbol){count}<LSEP>[litteral](real){0.000000}<LEND>[statement 21; assign](){=}<LSEP>[](symbol){funcZ}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LSEP>[](symbol){t}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Z}<LSEP>[](symbol){i}<LSEP>[](symbol){}<LEND>[](symbol){p}<LEND>[statement 22; assign](){=}<LSEP>[](symbol){funcY}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LSEP>[](symbol){t}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){<=}<LSEP>[](symbol){t}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Time}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 23; assign](){=}<LSEP>[](symbol){funcr_k}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LSEP>[](symbol){t}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){funcZ}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LSEP>[](symbol){t}<LEND>[statement 24; assign](){=}<LSEP>[](symbol){funcSs}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){d}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){tr}<LEND>[call](){}<LSEP>[](symbol){funcr_k}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e_rev}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){t}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){S}<LEND>[call](){}<LSEP>[](symbol){array}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tr}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 2; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tr}<LSEP>[](symbol){i}<LEND>[statement 3; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){S}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){tZ}<LEND>[call](){}<LSEP>[](symbol){funcZ}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e_rev}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){tZ}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){tr}<LSEP>[](symbol){p}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){S}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){p}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[statement 3; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tt}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tt}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){S}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){d}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){tZ}<LEND>[call](){}<LSEP>[](symbol){funcZ}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e_rev}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){S}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){p}<LSEP>[](symbol){p}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){tt}<LEND>[call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){i}<LEND>[body; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tZ}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tZ}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tr}<LSEP>[](symbol){i}<LEND>[statement 3; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tt}<LSEP>[](symbol){}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){i}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tt}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){S}<LEND>[statement 25; assign](){=}<LSEP>[](symbol){funcZbars_k}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){s1}<LEND>[call](){}<LSEP>[](symbol){funcSs}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){s0}<LEND>[call](){}<LSEP>[](symbol){funcSs}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[statement 2; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){s1}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){s0}<LSEP>[](symbol){p}<LEND>[statement 26; assign](){=}<LSEP>[](symbol){funcVs_k}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){s2}<LEND>[call](){}<LSEP>[](symbol){funcSs}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){s0}<LEND>[call](){}<LSEP>[](symbol){funcSs}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){s2}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){s0}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){p}<LSEP>[](symbol){p}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){tZ}<LEND>[call](){}<LSEP>[](symbol){funcZbars_k}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){tZ2}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){tZ}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){o}<LEND>[body; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){o}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){o}<LEND>[statement 5; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){s}<LSEP>[](symbol){tZ2}<LEND>[statement 27; assign](){=}<LSEP>[](symbol){funcU}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){events_Zbar}<LEND>[call](){}<LSEP>[](symbol){funcZbars_k}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Z}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e_rev}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[](symbol){events_Zbar}<LEND>[false branch; call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Z}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e_rev}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[](symbol){events_Zbar}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sum}<LEND>[statement 28; assign](){=}<LSEP>[](symbol){funcInfo}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){events_V}<LEND>[call](){}<LSEP>[](symbol){funcVs_k}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){k}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){events_V}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){events_V}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sum}<LEND>[](symbol){p}<LEND>[statement 29; assign](){=}<LSEP>[](symbol){funcLogL_k}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){r}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){funcZ}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){r}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){ans}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){ii}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){ii}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[statement 3; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){r}<LEND>[](symbol){ans}<LEND>[statement 30; assign](){=}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.000000}<LEND>[statement 31; assign](){=}<LSEP>[](symbol){stepcount}<LSEP>[litteral](real){0.000000}<LEND>[statement 32; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){WLW_init}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){SCAD}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){beta_init}<LEND>[false branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){SCAD}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){beta}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){tmp_dat}<LEND>[call](){}<LSEP>[](symbol){cbind}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Time}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){status}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){Z}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){coxph}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){Surv}<LSEP>[](symbol){time}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){status}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){.}<LEND>[](symbol){tmp_dat}<LEND>[](symbol){coef}<LEND>[statement 1; control flow](){if}<LSEP>[](symbol){print_path}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){...... get WLW estimator ...\n}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){SCAD}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){part}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){eps}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.050000}<LEND>[argument 1; litteral](real){0.001000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){iszero}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](logical){FALSE}<LSEP>[](symbol){K}<LSEP>[](symbol){p}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){beginzero}<LSEP>[](symbol){iszero}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){beginzero}<LEND>[call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){beta}<LEND>[](symbol){eps}<LEND>[statement 4; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){0.500000}<LSEP>[](symbol){n}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){count}<LSEP>[litteral](real){0.000000}<LEND>[statement 2; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[](symbol){eps}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beginzero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){U_0}<LEND>[call](){}<LSEP>[](symbol){funcU}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){grad_0}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){U_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lambda}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){scad}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beginzero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[statement 6; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){grad_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){eps}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[litteral](real){0.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){U_0}<LEND>[call](){}<LSEP>[](symbol){funcU}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){grad_0}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){U_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lambda}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){scad}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[](symbol){lambda}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){grad_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[litteral](real){0.000000}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){stepcount}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){stepcount}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 8; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_0}<LEND>[argument 1; litteral](real){0.010000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){stepcount}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){stepcount}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[](symbol){grad_0}<LEND>[statement 2; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[](symbol){eps}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){U_1}<LEND>[call](){}<LSEP>[](symbol){funcU}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){grad_1}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){U_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lambda}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){scad}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[](symbol){lambda}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beginzero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[true branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){grad_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){eps}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[litteral](real){0.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){U_1}<LEND>[call](){}<LSEP>[](symbol){funcU}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){grad_1}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){U_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lambda}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){scad}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[](symbol){lambda}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){grad_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){iszero}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[litteral](real){0.000000}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){sg1}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_1}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){rate}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){sg1}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_0}<LEND>[statement 8; control flow](){if}<LSEP>[](symbol){print_path}<LEND>[true branch; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; litteral](str){\t||}<LSEP>[](symbol){grad_1}<LSEP>[argument 3; litteral](str){\t||}<LSEP>[](symbol){rate}<LSEP>[argument 5; litteral](str){||}<LSEP>[](symbol){alpha}<LSEP>[argument 7; litteral](str){\n}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){1.030000}<LEND>[argument 1; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){grad_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){grad_0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.800000}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.200000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){count}<LSEP>[litteral](real){0.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){0.990000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sg1}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){0.970000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sg1}<LSEP>[argument 1; litteral](real){0.020000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){0.950000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sg1}<LSEP>[argument 1; litteral](real){0.040000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){0.900000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sg1}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; assign](){=}<LSEP>[](symbol){count}<LSEP>[litteral](real){0.000000}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){count}<LSEP>[litteral](real){0.000000}<LEND>[statement 11; assign](){=}<LSEP>[](symbol){grad_0}<LSEP>[](symbol){grad_1}<LEND>[statement 9; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[](symbol){eps}<LEND>[litteral](real){0.000000}<LEND>[statement 33; assign](){=}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){beta}<LEND>[statement 34; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){SCAD}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){print_path}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){...... fivefold CV - begin ...\n}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){rand}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){%%}<LSEP>[](symbol){n}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; litteral](real){5.000000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){a}<LSEP>[litteral](real){3.700000}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){like}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){lambda_vec}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){counts}<LSEP>[](symbol){like}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){ii}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){print_path}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){[}<LSEP>[](symbol){ii}<LSEP>[argument 2; litteral](str){]}<LSEP>[argument 3; litteral](str){}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){train_dat_T}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Time}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rand}<LSEP>[](symbol){ii}<LSEP>[](symbol){}<LEND>[](symbol){}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){train_dat_Z}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Z}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rand}<LSEP>[](symbol){ii}<LSEP>[](symbol){}<LEND>[](symbol){}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){train_dat_st}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){status}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rand}<LSEP>[](symbol){ii}<LSEP>[](symbol){}<LEND>[](symbol){}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){test_dat_T}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Time}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rand}<LSEP>[](symbol){ii}<LSEP>[](symbol){}<LEND>[](symbol){}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){test_dat_Z}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Z}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rand}<LSEP>[](symbol){ii}<LSEP>[](symbol){}<LEND>[](symbol){}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){test_dat_st}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){status}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){rand}<LSEP>[](symbol){ii}<LSEP>[](symbol){}<LEND>[](symbol){}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){ord1}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){test_dat_T}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){order}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){ord_events1}<LSEP>[](symbol){ord1}<LEND>[statement 9; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_events1}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord1}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test_dat_st}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord1}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){num_events1}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){test_dat_st}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){sum}<LEND>[statement 11; assign](){=}<LSEP>[](symbol){ord_e1}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){ord_events1}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 12; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events1}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events1}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_events1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_events1}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){0.000000}<LEND>[](symbol){k}<LEND>[statement 13; assign](){=}<LSEP>[](symbol){beta_pre}<LSEP>[](symbol){beta_WLW}<LEND>[statement 14; control flow](){for}<LSEP>[](symbol){lam}<LSEP>[](symbol){lambda_vec}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[](symbol){print_path}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){.}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){CoxRegression}<LSEP>[](symbol){train_dat_Z}<LSEP>[](symbol){train_dat_T}<LSEP>[](symbol){train_dat_st}<LSEP>[](symbol){beta_pre}<LSEP>[argument 4; litteral](logical){TRUE}<LSEP>[](symbol){lam}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){train_beta}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){WLW_estimator}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){beta_pre}<LSEP>[](symbol){train_beta}<LEND>[statement 4; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){counts}<LSEP>[](symbol){ii}<LEND>[argument 2; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){lambda_vec}<LSEP>[](symbol){lam}<LEND>[call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){count}<LEND>[statement 5; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){like}<LSEP>[](symbol){ii}<LEND>[argument 2; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){lambda_vec}<LSEP>[](symbol){lam}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){r}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){train_beta}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test_dat_Z}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e1}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[](symbol){p}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){s}<LEND>[call](){}<LSEP>[](symbol){exp}<LSEP>[](symbol){r}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){ans}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events1}<LSEP>[](symbol){k}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){ii}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){ii}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events1}<LSEP>[](symbol){k}<LEND>[statement 3; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){r}<LEND>[](symbol){ans}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){like_sum}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){like}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){sum}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){counts_sum}<LEND>[call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){counts}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){sum}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){lambda_best}<LEND>[call](){}<LSEP>[](symbol){min}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){lambda_vec}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){like_sum}<LEND>[argument 1; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){like_sum}<LEND>[statement 35; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LSEP>[](symbol){SCAD}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){part}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){lambda}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){lambda_best}<LSEP>[](symbol){lambda}<LEND>[statement 36; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){part}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){ans}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){beta}<LSEP>[](symbol){lambda}<LSEP>[](symbol){stepcount}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ans}<LSEP>[](symbol){WLW_estimator}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){coef -}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Time}<LEND>[statement 2; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ans}<LSEP>[](symbol){WLW_estimator}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Z}<LEND>[statement 3; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ans}<LSEP>[](symbol){Cui_estimator}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){coef -}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Time}<LEND>[statement 4; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ans}<LSEP>[](symbol){Cui_estimator}<LEND>[call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Z}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LSEP>[](symbol){ans}<LEND>[statement 37; control flow](){if}<LSEP>[](symbol){print_path}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){\n...... preparing for partiti...}<LEND>[statement 38; assign](){=}<LSEP>[](symbol){i_par}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){part}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){K}<LEND>[statement 39; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[litteral](real){0.000000}<LEND>[statement 40; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){part}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){}<LEND>[](symbol){num_events}<LEND>[statement 41; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){part}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LSEP>[](symbol){part}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LSEP>[](symbol){j}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){round}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){part}<LEND>[statement 42; assign](){=}<LSEP>[](symbol){events_len_forU}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[](symbol){K}<LSEP>[](symbol){part}<LEND>[statement 43; assign](){=}<LSEP>[](symbol){events_Z_forU}<LEND>[call](){}<LSEP>[](symbol){array}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){K}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LSEP>[](symbol){n}<LEND>[statement 44; assign](){=}<LSEP>[](symbol){events_Zbar_WLW}<LEND>[call](){}<LSEP>[](symbol){array}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){K}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LSEP>[](symbol){n}<LEND>[statement 45; assign](){=}<LSEP>[](symbol){events_SofZ_forU}<LEND>[call](){}<LSEP>[](symbol){array}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){K}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[statement 46; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){l}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){part}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){il}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LSEP>[](symbol){l}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){ir}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){l}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){k}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){events_i}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){il}<LSEP>[](symbol){ir}<LEND>[](symbol){k}<LEND>[statement 3; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_len_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){events_i}<LEND>[statement 4; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_Z_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LSEP>[](symbol){}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_len_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LEND>[call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Z}<LSEP>[](symbol){events_i}<LSEP>[](symbol){}<LEND>[statement 5; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_SofZ_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LSEP>[](symbol){}<LEND>[call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_Z_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LSEP>[](symbol){}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_len_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sum}<LEND>[statement 6; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_Zbar_WLW}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LSEP>[](symbol){}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_len_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){funcZbars_k}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){il}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){ir}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 47; assign](){=}<LSEP>[](symbol){funcU_par_k}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){Zbars}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){funcZbars_k}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LEND>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){part}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){l}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){events_Zbar}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Zbars}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LSEP>[](symbol){l}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){l}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){k}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_SofZ_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){events_Zbar}<LEND>[false branch; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_SofZ_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LSEP>[](symbol){}<LEND>[argument 1; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){events_Zbar}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sum}<LEND>[statement 48; assign](){=}<LSEP>[](symbol){funcU_par}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LEND>[body; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){o}<LEND>[body; call](){}<LSEP>[](symbol){funcU_par_k}<LSEP>[](symbol){beta}<LSEP>[](symbol){o}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 49; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){Cmatrix}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){dHAZ}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){t_dNk}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dHAZ}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){rev}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){funcSs}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){k}<LSEP>[argument 2; litteral](real){0.000000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){funcdM}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){t_1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t_dNk}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){ii}<LEND>[call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ord_e}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[](symbol){i}<LEND>[statement 2; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ii}<LEND>[litteral](real){0.000000}<LEND>[statement 3; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t_1}<LSEP>[](symbol){ii}<LEND>[litteral](real){1.000000}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){t_y}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t_dNk}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[statement 5; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){ii}<LSEP>[](symbol){n}<LEND>[true branch; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){ii}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){n}<LEND>[litteral](real){0.000000}<LEND>[statement 6; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t_y}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){ii}<LEND>[litteral](real){1.000000}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){t_r}<LEND>[call](){}<LSEP>[](symbol){funcr_k}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){Time}<LSEP>[](symbol){i}<LSEP>[](symbol){k}<LEND>[statement 8; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){t_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){t_y}<LSEP>[](symbol){t_r}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dHAZ}<LSEP>[](symbol){}<LSEP>[](symbol){k}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){func_integral_forb}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LSEP>[](symbol){l}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){dm}<LEND>[call](){}<LSEP>[](symbol){funcdM}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){funcZ}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){il}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LSEP>[](symbol){l}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){ir}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){l}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){k}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){z}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){ir}<LSEP>[](symbol){il}<LEND>[argument 1; litteral](real){1.000000}<LEND>[](symbol){p}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){events_dm}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dm}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[](symbol){il}<LSEP>[](symbol){ir}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){events_Zbar}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_Zbar_WLW}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LSEP>[](symbol){}<LEND>[argument 4; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_len_forU}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LEND>[statement 7; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){events_dm}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){z}<LSEP>[](symbol){events_Zbar}<LEND>[false branch; call](){}<LSEP>[](symbol){apply}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){z}<LSEP>[](symbol){events_Zbar}<LEND>[argument 1; call](){}<LSEP>[](symbol){rep}<LSEP>[](symbol){events_dm}<LSEP>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sum}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){temp_integral_forb}<LEND>[call](){}<LSEP>[](symbol){array}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){K}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LSEP>[](symbol){n}<LEND>[statement 5; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[body; control flow](){for}<LSEP>[](symbol){l}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){part}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){temp_integral_forb}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LSEP>[](symbol){}<LSEP>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){func_integral_forb}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){k}<LSEP>[](symbol){i}<LSEP>[](symbol){l}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){funcb}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){j}<LSEP>[](symbol){l1}<LSEP>[](symbol){l2}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){sapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){o}<LEND>[body; call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){temp_integral_forb}<LSEP>[](symbol){k}<LSEP>[](symbol){l1}<LSEP>[](symbol){}<LSEP>[](symbol){o}<LEND>[argument 1; call](){}<LSEP>[](symbol){t}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){temp_integral_forb}<LSEP>[](symbol){j}<LSEP>[](symbol){l2}<LSEP>[](symbol){}<LSEP>[](symbol){o}<LEND>[statement 1; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){t}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sum}<LEND>[](symbol){n}<LEND>[false branch; assign](){=}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){t}<LEND>[](symbol){n}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){t}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){p}<LEND>[](symbol){t}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){funcdSIGMA}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){k}<LSEP>[](symbol){j}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){dsig}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[statement 1; control flow](){for}<LSEP>[](symbol){l1}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){part}<LEND>[body; control flow](){for}<LSEP>[](symbol){l2}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){part}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dsig}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){l1}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){l1}<LSEP>[](symbol){p}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){l2}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){l2}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){funcb}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){k}<LSEP>[](symbol){j}<LSEP>[](symbol){l1}<LSEP>[](symbol){l2}<LEND>[](symbol){dsig}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){DSIGMA}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){K}<LEND>[](symbol){p}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){K}<LEND>[](symbol){p}<LEND>[statement 9; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){DSIGMA}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[](symbol){k}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){j}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){funcdSIGMA}<LSEP>[](symbol){k}<LSEP>[](symbol){j}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){inv_DSIGMA}<LEND>[call](){}<LSEP>[](symbol){try}<LEND>[argument 0; call](){}<LSEP>[](symbol){solve}<LSEP>[](symbol){DSIGMA}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[statement 11; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.matrix}<LSEP>[](symbol){inv_DSIGMA}<LEND>[true branch; assign](){=}<LSEP>[](symbol){inv_DSIGMA}<LEND>[call](){}<LSEP>[](symbol){ginv}<LSEP>[](symbol){DSIGMA}<LEND>[statement 12; assign](){=}<LSEP>[](symbol){events_Vs}<LEND>[call](){}<LSEP>[](symbol){array}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){K}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){p}<LSEP>[](symbol){p}<LEND>[](symbol){n}<LEND>[statement 13; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_Vs}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 3; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[call](){}<LSEP>[](symbol){funcVs_k}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){k}<LEND>[statement 14; assign](){=}<LSEP>[](symbol){funcPsi}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){il}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LSEP>[](symbol){l}<LSEP>[](symbol){k}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){ir}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){i_par}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){l}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){k}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){events_V}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){events_Vs}<LSEP>[](symbol){k}<LSEP>[](symbol){}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){il}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){num_events}<LSEP>[](symbol){k}<LEND>[](symbol){ir}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 3; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.numeric}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){events_V}<LEND>[](symbol){n}<LEND>[false branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){apply}<LSEP>[](symbol){events_V}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){sum}<LEND>[](symbol){p}<LEND>[](symbol){n}<LEND>[statement 15; assign](){=}<LSEP>[](symbol){dPSI}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[](symbol){K}<LEND>[argument 2; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[statement 16; control flow](){for}<LSEP>[](symbol){k}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){K}<LEND>[body; control flow](){for}<LSEP>[](symbol){l}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){part}<LEND>[body; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){dPSI}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){l}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){part}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){l}<LSEP>[](symbol){p}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){k}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){p}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){k}<LSEP>[](symbol){p}<LEND>[call](){}<LSEP>[](symbol){funcPsi}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){k}<LSEP>[](symbol){l}<LEND>[statement 17; assign](){=}<LSEP>[](symbol){C}<LEND>[call](){}<LSEP>[](symbol){%*%}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){dPSI}<LEND>[](symbol){inv_DSIGMA}<LEND>[false branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){C}<LSEP>[](symbol){Cmatrix}<LEND>[statement 50; control flow](){if}<LSEP>[](symbol){print_path}<LEND>[true branch; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){cat}<LSEP>[argument 0; litteral](str){...... final step: gradient de...}<LEND>[statement 51; assign](){=}<LSEP>[](symbol){funcGrad}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){beta}<LSEP>[](symbol){SCAD}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){dU}<LEND>[call](){}<LSEP>[](symbol){funcU_par}<LSEP>[](symbol){beta}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){EE}<LEND>[call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){C}<LSEP>[](symbol){dU}<LEND>[statement 2; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){dim}<LSEP>[](symbol){EE}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){dd}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){t}<LSEP>[](symbol){EE}<LEND>[statement 4; control flow](){if}<LSEP>[](symbol){SCAD}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){dd}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){dd}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){lambda_best}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){scad}<LSEP>[](symbol){beta}<LSEP>[](symbol){lambda_best}<LEND>[](symbol){dd}<LEND>[statement 52; assign](){=}<LSEP>[](symbol){beta}<LSEP>[](symbol){beta_WLW}<LEND>[statement 53; assign](){=}<LSEP>[](symbol){eps}<LSEP>[litteral](real){0.001000}<LEND>[statement 54; assign](){=}<LSEP>[](symbol){iszero}<LEND>[call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){beta}<LEND>[](symbol){eps}<LEND>[statement 55; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LSEP>[](symbol){iszero}<LEND>[true branch; call](){}<LSEP>[](symbol){next}<LEND>[statement 56; assign](){=}<LSEP>[](symbol){grad_0}<LEND>[call](){}<LSEP>[](symbol){funcGrad}<LSEP>[](symbol){beta}<LSEP>[](symbol){SCAD}<LEND>[statement 57; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){iszero}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){grad_0}<LSEP>[](symbol){iszero}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){eps}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){iszero}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){iszero}<LEND>[litteral](real){0.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){grad_0}<LEND>[call](){}<LSEP>[](symbol){funcGrad}<LSEP>[](symbol){beta}<LSEP>[](symbol){SCAD}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){grad_0}<LSEP>[](symbol){iszero}<LEND>[litteral](real){0.000000}<LEND>[statement 58; assign](){=}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.030000}<LEND>[statement 59; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){beta}<LEND>[argument 1; litteral](real){20.000000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.003000}<LEND>[statement 60; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){beta}<LEND>[argument 1; litteral](real){200.000000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.000300}<LEND>[statement 61; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){beta}<LEND>[argument 1; litteral](real){2000.000000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){alpha}<LSEP>[litteral](real){0.000030}<LEND>[statement 62; control flow](){if}<LSEP>[](symbol){print_detail}<LEND>[true branch; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_0}<LEND>[argument 1; litteral](str){||}<LSEP>[](symbol){alpha}<LSEP>[argument 3; litteral](str){\n}<LEND>[statement 63; assign](){=}<LSEP>[](symbol){stepcount}<LSEP>[litteral](real){1.000000}<LEND>[statement 64; control flow](){while}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_0}<LEND>[argument 1; litteral](real){0.010000}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){stepcount}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){stepcount}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[](symbol){grad_0}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){iszero}<LEND>[call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){beta}<LEND>[](symbol){eps}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){grad_1}<LEND>[call](){}<LSEP>[](symbol){funcGrad}<LSEP>[](symbol){beta}<LSEP>[](symbol){SCAD}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LSEP>[](symbol){iszero}<LEND>[true branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){all}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){iszero}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){grad_1}<LSEP>[](symbol){iszero}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[](symbol){eps}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){iszero}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta}<LSEP>[](symbol){iszero}<LEND>[litteral](real){0.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){grad_1}<LEND>[call](){}<LSEP>[](symbol){funcGrad}<LSEP>[](symbol){beta}<LSEP>[](symbol){SCAD}<LEND>[statement 1; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){grad_1}<LSEP>[](symbol){iszero}<LEND>[litteral](real){0.000000}<LEND>[statement 5; control flow](){if}<LSEP>[](symbol){print_path}<LEND>[true branch; call](){}<LSEP>[](symbol){cat}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_1}<LEND>[argument 1; litteral](str){||}<LSEP>[](symbol){alpha}<LSEP>[argument 3; litteral](str){\n}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){sg1}<LEND>[call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_1}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){rate}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){sg1}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){abs}<LSEP>[](symbol){grad_0}<LEND>[statement 8; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){|}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){1.030000}<LEND>[argument 1; call](){}<LSEP>[](symbol){any}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){grad_1}<LEND>[argument 1; call](){}<LSEP>[](symbol){sign}<LSEP>[](symbol){grad_0}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){count}<LSEP>[litteral](real){0.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.800000}<LEND>[statement 2; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){0.990000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sg1}<LSEP>[argument 1; litteral](real){0.010000}<LEND>[true branch; assign](){=}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){0.970000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sg1}<LSEP>[argument 1; litteral](real){0.030000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){0.950000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sg1}<LSEP>[argument 1; litteral](real){0.050000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){rate}<LSEP>[argument 1; litteral](real){0.900000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){sg1}<LSEP>[argument 1; litteral](real){0.100000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){count}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[false branch; assign](){=}<LSEP>[](symbol){count}<LSEP>[litteral](real){0.000000}<LEND>[statement 9; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){count}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){alpha}<LEND>[call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){alpha}<LSEP>[argument 1; litteral](real){1.900000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){count}<LSEP>[litteral](real){0.000000}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){grad_0}<LSEP>[](symbol){grad_1}<LEND>[statement 65; assign](){=}<LSEP>[](symbol){ans}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[](symbol){beta_WLW}<LSEP>[](symbol){beta}<LSEP>[](symbol){C}<LSEP>[](symbol){lambda_best}<LEND>[statement 66; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ans}<LSEP>[](symbol){WLW_estimator}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){coef -}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Time}<LEND>[statement 67; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ans}<LSEP>[](symbol){WLW_estimator}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){coef -}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Z}<LEND>[statement 68; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){rownames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ans}<LSEP>[](symbol){Cui_estimator}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){coef -}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Time}<LEND>[statement 69; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ans}<LSEP>[](symbol){Cui_estimator}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){coef -}<LEND>[argument 1; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){Z}<LEND>[](symbol){ans}<LEND>[assign](){=}<LSEP>[](symbol){N}<LSEP>[litteral](real){1.000000}<LEND>[assign](){=}<LSEP>[](symbol){Npart}<LSEP>[litteral](real){10.000000}<LEND>[assign](){=}<LSEP>[](symbol){outcome1}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){N}<LSEP>[](symbol){Npart}<LEND>[assign](){=}<LSEP>[](symbol){outcome2}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){N}<LSEP>[](symbol){Npart}<LEND>[assign](){=}<LSEP>[](symbol){outcome3}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){N}<LSEP>[](symbol){Npart}<LEND>[assign](){=}<LSEP>[](symbol){P_typeone_err}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){N}<LSEP>[](symbol){Npart}<LEND>[assign](){=}<LSEP>[](symbol){P_typetwo_err}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){N}<LSEP>[](symbol){Npart}<LEND>[assign](){=}<LSEP>[](symbol){S_typeone_err}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){N}<LSEP>[](symbol){Npart}<LEND>[assign](){=}<LSEP>[](symbol){S_typetwo_err}<LEND>[call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){N}<LSEP>[](symbol){Npart}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){N}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){n}<LSEP>[litteral](real){50.000000}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){p}<LSEP>[litteral](real){8.000000}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){K}<LSEP>[litteral](real){2.000000}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){q1}<LSEP>[litteral](real){1.000000}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){q2}<LSEP>[litteral](real){1.000000}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){GenerateZ}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){n}<LSEP>[](symbol){p}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){n}<LSEP>[](symbol){p}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.500000}<LSEP>[argument 1; litteral](real){0.500000}<LEND>[statement 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){z}<LSEP>[](symbol){n}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){Z}<LEND>[call](){}<LSEP>[](symbol){GenerateZ}<LSEP>[](symbol){n}<LSEP>[](symbol){p}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){GenerateBeta}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){p}<LSEP>[](symbol){k}<LSEP>[](symbol){choice_set}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){b}<LEND>[call](){}<LSEP>[](symbol){sample}<LSEP>[](symbol){choice_set}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){p}<LSEP>[](symbol){k}<LEND>[argument 2; litteral](logical){TRUE}<LEND>[statement 1; call](){}<LSEP>[](symbol){matrix}<LSEP>[](symbol){b}<LSEP>[](symbol){k}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){beta_0}<LEND>[call](){}<LSEP>[](symbol){GenerateBeta}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){GenerateSurvivalData}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){n}<LSEP>[](symbol){p}<LSEP>[](symbol){q1}<LSEP>[](symbol){q2}<LSEP>[](symbol){beta0}<LSEP>[](symbol){Z}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){beta1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta0}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[](symbol){}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){beta2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){beta0}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[](symbol){}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){T1f}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){Y}<LSEP>[](symbol){I}<LSEP>[](symbol){U}<LSEP>[](symbol){Z}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){q1}<LEND>[](symbol){Y}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){I}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LSEP>[](symbol){U}<LEND>[argument 1; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){Z}<LSEP>[](symbol){beta1}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){T2f}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){Y}<LSEP>[](symbol){I}<LSEP>[](symbol){U}<LSEP>[](symbol){Z}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){q2}<LEND>[](symbol){Y}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){I}<LEND>[argument 1; call](){}<LSEP>[](symbol){log}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){U}<LEND>[argument 1; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){%*%}<LSEP>[](symbol){Z}<LSEP>[](symbol){beta2}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){Y1}<LEND>[call](){}<LSEP>[](symbol){rexp}<LSEP>[](symbol){n}<LEND>[statement 5; assign](){=}<LSEP>[](symbol){Y2}<LEND>[call](){}<LSEP>[](symbol){rexp}<LSEP>[](symbol){n}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){I1}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){n}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){q1}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){q1}<LEND>[statement 7; assign](){=}<LSEP>[](symbol){I2}<LEND>[call](){}<LSEP>[](symbol){sample}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){n}<LSEP>[argument 2; litteral](logical){TRUE}<LEND>[argument 3; call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){q2}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){q2}<LEND>[statement 8; assign](){=}<LSEP>[](symbol){U}<LEND>[call](){}<LSEP>[](symbol){runif}<LSEP>[](symbol){n}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){T1}<LEND>[call](){}<LSEP>[](symbol){T1f}<LSEP>[](symbol){Y1}<LSEP>[](symbol){I1}<LSEP>[](symbol){U}<LSEP>[](symbol){Z}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){T2}<LEND>[call](){}<LSEP>[](symbol){T2f}<LSEP>[](symbol){Y2}<LSEP>[](symbol){I2}<LSEP>[](symbol){U}<LSEP>[](symbol){Z}<LEND>[statement 11; assign](){=}<LSEP>[](symbol){status1}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 12; assign](){=}<LSEP>[](symbol){status2}<LEND>[call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){n}<LEND>[statement 13; call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){Z}<LSEP>[](symbol){T1}<LSEP>[](symbol){T2}<LSEP>[](symbol){status1}<LSEP>[](symbol){status2}<LEND>[statement 10; assign](){=}<LSEP>[](symbol){sps}<LEND>[call](){}<LSEP>[](symbol){GenerateSurvivalData}<LSEP>[](symbol){n}<LSEP>[](symbol){p}<LSEP>[](symbol){q1}<LSEP>[](symbol){q2}<LSEP>[](symbol){beta_0}<LSEP>[](symbol){Z}<LEND>[statement 11; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){Npart}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[](symbol){}<LEND>[statement 1; call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){beta_0}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){mse}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){mean}<LEND>[argument 0; call](){}<LSEP>[](symbol){^}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){x}<LSEP>[](symbol){y}<LEND>[argument 1; litteral](real){2.000000}<LEND>[statement 3; call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){survival}<LEND>[statement 4; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){coxph}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){Surv}<LSEP>[](symbol){T1}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){status1}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){X1}<LSEP>[](symbol){X2}<LEND>[](symbol){X3}<LEND>[](symbol){X4}<LEND>[](symbol){X5}<LEND>[](symbol){X6}<LEND>[](symbol){X7}<LEND>[](symbol){X8}<LEND>[](symbol){sps}<LEND>[](symbol){coef}<LEND>[statement 5; call](){}<LSEP>[](symbol){$}<LEND>[argument 0; call](){}<LSEP>[](symbol){coxph}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){Surv}<LSEP>[](symbol){T2}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){status2}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){X1}<LSEP>[](symbol){X2}<LEND>[](symbol){X3}<LEND>[](symbol){X4}<LEND>[](symbol){X5}<LEND>[](symbol){X6}<LEND>[](symbol){X7}<LEND>[](symbol){X8}<LEND>[](symbol){sps}<LEND>[](symbol){coef}<LEND>[statement 6; assign](){=}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){CoxRegression}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[](symbol){K}<LEND>[statement 7; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[statement 8; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){outcome1}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){mse}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){beta_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[statement 9; assign](){=}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){CoxRegression}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[](symbol){K}<LEND>[](symbol){j}<LEND>[statement 10; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[statement 11; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){P_typeone_err}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){beta_0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){beta_0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 12; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){P_typetwo_err}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){beta_0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){beta_0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 13; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){outcome2}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){mse}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){beta_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[statement 14; assign](){=}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){CoxRegression}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){p}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sps}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){p}<LSEP>[](symbol){K}<LEND>[](symbol){K}<LEND>[](symbol){j}<LSEP>[argument 4; litteral](logical){TRUE}<LSEP>[argument 5; litteral](logical){FALSE}<LEND>[statement 15; call](){}<LSEP>[](symbol){print}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[statement 16; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S_typeone_err}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){beta_0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){beta_0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 17; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){S_typetwo_err}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){beta_0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){beta_0}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[statement 18; assign](){=}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){outcome3}<LSEP>[](symbol){i}<LSEP>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){mse}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){beta_0}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){model}<LSEP>[](symbol){Cui_estimator}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){P_typeone_err}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){P_typetwo_err}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){S_typeone_err}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){S_typetwo_err}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){outcome1}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){outcome2}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[](symbol){outcome3}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){P_typeone_err}<LSEP>[argument 1; litteral](str){P_typeone_err}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){P_typetwo_err}<LSEP>[argument 1; litteral](str){P_typetwo_err}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){S_typeone_err}<LSEP>[argument 1; litteral](str){S_typeone_err}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){S_typetwo_err}<LSEP>[argument 1; litteral](str){S_typetwo_err}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){outcome1}<LSEP>[argument 1; litteral](str){outcome1.csv}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){outcome2}<LSEP>[argument 1; litteral](str){outcome2.csv}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){outcome3}<LSEP>[argument 1; litteral](str){outcome3.csv} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){gridExtra}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){42.000000}<LEND>[call](){}<LSEP>[](symbol){setwd}<LSEP>[argument 0; litteral](str){../input}<LEND>[assign](){<-}<LSEP>[](symbol){titanic}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){train.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](str){}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){titanic}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){test.csv}<LSEP>[argument 1; litteral](logical){FALSE}<LSEP>[argument 2; litteral](str){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[litteral](logical){NA}<LEND>[call](){}<LSEP>[](symbol){head}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){titanic}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){titanic}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Sex}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Sex}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){S}<LSEP>[argument 1; litteral](str){Q}<LSEP>[argument 2; litteral](str){C}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Pclass}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Pclass}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[](symbol){j}<LEND>[assign](){<-}<LSEP>[](symbol){g0}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){titanic}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Embarked}<LSEP>[](symbol){Fare}<LEND>[argument 2; call](){}<LSEP>[](symbol){factor}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_boxplot}<LEND>[argument 1; call](){}<LSEP>[](symbol){scale_fill_discrete}<LSEP>[argument 0; litteral](str){Class}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Class 1}<LSEP>[argument 1; litteral](str){Class 2}<LSEP>[argument 2; litteral](str){Class 3}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[litteral](str){S}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Embarked}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Deck}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](str){U}<LEND>[argument 2; call](){}<LSEP>[](symbol){substr}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Cabin}<LEND>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){TicketSize}<LEND>[litteral](real){1.000000}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){titanic}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){TicketSize}<LEND>[](symbol){i}<LEND>[call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Ticket}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Ticket}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Ticket}<LEND>[](symbol){i}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){IndividualFare}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Fare}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){TicketSize}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Name}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){ [A-Z]\\. }<LSEP>[argument 1; litteral](str){ }<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Name}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){^.+, (.+)\\..*$}<LSEP>[argument 1; litteral](str){\\1}<LEND>[argument 2; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Name}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Jonkheer}<LSEP>[argument 1; litteral](str){Don}<LSEP>[argument 2; litteral](str){Dona}<LSEP>[argument 3; litteral](str){the Countess}<LSEP>[argument 4; litteral](str){Sir}<LSEP>[argument 5; litteral](str){Lady}<LEND>[litteral](str){Royalty}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Capt}<LSEP>[argument 1; litteral](str){Col}<LSEP>[argument 2; litteral](str){Major}<LSEP>[argument 3; litteral](str){Rev}<LSEP>[argument 4; litteral](str){Dr}<LEND>[litteral](str){Rank}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Ms}<LEND>[litteral](str){Mrs}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mlle}<LEND>[litteral](str){Miss}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Mme}<LEND>[litteral](str){Mrs}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){3.000000}<LEND>[body; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){j}<LEND>[range; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Pclass}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[](symbol){j}<LEND>[call](){}<LSEP>[](symbol){median}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Pclass}<LEND>[](symbol){i}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[](symbol){j}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){FamilySize}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Parch}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){SibSp}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Mother}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Mother}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){female}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Mother}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Mother}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Wife}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Wife}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){female}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){SibSp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Title}<LEND>[argument 1; litteral](str){Miss}<LEND>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Wife}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Wife}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){FemaleAlone}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){FemaleAlone}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){female}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){SibSp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Parch}<LEND>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){FemaleAlone}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){FemaleAlone}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){ChildWithSiblings}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){ChildWithSiblings}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){SibSp}<LEND>[argument 1; litteral](real){0.000000}<LEND>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){ChildWithSiblings}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){ChildWithSiblings}<LEND>[call](){}<LSEP>[](symbol){sapply}<LSEP>[](symbol){titanic}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[](symbol){titanic_train}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){titanic_test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic}<LEND>[argument 1; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](logical){FALSE}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){g1}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){titanic_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){#56B4E9}<LSEP>[argument 2; litteral](str){#56B4E9}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Overall survivual}<LSEP>[argument 1; litteral](str){Survived}<LSEP>[argument 2; litteral](str){Count}<LEND>[assign](){<-}<LSEP>[](symbol){g2}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){titanic_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){as_labeller}<LEND>[argument 0; call](){}<LSEP>[](symbol){setNames}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Not survived}<LSEP>[argument 1; litteral](str){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){#56B4E9}<LSEP>[argument 2; litteral](str){#56B4E9}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Gender survivual}<LSEP>[argument 1; litteral](str){Gender}<LSEP>[argument 2; litteral](str){Count}<LEND>[assign](){<-}<LSEP>[](symbol){g3}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){titanic_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){as_labeller}<LEND>[argument 0; call](){}<LSEP>[](symbol){setNames}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Not survived}<LSEP>[argument 1; litteral](str){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){#56B4E9}<LSEP>[argument 2; litteral](str){#56B4E9}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Age survivual}<LSEP>[argument 1; litteral](str){Age}<LSEP>[argument 2; litteral](str){Count}<LEND>[assign](){<-}<LSEP>[](symbol){g4}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){titanic_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Age}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Survived}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){as_labeller}<LEND>[argument 0; call](){}<LSEP>[](symbol){setNames}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Not survived}<LSEP>[argument 1; litteral](str){Survived}<LSEP>[argument 2; litteral](str){Female}<LSEP>[argument 3; litteral](str){Male}<LEND>[argument 1; call](){}<LSEP>[](symbol){sort}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){#56B4E9}<LSEP>[argument 2; litteral](str){#56B4E9}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Age and gender survivual}<LSEP>[argument 1; litteral](str){Age}<LSEP>[argument 2; litteral](str){Count}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){g1}<LSEP>[](symbol){g2}<LSEP>[](symbol){g3}<LSEP>[](symbol){g4}<LSEP>[argument 4; litteral](real){2.000000}<LSEP>[argument 5; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){g5}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){titanic_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LSEP>[](symbol){Pclass}<LEND>[](symbol){label_context}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){#56B4E9}<LSEP>[argument 2; litteral](str){#56B4E9}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Class survivual}<LSEP>[argument 1; litteral](str){Survived}<LSEP>[argument 2; litteral](str){Count}<LEND>[assign](){<-}<LSEP>[](symbol){g6}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){ggplot}<LSEP>[](symbol){titanic_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){aes}<LSEP>[](symbol){Sex}<LEND>[argument 1; call](){}<LSEP>[](symbol){facet_grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){.}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Survived}<LEND>[](symbol){label_context}<LEND>[argument 1; call](){}<LSEP>[](symbol){geom_bar}<LSEP>[argument 0; litteral](str){count}<LSEP>[argument 1; litteral](str){#56B4E9}<LSEP>[argument 2; litteral](str){#56B4E9}<LEND>[argument 1; call](){}<LSEP>[](symbol){labs}<LSEP>[argument 0; litteral](str){Class and gender survivual}<LSEP>[argument 1; litteral](str){Gender}<LSEP>[argument 2; litteral](str){Count}<LEND>[call](){}<LSEP>[](symbol){grid.arrange}<LSEP>[](symbol){g5}<LSEP>[](symbol){g6}<LSEP>[argument 2; litteral](real){1.000000}<LSEP>[argument 3; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){training_split}<LEND>[call](){}<LSEP>[](symbol){createDataPartition}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic_train}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](real){0.800000}<LSEP>[argument 2; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){training_set}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic_train}<LSEP>[](symbol){training_split}<LSEP>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){testing_set}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic_train}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){training_split}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){model_fit}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Age}<LEND>[](symbol){SibSp}<LEND>[](symbol){Parch}<LEND>[](symbol){Fare}<LEND>[](symbol){Embarked}<LEND>[](symbol){Title}<LEND>[](symbol){FamilySize}<LEND>[](symbol){TicketSize}<LEND>[](symbol){FemaleAlone}<LEND>[](symbol){Wife}<LEND>[](symbol){Mother}<LEND>[argument 1; litteral](str){rf}<LSEP>[](symbol){training_set}<LEND>[argument 3; call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){15.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){repeatedcv}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){10.000000}<LSEP>[argument 3; litteral](str){grid}<LEND>[assign](){<-}<LSEP>[](symbol){testing_set_predict}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model_fit}<LSEP>[](symbol){testing_set}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Correct}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){testing_set_predict}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[](symbol){accuracy}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Correct}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Correct}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Correct}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Training accuracy (rf):}<LSEP>[](symbol){accuracy}<LEND>[assign](){<-}<LSEP>[](symbol){model_fit}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Age}<LEND>[](symbol){SibSp}<LEND>[](symbol){Parch}<LEND>[](symbol){Fare}<LEND>[](symbol){Embarked}<LEND>[](symbol){Title}<LEND>[](symbol){FamilySize}<LEND>[](symbol){TicketSize}<LEND>[](symbol){FemaleAlone}<LEND>[](symbol){Wife}<LEND>[](symbol){Mother}<LEND>[argument 1; litteral](str){cforest}<LSEP>[](symbol){training_set}<LEND>[argument 3; call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){15.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){repeatedcv}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){10.000000}<LSEP>[argument 3; litteral](str){grid}<LEND>[assign](){<-}<LSEP>[](symbol){testing_set_predict}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model_fit}<LSEP>[](symbol){testing_set}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Correct}<LEND>[call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){testing_set_predict}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Survived}<LEND>[assign](){<-}<LSEP>[](symbol){accuracy}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Correct}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Correct}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){testing_set}<LSEP>[](symbol){Correct}<LEND>[call](){}<LSEP>[](symbol){paste}<LSEP>[argument 0; litteral](str){Training accuracy (cf):}<LSEP>[](symbol){accuracy}<LEND>[assign](){<-}<LSEP>[](symbol){model_fit}<LEND>[call](){}<LSEP>[](symbol){train}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Pclass}<LSEP>[](symbol){Sex}<LEND>[](symbol){Age}<LEND>[](symbol){SibSp}<LEND>[](symbol){Parch}<LEND>[](symbol){Fare}<LEND>[](symbol){Embarked}<LEND>[](symbol){Title}<LEND>[](symbol){FamilySize}<LEND>[](symbol){TicketSize}<LEND>[](symbol){FemaleAlone}<LEND>[](symbol){Wife}<LEND>[](symbol){Mother}<LEND>[argument 1; litteral](str){rf}<LSEP>[](symbol){titanic_train}<LEND>[argument 3; call](){}<LSEP>[](symbol){expand.grid}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){15.000000}<LEND>[argument 4; call](){}<LSEP>[](symbol){trainControl}<LSEP>[argument 0; litteral](str){repeatedcv}<LSEP>[argument 1; litteral](real){3.000000}<LSEP>[argument 2; litteral](real){10.000000}<LSEP>[argument 3; litteral](str){grid}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){titanic_test}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model_fit}<LSEP>[](symbol){titanic_test}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){titanic_test}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[argument 1; litteral](str){results.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){test}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LSEP>[argument 1; litteral](logical){TRUE}<LEND>[call](){}<LSEP>[](symbol){str}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[](symbol){test.survived}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LSEP>[argument 0; litteral](str){None}<LEND>[argument 1; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test}<LSEP>[](symbol){}<LSEP>[](symbol){}<LEND>[assign](){<-}<LSEP>[](symbol){test.surviver}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){test.survived}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){4.000000}<LSEP>[argument 4; litteral](real){5.000000}<LSEP>[argument 5; litteral](real){6.000000}<LSEP>[argument 6; litteral](real){7.000000}<LSEP>[argument 7; litteral](real){8.000000}<LSEP>[argument 8; litteral](real){9.000000}<LSEP>[argument 9; litteral](real){10.000000}<LSEP>[argument 10; litteral](real){11.000000}<LSEP>[argument 11; litteral](real){12.000000}<LEND>[call](){}<LSEP>[](symbol){identical}<LSEP>[](symbol){train}<LSEP>[](symbol){test.surviver} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){dplyr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){tidyr}<LEND>[assign](){<-}<LSEP>[](symbol){path}<LSEP>[litteral](str){../input}<LEND>[assign](){<-}<LSEP>[](symbol){aisles}<LEND>[call](){}<LSEP>[](symbol){fread}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.path}<LSEP>[](symbol){path}<LSEP>[argument 1; litteral](str){aisles.csv}<LEND>[assign](){<-}<LSEP>[](symbol){departments}<LEND>[call](){}<LSEP>[](symbol){fread}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.path}<LSEP>[](symbol){path}<LSEP>[argument 1; litteral](str){departments.csv}<LEND>[assign](){<-}<LSEP>[](symbol){orderp}<LEND>[call](){}<LSEP>[](symbol){fread}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.path}<LSEP>[](symbol){path}<LSEP>[argument 1; litteral](str){order_products__prior.csv}<LEND>[assign](){<-}<LSEP>[](symbol){ordert}<LEND>[call](){}<LSEP>[](symbol){fread}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.path}<LSEP>[](symbol){path}<LSEP>[argument 1; litteral](str){order_products__train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){orders}<LEND>[call](){}<LSEP>[](symbol){fread}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.path}<LSEP>[](symbol){path}<LSEP>[argument 1; litteral](str){orders.csv}<LEND>[assign](){<-}<LSEP>[](symbol){products}<LEND>[call](){}<LSEP>[](symbol){fread}<LEND>[argument 0; call](){}<LSEP>[](symbol){file.path}<LSEP>[](symbol){path}<LSEP>[argument 1; litteral](str){products.csv}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){aisles}<LSEP>[](symbol){aisle}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){aisles}<LSEP>[](symbol){aisle}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){departments}<LSEP>[](symbol){department}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){departments}<LSEP>[](symbol){department}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){orders}<LSEP>[](symbol){eval_set}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){orders}<LSEP>[](symbol){eval_set}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){products}<LSEP>[](symbol){product_name}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){products}<LSEP>[](symbol){product_name}<LEND>[assign](){<-}<LSEP>[](symbol){products}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){products}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LSEP>[](symbol){aisles}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LSEP>[](symbol){departments}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){aisle_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){department_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){aisles}<LSEP>[](symbol){departments}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ordert}<LSEP>[](symbol){user_id}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){orders}<LSEP>[](symbol){user_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){match}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ordert}<LSEP>[](symbol){order_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){orders}<LSEP>[](symbol){order_id}<LEND>[assign](){<-}<LSEP>[](symbol){orders_products}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){orders}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LSEP>[](symbol){orderp}<LSEP>[argument 1; litteral](str){order_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){orderp}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){prd}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){orders_products}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LSEP>[](symbol){user_id}<LSEP>[](symbol){order_number}<LSEP>[](symbol){product_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){user_id}<LSEP>[](symbol){product_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){mutate}<LEND>[argument 0; call](){}<LSEP>[](symbol){row_number}<LEND>[argument 1; call](){}<LSEP>[](symbol){ungroup}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){product_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){reordered}<LEND>[argument 2; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){product_time}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 3; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){product_time}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_reorder_probability}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_second_orders}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_first_orders}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_reorder_times}<LEND>[call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_reorders}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_first_orders}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_reorder_ratio}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_reorders}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){prd}<LSEP>[](symbol){prod_orders}<LEND>[assign](){<-}<LSEP>[](symbol){prd}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){prd}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){prod_reorders}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){prod_first_orders}<LEND>[argument 2; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){prod_second_orders}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){products}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){users}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){orders}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){eval_set}<LSEP>[argument 1; litteral](str){prior}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){user_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){order_number}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){days_since_prior_order}<LSEP>[](symbol){T}<LEND>[argument 2; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){days_since_prior_order}<LSEP>[](symbol){T}<LEND>[assign](){<-}<LSEP>[](symbol){us}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){orders_products}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){user_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){reordered}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LSEP>[](symbol){order_number}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){n_distinct}<LSEP>[](symbol){product_id}<LEND>[assign](){<-}<LSEP>[](symbol){users}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){users}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LSEP>[](symbol){us}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){users}<LSEP>[](symbol){user_average_basket}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){users}<LSEP>[](symbol){user_total_products}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){users}<LSEP>[](symbol){user_orders}<LEND>[assign](){<-}<LSEP>[](symbol){us}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){orders}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LSEP>[](symbol){eval_set}<LSEP>[argument 1; litteral](str){prior}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){user_id}<LSEP>[](symbol){order_id}<LSEP>[](symbol){eval_set}<LSEP>[](symbol){days_since_prior_order}<LEND>[assign](){<-}<LSEP>[](symbol){users}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){users}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LSEP>[](symbol){us}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){us}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){orders_products}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){user_id}<LSEP>[](symbol){product_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){n}<LEND>[argument 1; call](){}<LSEP>[](symbol){min}<LSEP>[](symbol){order_number}<LEND>[argument 2; call](){}<LSEP>[](symbol){max}<LSEP>[](symbol){order_number}<LEND>[argument 3; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){add_to_cart_order}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){orders_products}<LSEP>[](symbol){orders}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LSEP>[](symbol){prd}<LSEP>[argument 1; litteral](str){product_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){inner_join}<LSEP>[](symbol){users}<LSEP>[argument 1; litteral](str){user_id}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){up_order_rate}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){up_orders}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){user_orders}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){up_orders_since_last_order}<LEND>[call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){user_orders}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){up_last_order}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){up_order_rate_since_first_order}<LEND>[call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){up_orders}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){user_orders}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){up_first_order}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){left_join}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){ordert}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LSEP>[](symbol){user_id}<LSEP>[](symbol){product_id}<LSEP>[](symbol){reordered}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){user_id}<LSEP>[argument 1; litteral](str){product_id}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){ordert}<LSEP>[](symbol){prd}<LSEP>[](symbol){users}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){eval_set}<LEND>[argument 1; litteral](str){train}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){eval_set}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){user_id}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){product_id}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){order_id}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){reordered}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){reordered}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){as.data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){data}<LSEP>[](symbol){eval_set}<LEND>[argument 1; litteral](str){test}<LEND>[](symbol){}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){eval_set}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){user_id}<LEND>[litteral](NULL){NULL}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){reordered}<LEND>[litteral](NULL){NULL}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){data}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[assign](){<-}<LSEP>[](symbol){params}<LEND>[call](){}<LSEP>[](symbol){list}<LSEP>[argument 0; litteral](str){reg:logistic}<LSEP>[argument 1; litteral](str){logloss}<LSEP>[argument 2; litteral](real){0.090000}<LSEP>[argument 3; litteral](real){7.000000}<LSEP>[argument 4; litteral](real){9.000000}<LSEP>[argument 5; litteral](real){0.700000}<LSEP>[argument 6; litteral](real){0.760000}<LSEP>[argument 7; litteral](real){0.950000}<LSEP>[argument 8; litteral](real){0.000020}<LSEP>[argument 9; litteral](real){10.000000}<LEND>[assign](){<-}<LSEP>[](symbol){subtrain}<LEND>[call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){train}<LEND>[argument 1; call](){}<LSEP>[](symbol){sample_frac}<LSEP>[argument 0; litteral](real){0.100000}<LEND>[assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){subtrain}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){reordered}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){subtrain}<LSEP>[](symbol){reordered}<LEND>[assign](){<-}<LSEP>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){xgboost}<LSEP>[](symbol){X}<LSEP>[](symbol){params}<LSEP>[argument 2; litteral](real){30.000000}<LEND>[assign](){<-}<LSEP>[](symbol){importance}<LEND>[call](){}<LSEP>[](symbol){xgb.importance}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){X}<LEND>[](symbol){model}<LEND>[call](){}<LSEP>[](symbol){xgb.ggplot.importance}<LSEP>[](symbol){importance}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){X}<LSEP>[](symbol){importance}<LSEP>[](symbol){subtrain}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){X}<LEND>[call](){}<LSEP>[](symbol){xgb.DMatrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){select}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){order_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){product_id}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){reordered}<LEND>[call](){}<LSEP>[](symbol){predict}<LSEP>[](symbol){model}<LSEP>[](symbol){X}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){reordered}<LEND>[call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){reordered}<LEND>[argument 1; litteral](real){0.210000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){test}<LEND>[argument 1; call](){}<LSEP>[](symbol){filter}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){reordered}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){group_by}<LSEP>[](symbol){order_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){summarise}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LSEP>[](symbol){product_id}<LSEP>[argument 1; litteral](str){ }<LEND>[assign](){<-}<LSEP>[](symbol){missing}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){unique}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){order_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){order_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){submission}<LSEP>[](symbol){order_id}<LEND>[argument 1; litteral](str){None}<LEND>[assign](){<-}<LSEP>[](symbol){submission}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){%>%}<LSEP>[](symbol){submission}<LEND>[argument 1; call](){}<LSEP>[](symbol){bind_rows}<LSEP>[](symbol){missing}<LEND>[argument 1; call](){}<LSEP>[](symbol){arrange}<LSEP>[](symbol){order_id}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submission}<LSEP>[argument 1; litteral](str){submit.csv}<LSEP>[](symbol){F} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){packages}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){jsonlite}<LSEP>[argument 1; litteral](str){dplyr}<LSEP>[argument 2; litteral](str){purrr}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){purrr}<LSEP>[](symbol){walk}<LEND>[](symbol){packages}<LSEP>[](symbol){library}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){data.table}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){xgboost}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){caret}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){quanteda}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){lubridate}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){stringr}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Hmisc}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){Matrix}<LEND>[assign](){<-}<LSEP>[](symbol){catNWayAvgCV}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){data}<LSEP>[](symbol){varList}<LSEP>[](symbol){y}<LSEP>[](symbol){pred0}<LSEP>[](symbol){filter}<LSEP>[](symbol){k}<LSEP>[](symbol){f}<LSEP>[](symbol){g}<LSEP>[](symbol){lambda}<LSEP>[](symbol){r_k}<LSEP>[](symbol){cv}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){n}<LEND>[call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){varList}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){varNames}<LEND>[call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){v}<LEND>[argument 1; call](){}<LSEP>[](symbol){seq}<LSEP>[](symbol){n}<LEND>[statement 2; assign](){<-}<LSEP>[](symbol){ind}<LEND>[call](){}<LSEP>[](symbol){unlist}<LSEP>[](symbol){cv}<LSEP>[argument 1; litteral](logical){FALSE}<LEND>[statement 3; assign](){<-}<LSEP>[](symbol){oof}<LSEP>[litteral](NULL){NULL}<LEND>[statement 4; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){cv}<LEND>[argument 1; litteral](real){0.000000}<LEND>[true branch; block](){}<LSEP>[statement 0; control flow](){for}<LSEP>[](symbol){i}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){cv}<LEND>[body; block](){}<LSEP>[statement 0; assign](){<-}<LSEP>[](symbol){sub1}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){varList}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){y}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){pred0}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[](symbol){filter}<LEND>[statement 1; assign](){<-}<LSEP>[](symbol){sub1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sub1}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sub1}<LSEP>[](symbol){filt}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[](symbol){}<LEND>[statement 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sub1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){filt}<LSEP>[argument 1; litteral](NULL){NULL}<LEND>[statement 3; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){sub1}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){varNames}<LSEP>[argument 1; litteral](str){y}<LSEP>[argument 2; litteral](str){pred0}<LEND>[statement 4; assign](){<-}<LSEP>[](symbol){sub2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sub1}<LEND>[argument 1; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cv}<LSEP>[](symbol){i}<LEND>[](symbol){}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){sub1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sub1}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){cv}<LSEP>[](symbol){i}<LEND>[](symbol){}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){sum1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sub1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){varNames}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){tmp1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){sub2}<LSEP>[](symbol){sum1}<LSEP>[](symbol){varNames}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[statement 8; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LSEP>[](symbol){cnt}<LEND>[argument 2; litteral](str){cnt}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[statement 9; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LSEP>[](symbol){sumy}<LEND>[argument 2; litteral](str){sumy}<LSEP>[argument 3; litteral](real){0.000000}<LEND>[statement 10; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){beta}<LSEP>[](symbol){lambda}<LEND>[false branch; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LSEP>[](symbol){cnt}<LEND>[](symbol){k}<LEND>[](symbol){f}<LEND>[statement 11; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){adj_avg}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[](symbol){beta}<LEND>[](symbol){avgY}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LSEP>[](symbol){beta}<LSEP>[](symbol){pred0}<LEND>[statement 12; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp1}<LSEP>[argument 1; litteral](str){avgY}<LEND>[argument 2; litteral](str){avgY}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp1}<LSEP>[argument 1; litteral](str){avgY}<LEND>[](symbol){pred0}<LEND>[statement 13; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp1}<LSEP>[argument 1; litteral](str){adj_avg}<LEND>[argument 2; litteral](str){adj_avg}<LEND>[argument 3; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){tmp1}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){tmp1}<LSEP>[argument 1; litteral](str){adj_avg}<LEND>[](symbol){pred0}<LEND>[statement 14; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){tmp1}<LSEP>[argument 1; litteral](NULL){NULL}<LSEP>[argument 2; litteral](str){adj_avg}<LEND>[argument 3; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){adj_avg}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){runif}<LEND>[argument 0; call](){}<LSEP>[](symbol){nrow}<LSEP>[](symbol){sub2}<LEND>[argument 1; litteral](real){0.500000}<LEND>[](symbol){r_k}<LEND>[statement 15; assign](){<-}<LSEP>[](symbol){oof}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){oof}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){adj_avg}<LEND>[statement 5; assign](){<-}<LSEP>[](symbol){oofInd}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LSEP>[](symbol){ind}<LSEP>[](symbol){oof}<LEND>[statement 6; assign](){<-}<LSEP>[](symbol){oofInd}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){oofInd}<LEND>[argument 1; call](){}<LSEP>[](symbol){order}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){oofInd}<LSEP>[](symbol){ind}<LEND>[](symbol){}<LEND>[statement 7; assign](){<-}<LSEP>[](symbol){sub1}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){varList}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){y}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 2; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){data}<LSEP>[](symbol){}<LSEP>[](symbol){pred0}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[](symbol){filter}<LEND>[statement 8; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){sub1}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[](symbol){varNames}<LSEP>[argument 1; litteral](str){y}<LSEP>[argument 2; litteral](str){pred0}<LSEP>[argument 3; litteral](str){filt}<LEND>[statement 9; assign](){<-}<LSEP>[](symbol){sub2}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sub1}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sub1}<LSEP>[](symbol){filt}<LEND>[](symbol){F}<LEND>[](symbol){}<LEND>[statement 10; assign](){<-}<LSEP>[](symbol){sub1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sub1}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){sub1}<LSEP>[](symbol){filt}<LEND>[](symbol){T}<LEND>[](symbol){}<LEND>[statement 11; assign](){<-}<LSEP>[](symbol){sum1}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){sub1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){list}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){y}<LEND>[argument 1; call](){}<LSEP>[](symbol){mean}<LSEP>[](symbol){y}<LEND>[argument 2; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){y}<LEND>[](symbol){varNames}<LEND>[statement 12; assign](){<-}<LSEP>[](symbol){tmp1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){sub2}<LSEP>[](symbol){sum1}<LSEP>[](symbol){varNames}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[statement 13; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){cnt}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){cnt}<LEND>[litteral](real){0.000000}<LEND>[statement 14; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){sumy}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){sumy}<LEND>[litteral](real){0.000000}<LEND>[statement 15; control flow](){if}<LSEP>[condition; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.null}<LSEP>[](symbol){lambda}<LEND>[true branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){beta}<LEND>[](symbol){lambda}<LEND>[false branch; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){beta}<LEND>[call](){}<LSEP>[](symbol){/}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){g}<LEND>[argument 1; call](){}<LSEP>[](symbol){exp}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){cnt}<LEND>[](symbol){k}<LEND>[](symbol){f}<LEND>[statement 16; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){adj_avg}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){avgY}<LEND>[argument 1; call](){}<LSEP>[](symbol){*}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){beta}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){pred0}<LEND>[statement 17; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){avgY}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){avgY}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){pred0}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){avgY}<LEND>[statement 18; assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){adj_avg}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){adj_avg}<LEND>[call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){pred0}<LEND>[argument 1; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){adj_avg}<LEND>[statement 19; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){oofInd}<LSEP>[](symbol){oof}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){tmp1}<LSEP>[](symbol){adj_avg}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){loading training set}<LEND>[assign](){<-}<LSEP>[](symbol){t1}<LEND>[call](){}<LSEP>[](symbol){fromJSON}<LSEP>[argument 0; litteral](str){../input/train.json}<LEND>[assign](){<-}<LSEP>[](symbol){t1_feats}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){t1}<LSEP>[](symbol){listing_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){t1}<LSEP>[](symbol){features}<LEND>[](symbol){length}<LEND>[argument 1; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){t1}<LSEP>[](symbol){features}<LEND>[assign](){<-}<LSEP>[](symbol){t1_photos}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){t1}<LSEP>[](symbol){listing_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){t1}<LSEP>[](symbol){photos}<LEND>[](symbol){length}<LEND>[argument 1; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){t1}<LSEP>[](symbol){photos}<LEND>[assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){t1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){photos}<LSEP>[argument 1; litteral](str){features}<LEND>[assign](){<-}<LSEP>[](symbol){t1}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){map_at}<LSEP>[](symbol){t1}<LSEP>[](symbol){vars}<LSEP>[](symbol){unlist}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.table}<LSEP>[](symbol){.}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){t1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){set.seed}<LSEP>[argument 0; litteral](real){321.000000}<LEND>[assign](){<-}<LSEP>[](symbol){cvFoldsList}<LEND>[call](){}<LSEP>[](symbol){createFolds}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){t1}<LSEP>[](symbol){interest_level}<LEND>[argument 1; litteral](real){5.000000}<LSEP>[argument 2; litteral](logical){TRUE}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[assign](){<-}<LSEP>[](symbol){class}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){low}<LSEP>[argument 1; litteral](str){medium}<LSEP>[argument 2; litteral](str){high}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LSEP>[argument 1; litteral](real){1.000000}<LSEP>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){t1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){t1}<LSEP>[](symbol){class}<LSEP>[argument 2; litteral](str){interest_level}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[](symbol){F}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){loading test set}<LEND>[assign](){<-}<LSEP>[](symbol){s1}<LEND>[call](){}<LSEP>[](symbol){fromJSON}<LSEP>[argument 0; litteral](str){../input/test.json}<LEND>[assign](){<-}<LSEP>[](symbol){s1_feats}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){s1}<LSEP>[](symbol){listing_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){s1}<LSEP>[](symbol){features}<LEND>[](symbol){length}<LEND>[argument 1; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){s1}<LSEP>[](symbol){features}<LEND>[assign](){<-}<LSEP>[](symbol){s1_photos}<LEND>[call](){}<LSEP>[](symbol){data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){rep}<LEND>[argument 0; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){s1}<LSEP>[](symbol){listing_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){lapply}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){s1}<LSEP>[](symbol){photos}<LEND>[](symbol){length}<LEND>[argument 1; call](){}<LSEP>[](symbol){unlist}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){s1}<LSEP>[](symbol){photos}<LEND>[assign](){<-}<LSEP>[](symbol){vars}<LEND>[call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){names}<LSEP>[](symbol){s1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){photos}<LSEP>[argument 1; litteral](str){features}<LEND>[assign](){<-}<LSEP>[](symbol){s1}<LEND>[call](){}<LSEP>[](symbol){%>%}<LEND>[argument 0; call](){}<LSEP>[](symbol){map_at}<LSEP>[](symbol){s1}<LSEP>[](symbol){vars}<LSEP>[](symbol){unlist}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.data.table}<LSEP>[](symbol){.}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){s1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[argument 0; litteral](str){-1}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; litteral](real){2.000000}<LEND>[assign](){<-}<LSEP>[](symbol){ts1}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){t1}<LSEP>[](symbol){s1}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){t1}<LSEP>[](symbol){s1}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){ts1_feats}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){t1_feats}<LSEP>[](symbol){s1_feats}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){t1_feats}<LSEP>[](symbol){s1_feats}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){ts1_photos}<LEND>[call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){t1_photos}<LSEP>[](symbol){s1_photos}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){t1_photos}<LSEP>[](symbol){s1_photos}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.POSIXct}<LSEP>[](symbol){created}<LEND>[argument 1; litteral](str){A}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){interest_level}<LSEP>[argument 1; litteral](str){low}<LEND>[argument 3; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){interest_level}<LSEP>[argument 1; litteral](str){medium}<LEND>[argument 4; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){interest_level}<LSEP>[argument 1; litteral](str){high}<LEND>[argument 5; call](){}<LSEP>[](symbol){trimws}<LEND>[argument 0; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){display_address}<LEND>[argument 6; call](){}<LSEP>[](symbol){trimws}<LEND>[argument 0; call](){}<LSEP>[](symbol){tolower}<LSEP>[](symbol){street_address}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){interest_level}<LSEP>[argument 1; litteral](str){low}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){filter}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){interest_level}<LSEP>[argument 1; litteral](str){medium}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){filter}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){interest_level}<LSEP>[argument 1; litteral](str){high}<LEND>[argument 1; call](){}<LSEP>[](symbol){sum}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){filter}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1_feats}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LSEP>[](symbol){features}<LEND>[argument 1; call](){}<LSEP>[](symbol){gsub}<LSEP>[argument 0; litteral](str){ }<LSEP>[argument 1; litteral](str){_}<LEND>[argument 2; call](){}<LSEP>[](symbol){paste0}<LSEP>[argument 0; litteral](str){feature_}<LEND>[argument 1; call](){}<LSEP>[](symbol){trimws}<LEND>[argument 0; call](){}<LSEP>[](symbol){char_tolower}<LSEP>[](symbol){features}<LEND>[assign](){<-}<LSEP>[](symbol){feats_summ}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1_feats}<LSEP>[](symbol){}<LSEP>[](symbol){.N}<LSEP>[](symbol){features}<LEND>[assign](){<-}<LSEP>[](symbol){ts1_feats_cast}<LEND>[call](){}<LSEP>[](symbol){dcast.data.table}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1_feats}<LEND>[argument 1; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){features}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){feats_summ}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LSEP>[](symbol){N}<LSEP>[argument 1; litteral](real){10.000000}<LEND>[](symbol){features}<LEND>[argument 1; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){listing_id}<LSEP>[](symbol){features}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){>}<LEND>[argument 0; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 3; litteral](str){features}<LEND>[assign](){<-}<LSEP>[](symbol){ts1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){ts1}<LSEP>[](symbol){ts1_feats_cast}<LSEP>[argument 2; litteral](str){listing_id}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){ts1_feats_cast}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){ts1_photos_summ}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1_photos}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){.N}<LEND>[](symbol){listing_id}<LEND>[assign](){<-}<LSEP>[](symbol){ts1}<LEND>[call](){}<LSEP>[](symbol){merge}<LSEP>[](symbol){ts1}<LSEP>[](symbol){ts1_photos_summ}<LSEP>[argument 2; litteral](str){listing_id}<LSEP>[argument 3; litteral](logical){TRUE}<LSEP>[argument 4; litteral](logical){FALSE}<LEND>[call](){}<LSEP>[](symbol){rm}<LSEP>[](symbol){ts1_photos}<LSEP>[](symbol){ts1_photos_summ}<LEND>[call](){}<LSEP>[](symbol){gc}<LEND>[assign](){<-}<LSEP>[](symbol){build_count}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){.N}<LEND>[](symbol){building_id}<LEND>[assign](){<-}<LSEP>[](symbol){manag_count}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){.N}<LEND>[](symbol){manager_id}<LEND>[assign](){<-}<LSEP>[](symbol){add_count}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){.}<LSEP>[](symbol){.N}<LEND>[](symbol){display_address}<LEND>[call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){ts1}<LSEP>[argument 1; litteral](str){building_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){build_count}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){N}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){building_id}<LEND>[argument 2; litteral](str){building_id}<LSEP>[argument 3; litteral](str){-1}<LEND>[call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){ts1}<LSEP>[argument 1; litteral](str){manager_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){manag_count}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){N}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){manager_id}<LEND>[argument 2; litteral](str){manager_id}<LSEP>[argument 3; litteral](str){-1}<LEND>[call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){%in%}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){ts1}<LSEP>[argument 1; litteral](str){display_address}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){add_count}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){N}<LSEP>[argument 1; litteral](real){1.000000}<LEND>[](symbol){display_address}<LEND>[argument 2; litteral](str){display_address}<LSEP>[argument 3; litteral](str){-1}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){target encoding}<LEND>[assign](){<-}<LSEP>[](symbol){highCard}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){building_id}<LSEP>[argument 1; litteral](str){manager_id}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){highCard}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){highCard}<LSEP>[](symbol){col}<LEND>[argument 1; litteral](str){_mean_med}<LEND>[argument 1; call](){}<LSEP>[](symbol){catNWayAvgCV}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){dummy}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){highCard}<LSEP>[](symbol){col}<LEND>[argument 2; litteral](str){medium}<LSEP>[argument 3; litteral](str){pred0_medium}<LEND>[argument 4; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ts1}<LSEP>[](symbol){filter}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 5; litteral](real){5.000000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){0.010000}<LSEP>[](symbol){cvFoldsList}<LEND>[statement 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste0}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){highCard}<LSEP>[](symbol){col}<LEND>[argument 1; litteral](str){_mean_high}<LEND>[argument 1; call](){}<LSEP>[](symbol){catNWayAvgCV}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){dummy}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){highCard}<LSEP>[](symbol){col}<LEND>[argument 2; litteral](str){high}<LSEP>[argument 3; litteral](str){pred0_high}<LEND>[argument 4; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){ts1}<LSEP>[](symbol){filter}<LEND>[argument 1; litteral](real){0.000000}<LEND>[argument 5; litteral](real){5.000000}<LSEP>[argument 6; litteral](real){1.000000}<LSEP>[argument 7; litteral](real){0.010000}<LSEP>[](symbol){cvFoldsList}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){creating some more features}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){}<LEND>[argument 2; call](){}<LSEP>[](symbol){:=}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){building_id}<LEND>[argument 1; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){display_address}<LEND>[argument 2; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){manager_id}<LEND>[argument 3; call](){}<LSEP>[](symbol){as.integer}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.factor}<LSEP>[](symbol){street_address}<LEND>[argument 4; call](){}<LSEP>[](symbol){str_count}<LSEP>[](symbol){description}<LEND>[argument 5; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.finite}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){price}<LSEP>[](symbol){bedrooms}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){price}<LSEP>[](symbol){bedrooms}<LEND>[argument 6; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.finite}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){price}<LSEP>[](symbol){bathrooms}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){price}<LSEP>[](symbol){bathrooms}<LEND>[argument 7; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.finite}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){price}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){bedrooms}<LSEP>[](symbol){bathrooms}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){price}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){bedrooms}<LSEP>[](symbol){bathrooms}<LEND>[argument 8; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.finite}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){bedrooms}<LSEP>[](symbol){bathrooms}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){price}<LSEP>[](symbol){bathrooms}<LEND>[argument 9; call](){}<LSEP>[](symbol){-}<LSEP>[](symbol){bedrooms}<LSEP>[](symbol){bathrooms}<LEND>[argument 10; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){bedrooms}<LSEP>[](symbol){bathrooms}<LEND>[argument 11; call](){}<LSEP>[](symbol){ifelse}<LEND>[argument 0; call](){}<LSEP>[](symbol){!}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.finite}<LEND>[argument 0; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){bedrooms}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){bedrooms}<LSEP>[](symbol){bathrooms}<LEND>[argument 1; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 2; call](){}<LSEP>[](symbol){/}<LSEP>[](symbol){bedrooms}<LEND>[argument 1; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){bedrooms}<LSEP>[](symbol){bathrooms}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){fill in missing values}<LEND>[control flow](){for}<LSEP>[](symbol){col}<LEND>[range; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){ncol}<LSEP>[](symbol){ts1}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){set}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){is.na}<LEND>[argument 0; call](){}<LSEP>[](symbol){[[}<LSEP>[](symbol){ts1}<LSEP>[](symbol){col}<LEND>[](symbol){col}<LEND>[argument 3; call](){}<LSEP>[](symbol){-}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){get variable names}<LEND>[assign](){<-}<LSEP>[](symbol){varnames}<LEND>[call](){}<LSEP>[](symbol){setdiff}<LEND>[argument 0; call](){}<LSEP>[](symbol){colnames}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){photos}<LSEP>[argument 1; litteral](str){pred0_high}<LSEP>[argument 2; litteral](str){pred0_low}<LSEP>[argument 3; litteral](str){pred0_medium}<LSEP>[argument 4; litteral](str){description}<LSEP>[argument 5; litteral](str){features}<LSEP>[argument 6; litteral](str){interest_level}<LSEP>[argument 7; litteral](str){dummy}<LSEP>[argument 8; litteral](str){filter}<LSEP>[argument 9; litteral](str){created}<LSEP>[argument 10; litteral](str){class}<LSEP>[argument 11; litteral](str){low}<LSEP>[argument 12; litteral](str){medium}<LSEP>[argument 13; litteral](str){high}<LSEP>[argument 14; litteral](str){street}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){converting data to sparse format}<LEND>[assign](){<-}<LSEP>[](symbol){t1_sparse}<LEND>[call](){}<LSEP>[](symbol){Matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){filter}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){varnames}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){s1_sparse}<LEND>[call](){}<LSEP>[](symbol){Matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){as.matrix}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){filter}<LSEP>[argument 1; litteral](real){2.000000}<LEND>[](symbol){varnames}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; litteral](logical){TRUE}<LEND>[assign](){<-}<LSEP>[](symbol){listing_id_test}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){filter}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){2.000000}<LEND>[](symbol){listing_id}<LEND>[assign](){<-}<LSEP>[](symbol){labels}<LEND>[call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){%in%}<LSEP>[](symbol){filter}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[](symbol){class}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){ts1}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LSEP>[](symbol){filter}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[](symbol){varnames}<LSEP>[argument 3; litteral](logical){FALSE}<LEND>[argument 1; litteral](str){train_2.csv}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){WROTEEEEEEEEEEEEEEEEEEEEE}<LEND>[call](){}<LSEP>[](symbol){print}<LSEP>[argument 0; litteral](str){endddd} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){summary}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Age}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Child}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Child}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Age}<LEND>[argument 1; litteral](real){18.000000}<LEND>[litteral](real){1.000000}<LEND>[call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Child}<LSEP>[](symbol){Sex}<LEND>[](symbol){train}<LSEP>[](symbol){sum}<LEND>[call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Child}<LSEP>[](symbol){Sex}<LEND>[](symbol){train}<LSEP>[](symbol){length}<LEND>[call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Child}<LSEP>[](symbol){Sex}<LEND>[](symbol){train}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare2}<LEND>[litteral](str){30+}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare2}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){30.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){20.000000}<LEND>[litteral](str){20-30}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare2}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){20.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){10.000000}<LEND>[litteral](str){10-20}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare2}<LEND>[argument 1; call](){}<LSEP>[](symbol){<}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){10.000000}<LEND>[litteral](str){<10}<LEND>[call](){}<LSEP>[](symbol){aggregate}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){+}<LSEP>[](symbol){Fare2}<LSEP>[](symbol){Pclass}<LEND>[](symbol){Sex}<LEND>[](symbol){train}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; call](){}<LSEP>[](symbol){/}<LEND>[argument 0; call](){}<LSEP>[](symbol){sum}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){length}<LSEP>[](symbol){x}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){female}<LEND>[litteral](real){1.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){&}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Sex}<LEND>[argument 1; litteral](str){female}<LEND>[argument 1; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Pclass}<LEND>[argument 1; litteral](real){3.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){>=}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Fare}<LEND>[argument 1; litteral](real){20.000000}<LEND>[litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[](symbol){submit}<LEND>[call](){}<LSEP>[](symbol){data.frame}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){PassengerId}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){test}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){write.csv}<LSEP>[](symbol){submit}<LSEP>[argument 1; litteral](str){3rdpred.csv}<LSEP>[argument 2; litteral](logical){FALSE} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){randomForest}<LEND>[assign](){<-}<LSEP>[](symbol){train}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/train.csv}<LEND>[assign](){<-}<LSEP>[](symbol){test}<LEND>[call](){}<LSEP>[](symbol){read.csv}<LSEP>[argument 0; litteral](str){../input/test.csv}<LEND>[call](){}<LSEP>[](symbol){summary}<LSEP>[](symbol){train}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){0.000000}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){Survived}<LSEP>[argument 1; litteral](str){Died}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){as.factor}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[assign](){<-}<LSEP>[variable; call](){}<LSEP>[](symbol){levels}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){1st Class}<LSEP>[argument 1; litteral](str){2nd Class}<LSEP>[argument 2; litteral](str){3rd Class}<LEND>[call](){}<LSEP>[](symbol){png}<LSEP>[argument 0; litteral](str){1_survival_by_class.png}<LSEP>[argument 1; litteral](real){800.000000}<LSEP>[argument 2; litteral](real){600.000000}<LEND>[call](){}<LSEP>[](symbol){mosaicplot}<LEND>[argument 0; call](){}<LSEP>[](symbol){~}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Pclass}<LEND>[argument 1; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){train}<LSEP>[](symbol){Survived}<LEND>[argument 1; litteral](str){Passenger Survival by Class}<LEND>[argument 2; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](str){#8dd3c7}<LSEP>[argument 1; litteral](str){#fb8072}<LEND>[argument 3; litteral](logical){FALSE}<LSEP>[argument 4; litteral](str){}<LSEP>[argument 5; litteral](str){}<LEND>[argument 6; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){0.000000}<LEND>[argument 7; litteral](real){1.400000}<LEND>[call](){}<LSEP>[](symbol){dev.off} |
[](){expression}<LSEP>[assign](){<-}<LSEP>[](symbol){rleR}<LEND>[](){function}<LSEP>[](pairlist){}<LSEP>[](symbol){x}<LEND>[body; block](){}<LSEP>[statement 0; assign](){=}<LSEP>[](symbol){x}<LEND>[call](){}<LSEP>[](symbol){sort}<LSEP>[](symbol){x}<LEND>[statement 1; assign](){=}<LSEP>[](symbol){y}<LEND>[call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LEND>[statement 2; assign](){=}<LSEP>[](symbol){runs}<LEND>[call](){}<LSEP>[call name; call](){}<LSEP>[](symbol){::}<LSEP>[](symbol){base}<LSEP>[](symbol){rle}<LEND>[](symbol){y}<LEND>[statement 3; assign](){=}<LSEP>[](symbol){z}<LEND>[call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){[}<LEND>[argument 0; call](){}<LSEP>[](symbol){(}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){runs}<LSEP>[](symbol){lengths}<LEND>[argument 1; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){==}<LEND>[argument 0; call](){}<LSEP>[](symbol){$}<LSEP>[](symbol){runs}<LSEP>[](symbol){values}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 4; assign](){=}<LSEP>[](symbol){indices}<LEND>[call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){[}<LSEP>[](symbol){x}<LEND>[argument 1; call](){}<LSEP>[](symbol){+}<LEND>[argument 0; call](){}<LSEP>[](symbol){which}<LEND>[argument 0; call](){}<LSEP>[](symbol){!=}<LEND>[argument 0; call](){}<LSEP>[](symbol){diff}<LSEP>[](symbol){x}<LEND>[argument 1; litteral](real){1.000000}<LEND>[argument 1; litteral](real){1.000000}<LEND>[statement 5; call](){}<LSEP>[](symbol){return}<LEND>[argument 0; call](){}<LSEP>[](symbol){paste}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){rbind}<LSEP>[](symbol){indices}<LSEP>[](symbol){z}<LEND>[argument 1; litteral](str){ }<LEND>[call](){}<LSEP>[](symbol){rleR}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LEND>[argument 0; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){5.000000}<LEND>[argument 1; call](){}<LSEP>[](symbol){:}<LSEP>[argument 0; litteral](real){10.000000}<LSEP>[argument 1; litteral](real){15.000000}<LEND>[call](){}<LSEP>[](symbol){rleR}<LEND>[argument 0; call](){}<LSEP>[](symbol){c}<LSEP>[argument 0; litteral](real){1.000000}<LSEP>[argument 1; litteral](real){2.000000}<LSEP>[argument 2; litteral](real){3.000000}<LSEP>[argument 3; litteral](real){10.000000}<LSEP>[argument 4; litteral](real){11.000000}<LSEP>[argument 5; litteral](real){12.000000}<LSEP>[argument 6; litteral](real){13.000000}<LSEP>[argument 7; litteral](real){14.000000} |
[](){expression}<LSEP>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){ggplot2}<LEND>[call](){}<LSEP>[](symbol){library}<LSEP>[](symbol){readr}<LEND>[call](){}<LSEP>[](symbol){system}<LSEP>[argument 0; litteral](str){ls ../input}<LEND>[call](){}<LSEP>[](symbol){data} |