Call:
rpart(formula = price ~ ., data = data_train, method = "anova")
n= 156
CP nsplit rel error xerror xstd
1 0.66748804 0 1.00000000 1.0108913 0.18358732
2 0.19874312 1 0.33251196 0.3413841 0.03673654
3 0.01975068 2 0.13376884 0.1499870 0.02214728
4 0.01882083 3 0.11401816 0.1438535 0.02136248
5 0.01000000 4 0.09519733 0.1338515 0.02033514
Variable importance
engine_size curb_weight city_mpg horsepower highway_mpg width
22 20 15 13 13 12
length wheel_base
4 1
Node number 1: 156 observations, complexity param=0.667488
mean=12895.28, MSE=5.891084e+07
left son=2 (143 obs) right son=3 (13 obs)
Primary splits:
engine_size < 182 to the left, improve=0.6674880, (0 missing)
curb_weight < 2697.5 to the left, improve=0.5362224, (0 missing)
highway_mpg < 28.5 to the right, improve=0.5099084, (0 missing)
city_mpg < 22.5 to the right, improve=0.5085646, (0 missing)
horsepower < 118 to the left, improve=0.5079888, (0 missing)
Surrogate splits:
curb_weight < 3338 to the left, agree=0.981, adj=0.769, (0 split)
width < 69.25 to the left, agree=0.968, adj=0.615, (0 split)
city_mpg < 16.5 to the right, agree=0.968, adj=0.615, (0 split)
horsepower < 169 to the left, agree=0.962, adj=0.538, (0 split)
highway_mpg < 21 to the right, agree=0.955, adj=0.462, (0 split)
Node number 2: 143 observations, complexity param=0.1987431
mean=11004.58, MSE=1.940408e+07
left son=4 (93 obs) right son=5 (50 obs)
Primary splits:
curb_weight < 2544 to the left, improve=0.6582376, (0 missing)
highway_mpg < 28.5 to the right, improve=0.5964810, (0 missing)
wheel_base < 98.95 to the left, improve=0.5957530, (0 missing)
length < 176.4 to the left, improve=0.5499178, (0 missing)
width < 66.05 to the left, improve=0.5262094, (0 missing)
Surrogate splits:
highway_mpg < 28.5 to the right, agree=0.944, adj=0.84, (0 split)
city_mpg < 22 to the right, agree=0.909, adj=0.74, (0 split)
engine_size < 126 to the left, agree=0.902, adj=0.72, (0 split)
horsepower < 104 to the left, agree=0.888, adj=0.68, (0 split)
length < 178.15 to the left, agree=0.881, adj=0.66, (0 split)
Node number 3: 13 observations
mean=33693, MSE=2.161777e+07
Node number 4: 93 observations, complexity param=0.01975068
mean=8384.097, MSE=4263549
left son=8 (48 obs) right son=9 (45 obs)
Primary splits:
curb_weight < 2216.5 to the left, improve=0.4577704, (0 missing)
horsepower < 83 to the left, improve=0.3937776, (0 missing)
engine_size < 105.5 to the left, improve=0.3843303, (0 missing)
length < 175 to the left, improve=0.3785992, (0 missing)
wheel_base < 98.6 to the left, improve=0.3736707, (0 missing)
Surrogate splits:
length < 167.4 to the left, agree=0.882, adj=0.756, (0 split)
width < 64.5 to the left, agree=0.882, adj=0.756, (0 split)
engine_size < 105.5 to the left, agree=0.882, adj=0.756, (0 split)
wheel_base < 96 to the left, agree=0.871, adj=0.733, (0 split)
city_mpg < 27.5 to the right, agree=0.860, adj=0.711, (0 split)
Node number 5: 50 observations, complexity param=0.01882083
mean=15878.68, MSE=1.103613e+07
left son=10 (25 obs) right son=11 (25 obs)
Primary splits:
wheel_base < 100.8 to the left, improve=0.3134524, (0 missing)
width < 68.6 to the left, improve=0.2351563, (0 missing)
length < 186.65 to the left, improve=0.1914644, (0 missing)
curb_weight < 2697.5 to the left, improve=0.1466294, (0 missing)
peak_rpm < 5275 to the left, improve=0.1203158, (0 missing)
Surrogate splits:
length < 186.65 to the left, agree=0.90, adj=0.80, (0 split)
width < 66.7 to the left, agree=0.86, adj=0.72, (0 split)
curb_weight < 2930.5 to the left, agree=0.80, adj=0.60, (0 split)
bore < 3.66 to the left, agree=0.66, adj=0.32, (0 split)
compression_ratio < 9.405 to the left, agree=0.66, adj=0.32, (0 split)
Node number 8: 48 observations
mean=7031.417, MSE=852175.8
Node number 9: 45 observations
mean=9826.956, MSE=3868779
Node number 10: 25 observations
mean=14018.76, MSE=6810907
Node number 11: 25 observations
mean=17738.6, MSE=8342755