library(rwf)
This shows the output of PART RPART functions from rwf.
Installation instructions for rwf can be found here These functions are not
installed by default they are in
/rwf/working_functions/OTHER/ML_TREE_RPART.R
infert_formula<-formula(factor(case)~age+parity+education+spontaneous+induced)
boston_formula<-formula(c("medv~",paste(names(MASS::Boston)[1:13],collapse="+")))
## Warning in formula.character(c("medv~", paste(names(MASS::Boston)[1:13], : Using formula(x) is deprecated when x is a character vector of length > 1.
## Consider formula(paste(x, collapse = " ")) instead.
print(infert_formula)
## factor(case) ~ age + parity + education + spontaneous + induced
print(boston_formula)
## medv ~ crim + zn + indus + chas + nox + rm + age + dis + rad + ## tax + ptratio + black + lstat
# kfolding
train_test_classification<-k_fold(df=infert,
model_formula=infert_formula)
## Fold Cases: 1 Train: 223 Test: 25 Total: 248 Unique Train: 223 Unique Test: 25 ## Fold Cases: 2 Train: 223 Test: 25 Total: 248 Unique Train: 223 Unique Test: 25 ## Fold Cases: 3 Train: 223 Test: 25 Total: 248 Unique Train: 223 Unique Test: 25 ## Fold Cases: 4 Train: 224 Test: 24 Total: 248 Unique Train: 224 Unique Test: 24 ## Fold Cases: 5 Train: 223 Test: 25 Total: 248 Unique Train: 223 Unique Test: 25 ## Fold Cases: 6 Train: 223 Test: 25 Total: 248 Unique Train: 223 Unique Test: 25 ## Fold Cases: 7 Train: 224 Test: 24 Total: 248 Unique Train: 224 Unique Test: 24 ## Fold Cases: 8 Train: 223 Test: 25 Total: 248 Unique Train: 223 Unique Test: 25 ## Fold Cases: 9 Train: 223 Test: 25 Total: 248 Unique Train: 223 Unique Test: 25 ## Fold Cases: 10 Train: 223 Test: 25 Total: 248 Unique Train: 223 Unique Test: 25
train_test_regression<-k_fold(df=MASS::Boston,
model_formula=boston_formula)
## Fold Cases: 1 Train: 455 Test: 51 Total: 506 Unique Train: 455 Unique Test: 51 ## Fold Cases: 2 Train: 455 Test: 51 Total: 506 Unique Train: 455 Unique Test: 51 ## Fold Cases: 3 Train: 456 Test: 50 Total: 506 Unique Train: 456 Unique Test: 50 ## Fold Cases: 4 Train: 455 Test: 51 Total: 506 Unique Train: 455 Unique Test: 51 ## Fold Cases: 5 Train: 456 Test: 50 Total: 506 Unique Train: 456 Unique Test: 50 ## Fold Cases: 6 Train: 455 Test: 51 Total: 506 Unique Train: 455 Unique Test: 51 ## Fold Cases: 7 Train: 456 Test: 50 Total: 506 Unique Train: 456 Unique Test: 50 ## Fold Cases: 8 Train: 455 Test: 51 Total: 506 Unique Train: 455 Unique Test: 51 ## Fold Cases: 9 Train: 456 Test: 50 Total: 506 Unique Train: 456 Unique Test: 50 ## Fold Cases: 10 Train: 455 Test: 51 Total: 506 Unique Train: 455 Unique Test: 51
# srpart models
rtree_classification<-rpart::rpart(infert_formula,
train_test_classification$f$train$f1,
model=TRUE,x=TRUE,y=TRUE)
rtree_regression<-rpart::rpart(boston_formula,
train_test_regression$f$train$f1,
model=TRUE,x=TRUE,y=TRUE)
result<-data.frame(rtree_classification$cptable)
result$nsplit<-factor(result$nsplit+1)
minimun_size<-as.numeric(as.character(result[which.min(result[,"xerror"]),"nsplit"]))
initial_model<-rtree_classification
model<-rpart::prune(rtree_classification,
cp=rtree_classification$cptable[which.min(rtree_classification$cptable[,"xerror"]),"CP"])
importance<-model$variable.importance
importance<-data.frame(names=names(importance),importance=importance)
importance$names<-factor(importance$names,levels=rev(as.character(importance$names)))
plot_importance<-ggplot(importance,aes(x=names,y=importance))+
geom_bar(stat='identity')+
labs(title="Importance Plot",y="Relative Influence",x="Predictor")+
theme_bw(base_size=10)+
scale_x_discrete(limits=rev(levels(names)))+
coord_flip()
plot_importance
rtree_classification
## n= 223 ## ## node), split, n, loss, yval, (yprob) ## * denotes terminal node ## ## 1) root 223 75 0 (0.6636771 0.3363229) ## 2) spontaneous< 0.5 131 26 0 (0.8015267 0.1984733) * ## 3) spontaneous>=0.5 92 43 1 (0.4673913 0.5326087) ## 6) spontaneous< 1.5 58 26 0 (0.5517241 0.4482759) ## 12) parity>=1.5 31 8 0 (0.7419355 0.2580645) ## 24) induced< 0.5 11 0 0 (1.0000000 0.0000000) * ## 25) induced>=0.5 20 8 0 (0.6000000 0.4000000) ## 50) education=12+ yrs 8 1 0 (0.8750000 0.1250000) * ## 51) education=6-11yrs 12 5 1 (0.4166667 0.5833333) * ## 13) parity< 1.5 27 9 1 (0.3333333 0.6666667) * ## 7) spontaneous>=1.5 34 11 1 (0.3235294 0.6764706) ## 14) parity>=3.5 10 4 0 (0.6000000 0.4000000) * ## 15) parity< 3.5 24 5 1 (0.2083333 0.7916667) *
rpart::plotcp(model)
rpart::rsq.rpart(model)
## ## Classification tree: ## rpart::rpart(formula = infert_formula, data = train_test_classification$f$train$f1, ## model = TRUE, x = TRUE, y = TRUE) ## ## Variables actually used in tree construction: ## [1] parity spontaneous ## ## Root node error: 75/223 = 0.33632 ## ## n= 223 ## ## CP nsplit rel error xerror xstd ## 1 0.093333 0 1.00000 1.00000 0.094069 ## 2 0.026667 3 0.72000 0.88000 0.090888 ## 3 0.013333 4 0.69333 0.77333 0.087346
## Warning in rpart::rsq.rpart(model): may not be applicable for this method
error<-data.frame(model$cptable)
error$nsplit<-factor(error$nsplit+1)
tree_size<-error[which.min(error[,"xerror"]),"nsplit"]
error<-reshape2::melt(error,id.vars="nsplit")
names(error)<-c("Split","Metric","value")
plot_prune<-ggplot(error,aes(x=Split,y=value,color=Metric))+
geom_line(aes(group=Metric))+
geom_point()+
labs(title=paste("Error Plot","Suggested Size:",tree_size),y="Metric value",x="Size of Tree")+
theme_bw(base_size=10)
plot_prune
rpart.plot::rpart.plot(model,type=1)
frame<-data.frame(model$frame)
cp<-data.frame(model$cptable)
parameters<-data.frame(parameters=unlist(model$control))
splits<-data.frame(name=row.names(model$splits),model$splits,row.names=NULL)
importance<-data.frame(importance=model$variable.importance)
ordered<-data.frame(ordered=model$ordered)
data<-data.frame(y=model$y,x=model$x,model=model$model)
call<-data.frame(call=call_to_string(model))
result<-list(frame=frame,cp=cp,parameters=parameters,splits=splits,importance=importance,ordered=ordered,call=call)
print(result)
## $frame ## var n wt dev yval complexity ncompete nsurrogate yval2.V1 yval2.V2 yval2.V3 yval2.V4 yval2.V5 yval2.nodeprob ## 1 spontaneous 223 223 75 1 0.09333333 4 3 1.00000000 148.00000000 75.00000000 0.66367713 0.33632287 1.00000000 ## 2131 131 26 1 0.00000000 0 0 1.00000000 105.00000000 26.00000000 0.80152672 0.19847328 0.58744395 ## 3 spontaneous 92 92 43 2 0.09333333 4 3 2.00000000 43.00000000 49.00000000 0.46739130 0.53260870 0.41255605 ## 6 parity 58 58 26 1 0.09333333 3 3 1.00000000 32.00000000 26.00000000 0.55172414 0.44827586 0.26008969 ## 12 31 31 8 1 0.01333333 0 0 1.00000000 23.00000000 8.00000000 0.74193548 0.25806452 0.13901345 ## 13 27 27 9 2 0.00000000 0 0 2.00000000 9.00000000 18.00000000 0.33333333 0.66666667 0.12107623 ## 7 parity 34 34 11 2 0.02666667 3 2 2.00000000 11.00000000 23.00000000 0.32352941 0.67647059 0.15246637 ## 14 10 10 4 1 0.01000000 0 0 1.00000000 6.00000000 4.00000000 0.60000000 0.40000000 0.04484305 ## 15 24 24 5 2 0.00000000 0 0 2.00000000 5.00000000 19.00000000 0.20833333 0.79166667 0.10762332 ## ## $cp ## CP nsplit rel.error xerror xstd ## 1 0.09333333 0 1.0000000 1.0000000 0.09406927 ## 2 0.02666667 3 0.7200000 0.8800000 0.09088832 ## 3 0.01333333 4 0.6933333 0.7733333 0.08734585 ## ## $parameters ## parameters ## minsplit 20.00 ## minbucket 7.00 ## cp 0.01 ## maxcompete 4.00 ## maxsurrogate 5.00 ## usesurrogate 2.00 ## surrogatestyle 0.00 ## maxdepth 30.00 ## xval 10.00 ## ## $splits ## name count ncat improve index adj ## 1 spontaneous 223 -1 12.06783237 0.5 0.00000000 ## 2 parity 223 -1 0.21444673 2.5 0.00000000 ## 3 age 223 -1 0.11411177 33.0 0.00000000 ## 4 education 223 3 0.08490284 1.0 0.00000000 ## 5 induced 223 -1 0.07061948 0.5 0.00000000 ## 6 parity 0 -1 0.64573991 2.5 0.14130435 ## 7 age 0 1 0.59192825 22.0 0.01086957 ## 8 induced 0 1 0.59192825 0.5 0.01086957 ## 9 spontaneous 92 -1 2.23233971 1.5 0.00000000 ## 10 parity 92 1 2.16115534 3.5 0.00000000 ## 11 age 92 -1 2.05434783 37.5 0.00000000 ## 12 education 92 3 0.09276390 2.0 0.00000000 ## 13 induced 92 1 0.01517404 0.5 0.00000000 ## 14 age 0 -1 0.67391304 37.5 0.11764706 ## 15 parity 0 -1 0.67391304 4.5 0.11764706 ## 16 education 0 3 0.65217391 3.0 0.05882353 ## 17 parity 58 1 4.81868743 1.5 0.00000000 ## 18 age 58 -1 0.45207941 30.5 0.00000000 ## 19 induced 58 1 0.14228675 0.5 0.00000000 ## 20 education 58 3 0.13793103 4.0 0.00000000 ## 21 induced 0 1 0.81034483 0.5 0.59259259 ## 22 education 0 3 0.65517241 5.0 0.25925926 ## 23 age 0 1 0.63793103 25.5 0.22222222 ## 24 parity 34 1 2.16568627 3.5 0.00000000 ## 25 age 34 -1 1.11846405 30.5 0.00000000 ## 26 education 34 3 1.11846405 6.0 0.00000000 ## 27 induced 34 -1 0.57547463 0.5 0.00000000 ## 28 education 0 3 0.76470588 7.0 0.20000000 ## 29 induced 0 1 0.73529412 0.5 0.10000000 ## ## $importance ## importance ## spontaneous 14.300172 ## parity 8.952239 ## induced 3.203259 ## education 1.813741 ## age 1.464620 ## ## $ordered ## ordered ## age FALSE ## parity FALSE ## education FALSE ## spontaneous FALSE ## induced FALSE ## ## $call ## call ## 1 rpart::rpart(formula=infert_formula,data=train_test_classification$f$train$f1,,model=TRUE,x=TRUE,y=TRUE)
result<-data.frame(rtree_regression$cptable)
result$nsplit<-factor(result$nsplit+1)
minimun_size<-as.numeric(as.character(result[which.min(result[,"xerror"]),"nsplit"]))
initial_model<-rtree_regression
model<-rpart::prune(rtree_regression,cp=rtree_regression$cptable[which.min(rtree_regression$cptable[,"xerror"]),"CP"])
importance<-model$variable.importance
importance<-data.frame(names=names(importance),importance=importance)
importance$names<-factor(importance$names,levels=rev(as.character(importance$names)))
plot_importance<-ggplot(importance,aes(x=names,y=importance))+
geom_bar(stat='identity')+
labs(title="Importance Plot",y="Relative Influence",x="Predictor")+
theme_bw(base_size=10)+
scale_x_discrete(limits=rev(levels(names)))+
coord_flip()
plot_importance
rtree_regression
## n= 455 ## ## node), split, n, deviance, yval ## * denotes terminal node ## ## 1) root 455 37518.1000 22.77714 ## 2) rm< 7.0105 397 15982.5900 20.38892 ## 4) lstat>=14.4 153 2791.3460 15.16536 ## 8) nox>=0.607 93 1144.4070 13.17204 ## 16) lstat>=19.645 45 326.8520 10.81333 * ## 17) lstat< 19.645 48 332.4867 15.38333 * ## 9) nox< 0.607 60 704.6685 18.25500 * ## 5) lstat< 14.4 244 6398.8200 23.66434 ## 10) lstat>=5.41 214 3854.0590 22.68178 ## 20) lstat>=9.725 107 700.1824 20.99159 * ## 21) lstat< 9.725 107 2542.5360 24.37196 ## 42) age< 89.45 99 1077.6180 23.70404 * ## 43) age>=89.45 8 874.1988 32.63750 * ## 11) lstat< 5.41 30 864.3787 30.67333 * ## 3) rm>=7.0105 58 3772.1660 39.12414 ## 6) rm< 7.437 31 837.2684 33.11935 * ## 7) rm>=7.437 27 533.7407 46.01852 *
rpart::plotcp(model)
rpart::rsq.rpart(model)
## ## Regression tree: ## rpart::rpart(formula = boston_formula, data = train_test_regression$f$train$f1, ## model = TRUE, x = TRUE, y = TRUE) ## ## Variables actually used in tree construction: ## [1] age lstat nox rm ## ## Root node error: 37518/455 = 82.457 ## ## n= 455 ## ## CP nsplit rel error xerror xstd ## 1 0.473461 0 1.00000 1.00312 0.088717 ## 2 0.181044 1 0.52654 0.58030 0.058757 ## 3 0.064000 2 0.34550 0.39662 0.047970 ## 4 0.044789 3 0.28150 0.31518 0.042157 ## 5 0.025115 4 0.23671 0.28337 0.041015 ## 6 0.016295 5 0.21159 0.26362 0.041056 ## 7 0.015745 6 0.19530 0.26679 0.041138 ## 8 0.012929 7 0.17955 0.26516 0.043149 ## 9 0.010000 8 0.16662 0.26008 0.043140
error<-data.frame(model$cptable)
error$nsplit<-factor(error$nsplit+1)
tree_size<-error[which.min(error[,"xerror"]),"nsplit"]
error<-reshape2::melt(error,id.vars="nsplit")
names(error)<-c("Split","Metric","value")
plot_prune<-ggplot(error,aes(x=Split,y=value,color=Metric))+
geom_line(aes(group=Metric))+
geom_point()+
labs(title=paste("Error Plot","Suggested Size:",tree_size),y="Metric value",x="Size of Tree")+
theme_bw(base_size=10)
plot_prune
rpart.plot::rpart.plot(model,type=1)
frame<-data.frame(model$frame)
cp<-data.frame(model$cptable)
parameters<-data.frame(parameters=unlist(model$control))
splits<-data.frame(name=row.names(model$splits),model$splits,row.names=NULL)
importance<-data.frame(importance=model$variable.importance)
ordered<-data.frame(ordered=model$ordered)
data<-data.frame(y=model$y,x=model$x,model=model$model)
call<-data.frame(call=call_to_string(model))
result<-list(frame=frame,cp=cp,parameters=parameters,splits=splits,importance=importance,ordered=ordered,call=call)
print(result)
## $frame ## var n wt dev yval complexity ncompete nsurrogate ## 1 rm 455 455 37518.1023 22.77714 0.473460643 4 5 ## 2 lstat 397 397 15982.5912 20.38892 0.181043939 4 5 ## 4 nox 153 153 2791.3464 15.16536 0.025115092 4 5 ## 8 lstat 93 93 1144.4073 13.17204 0.012928923 4 5 ## 1645 45 326.8520 10.81333 0.010000000 0 0 ## 17 48 48 332.4867 15.38333 0.010000000 0 0 ## 9 60 60 704.6685 18.25500 0.004693425 0 0 ## 5 lstat 244 244 6398.8198 23.66434 0.044788571 4 3 ## 10 lstat 214 214 3854.0589 22.68178 0.016294550 4 5 ## 20 107 107 700.1824 20.99159 0.001963850 0 0 ## 21 age 107 107 2542.5359 24.37196 0.015744900 4 5 ## 42 99 99 1077.6184 23.70404 0.008387714 0 0 ## 43 8 8 874.1988 32.63750 0.010000000 0 0 ## 11 30 30 864.3787 30.67333 0.004038209 0 0 ## 3 rm 58 58 3772.1662 39.12414 0.063999961 4 5 ## 6 31 31 837.2684 33.11935 0.003017580 0 0 ## 7 27 27 533.7407 46.01852 0.004804938 0 0 ## ## $cp ## CP nsplit rel.error xerror xstd ## 1 0.47346064 0 1.0000000 1.0031192 0.08871684 ## 2 0.18104394 1 0.5265394 0.5803040 0.05875669 ## 3 0.06399996 2 0.3454954 0.3966223 0.04796970 ## 4 0.04478857 3 0.2814955 0.3151798 0.04215714 ## 5 0.02511509 4 0.2367069 0.2833655 0.04101530 ## 6 0.01629455 5 0.2115918 0.2636155 0.04105647 ## 7 0.01574490 6 0.1952972 0.2667909 0.04113817 ## 8 0.01292892 7 0.1795523 0.2651643 0.04314947 ## 9 0.01000000 8 0.1666234 0.2600830 0.04313979 ## ## $parameters ## parameters ## minsplit 20.00 ## minbucket 7.00 ## cp 0.01 ## maxcompete 4.00 ## maxsurrogate 5.00 ## usesurrogate 2.00 ## surrogatestyle 0.00 ## maxdepth 30.00 ## xval 10.00 ## ## $splits ## name count ncat improve index adj ## 1 rm 455 -1 0.47346064 7.010500 0.00000000 ## 2 lstat 455 1 0.43594812 9.725000 0.00000000 ## 3 indus 455 1 0.25311926 6.660000 0.00000000 ## 4 ptratio 455 1 0.24122713 19.900000 0.00000000 ## 5 nox 455 1 0.21087719 0.669500 0.00000000 ## 6 lstat 0 1 0.90549451 4.150000 0.25862069 ## 7 ptratio 0 1 0.89890110 14.550000 0.20689655 ## 8 zn 0 -1 0.88131868 87.500000 0.06896552 ## 9 indus 0 1 0.88131868 1.605000 0.06896552 ## 10 crim 0 1 0.87692308 0.013355 0.03448276 ## 11 lstat 397 1 0.42498897 14.400000 0.00000000 ## 12 nox 397 1 0.26514757 0.669500 0.00000000 ## 13 ptratio 397 1 0.22430246 19.900000 0.00000000 ## 14 crim 397 1 0.22018148 5.848030 0.00000000 ## 15 age 397 1 0.20548981 75.750000 0.00000000 ## 16 age 0 1 0.81863980 91.150000 0.52941176 ## 17 tax 0 1 0.77833753 434.500000 0.42483660 ## 18 dis 0 -1 0.77581864 2.239350 0.41830065 ## 19 crim 0 1 0.77329975 4.067905 0.41176471 ## 20 indus 0 1 0.77329975 16.570000 0.41176471 ## 21 nox 153 1 0.33756849 0.607000 0.00000000 ## 22 crim 153 1 0.30454235 6.992370 0.00000000 ## 23 dis 153 -1 0.28243585 2.003700 0.00000000 ## 24 tax 153 1 0.25929100 567.500000 0.00000000 ## 25 lstat 153 1 0.25537353 21.490000 0.00000000 ## 26 indus 0 1 0.88235294 16.010000 0.70000000 ## 27 tax 0 1 0.87581699 397.000000 0.68333333 ## 28 dis 0 -1 0.84967320 2.384050 0.61666667 ## 29 crim 0 1 0.82352941 1.400920 0.55000000 ## 30 rad 0 1 0.75816993 16.000000 0.38333333 ## 31 lstat 93 1 0.42386014 19.645000 0.00000000 ## 32 crim 93 1 0.38301367 11.369150 0.00000000 ## 33 dis 93 -1 0.19498794 2.003700 0.00000000 ## 34 tax 93 1 0.14693985 551.500000 0.00000000 ## 35 rm 93 -1 0.13771335 5.453500 0.00000000 ## 36 dis 0 -1 0.79569892 1.668650 0.57777778 ## 37 crim 0 1 0.73118280 9.084990 0.44444444 ## 38 rm 0 -1 0.73118280 5.586500 0.44444444 ## 39 age 0 1 0.70967742 98.850000 0.40000000 ## 40 nox 0 -1 0.65591398 0.706500 0.28888889 ## 41 lstat 244 1 0.26260815 5.410000 0.00000000 ## 42 rm 244 -1 0.24420279 6.543000 0.00000000 ## 43 dis 244 1 0.11343084 1.611700 0.00000000 ## 44 tax 244 1 0.07857446 222.500000 0.00000000 ## 45 age 244 -1 0.07027078 99.450000 0.00000000 ## 46 zn 0 -1 0.88934426 87.500000 0.10000000 ## 47 crim 0 1 0.88114754 0.014700 0.03333333 ## 48 rm 0 -1 0.88114754 6.797000 0.03333333 ## 49 lstat 214 1 0.15862254 9.725000 0.00000000 ## 50 rm 214 -1 0.13369709 6.544500 0.00000000 ## 51 crim 214 -1 0.11943304 7.247120 0.00000000 ## 52 dis 214 1 0.11435385 1.615600 0.00000000 ## 53 age 214 -1 0.05987248 99.450000 0.00000000 ## 54 nox 0 1 0.71962617 0.519000 0.43925234 ## 55 rm 0 -1 0.70093458 6.260000 0.40186916 ## 56 indus 0 1 0.69626168 7.625000 0.39252336 ## 57 crim 0 1 0.68691589 0.130245 0.37383178 ## 58 dis 0 -1 0.67757009 4.480250 0.35514019 ## 59 age 107 -1 0.23233448 89.450000 0.00000000 ## 60 dis 107 1 0.22810109 2.089100 0.00000000 ## 61 nox 107 -1 0.20573659 0.589000 0.00000000 ## 62 crim 107 -1 0.17012999 1.308150 0.00000000 ## 63 indus 107 -1 0.16559151 16.570000 0.00000000 ## 64 dis 0 1 0.98130841 2.227500 0.75000000 ## 65 nox 0 -1 0.96261682 0.589000 0.50000000 ## 66 ptratio 0 1 0.96261682 14.750000 0.50000000 ## 67 indus 0 -1 0.95327103 18.840000 0.37500000 ## 68 black 0 1 0.95327103 354.295000 0.37500000 ## 69 rm 58 -1 0.63654594 7.437000 0.00000000 ## 70 lstat 58 1 0.39191315 4.680000 0.00000000 ## 71 black 58 1 0.15346650 392.790000 0.00000000 ## 72 ptratio 58 1 0.11944861 14.750000 0.00000000 ## 73 dis 58 1 0.09704531 6.687000 0.00000000 ## 74 lstat 0 1 0.81034483 4.680000 0.59259259 ## 75 black 0 1 0.67241379 391.410000 0.29629630 ## 76 crim 0 -1 0.63793103 0.112760 0.22222222 ## 77 ptratio 0 1 0.62068966 14.750000 0.18518519 ## 78 zn 0 1 0.60344828 27.500000 0.14814815 ## ## $importance ## importance ## rm 20681.7797 ## lstat 15586.0929 ## indus 5143.0136 ## crim 4961.3867 ## ptratio 4415.1929 ## age 4380.7359 ## dis 4362.7553 ## tax 3529.5557 ## zn 1748.8235 ## nox 1646.2937 ## black 932.9735 ## rad 361.2037 ## ## $ordered ## ordered ## crim FALSE ## zn FALSE ## indus FALSE ## chas FALSE ## nox FALSE ## rm FALSE ## age FALSE ## dis FALSE ## rad FALSE ## tax FALSE ## ptratio FALSE ## black FALSE ## lstat FALSE ## ## $call ## call ## 1 rpart::rpart(formula=boston_formula,data=train_test_regression$f$train$f1,,model=TRUE,x=TRUE,y=TRUE)