Introduction

This vignette presents a benchmark of the LearnerRegrGRF (Geographical Weighted Random Forest) against standard regression models (such as Featureless, CV_Glmnet and KNN). We evaluate the models using two datasets with spatial coordinates to evaluate our learner.

Setup and datasets

We are using California Housing (subsampled to 200 points) and Income for our two datasets with spatial coordinates. The mlr3spatiotempcv package is also used to define these as Spatio-Temporal regression tasks.

library(mlr3)
library(mlr3spatiotempcv)
library(mlr3learners)
library(mlr3tuning)
library(SpatialML)
library(mlr3learners.spatialML)
library(data.table)
library(ggplot2)
library(future)

task_list <- list()
sample_size_california <- 200
seed_value <- 1

# California Housing Task
california_dt <- mlr3::tsk("california_housing")$data()
california_dt <- california_dt[complete.cases(california_dt), ]

set.seed(seed_value)

california_dt <- california_dt[sample(.N, sample_size_california), ]
california_dt$ocean_proximity <- NULL

task_list[["California"]] <- as_task_regr_st(
  california_dt,
  target = "median_house_value",
  coordinate_names = c("longitude", "latitude"),
  id = "California_Housing"
)

# Income Task
data(Income, package = "SpatialML")
income_df <- as.data.frame(Income)

task_list[["Income"]] <- as_task_regr_st(
  income_df,
  target = "Income01",
  coordinate_names = c("X", "Y"),
  id = "Income"
)

Learners Configuration

As mentionned before, we are comparing four learners: our GRF, a Featureless model, a Linear Model (CV_Glmnet) and a tuned KNN.

grf_bw <- 20
grf_ntree <- 50

# Learners definition
grf_lrn <- lrn("regr.grf", bw = grf_bw, ntree = grf_ntree, id = "GRF")
featureless_lrn <- lrn("regr.featureless", id = "featureless")
cv_glmnet_lrn <- lrn("regr.cv_glmnet", id = "cv_glmnet")

knn_lrn <- lrn("regr.kknn", id = "knn")
knn_lrn$param_set$values$k <- paradox::to_tune(1, 30)
kfoldcv <- mlr3::rsmp("cv")
kfoldcv$param_set$values$folds <- 3

knn_tuned_lrn <- mlr3tuning::auto_tuner(
  learner = knn_lrn,
  tuner = mlr3tuning::tnr("grid_search"),
  resampling = kfoldcv,
  measure = mlr3::msr("regr.rmse")
)

learners <- list(
  grf_lrn, 
  featureless_lrn, 
  knn_tuned_lrn, 
  cv_glmnet_lrn
)

Benchmark

To evaluate the performance, we run the benchmark locally using the future package for parallel processing. This allows us to execute the 5-fold cross-validation across all learners and tasks efficiently.

library(future)

cv <- mlr3::rsmp("cv", folds = 5)
bench_grid <- mlr3::benchmark_grid(
  tasks = task_list, 
  learners = learners, 
  resampling = cv
)

if(require(future)) {
  plan("multisession", workers = 4)
}
bench_results <- suppressWarnings(
  mlr3::benchmark(bench_grid, store_models = FALSE)
)
#> Ranger result
#> 
#> Call:
#>  ranger(median_house_value ~ households + housing_median_age +      median_income + population + total_bedrooms + total_rooms,      data = structure(list(households = c(753, 377, 238, 377,      261, 1634, 463, 259, 596, 556, 1597, 528, 607, 190, 893,      430, 405, 347, 241, 484, 516, 177, 173, 323, 23, 491, 774,      516, 339, 265, 91, 631, 2127, 315, 216, 348, 440, 322, 123,      354, 280, 527, 299, 530, 1772, 391, 137, 516, 272, 411, 416,      305, 288, 150, 715, 817, 297, 509, 1124, 583, 267, 353, 312,      794, 434, 217, 498, 249, 363, 831, 307, 178, 162, 1036, 301,      416, 61, 431, 669, 642, 987, 261, 124, 430, 40, 513, 68,      363, 885, 1243, 426, 1268, 19, 342, 370, 414, 347, 572, 1180,      1909, 518, 137, 437, 509, 462, 706, 267, 390, 222, 147, 315,      196, 1457, 1393, 438, 656, 415, 331, 922, 362, 2221, 504,      557, 117, 503, 151, 583, 140, 581, 455, 319, 473, 332, 133,      312, 235, 654, 563, 316, 1163, 658, 95, 903, 245, 418, 209,      1568, 376, 272, 333, 178, 1944, 287, 860, 297, 325, 1258,      291, 939, 320), housing_median_age = c(29, 35, 33, 37, 37,      16, 43, 42, 6, 32, 35, 43, 35, 9, 24, 52, 10, 10, 31, 32,      34, 52, 45, 33, 41, 23, 20, 32, 42, 32, 16, 13, 30, 29, 35,      31, 36, 19, 41, 37, 42, 15, 52, 22, 13, 44, 35, 16, 52, 18,      15, 16, 35, 25, 15, 26, 29, 19, 23, 50, 37, 38, 52, 10, 17,      34, 41, 52, 22, 15, 36, 37, 16, 27, 31, 22, 10, 30, 20, 18,      20, 23, 38, 27, 38, 37, 27, 32, 17, 30, 32, 24, 41, 43, 13,      30, 52, 25, 24, 16, 29, 49, 43, 47, 30, 13, 41, 32, 38, 36,      29, 36, 31, 5, 34, 14, 45, 37, 19, 17, 6, 16, 32, 21, 30,      19, 35, 20, 35, 29, 47, 50, 45, 33, 37, 43, 7, 30, 43, 10,      11, 26, 34, 36, 24, 44, 21, 25, 19, 46, 21, 25, 23, 25, 33,      43, 35, 16, 18, 46), median_income = c(0.8351, 5.8371, 1.2171,      2.4672, 7.5794, 2.5553, 1.7991, 2.7273, 4.6053, 2.3942, 4.1776,      2.5714, 2.5787, 7.5, 4.2852, 3.3702, 4.3424, 2.7031, 1.7292,      3.7784, 2.8365, 2.2125, 4.2708, 4.0385, 5.25, 2.93, 3.3021,      2.7188, 2.6667, 1.5, 4, 4.2137, 1.51, 4.0313, 7.8543, 2.7243,      1.125, 3.7361, 5.2289, 1.9107, 3.0096, 4.2422, 2.2083, 4.3419,      4.8052, 1.8932, 5.25, 3.668, 6.2223, 2.7344, 11.1121, 6.0198,      4.5595, 7.1472, 1.0617, 2.2577, 1.1818, 3.944, 5.4155, 1.6505,      3.1989, 2.5104, 2, 8.7991, 2.71, 3.8906, 3.6845, 6.07, 1.6488,      7.4678, 4.095, 1.6645, 2.56, 3.3906, 4.0231, 3.725, 2.1964,      4.7917, 2.4211, 5.6345, 3.2388, 5.3994, 1.7386, 5.0822, 2.3942,      2.4394, 5.3946, 2.8365, 3.6619, 2.8889, 7.1198, 4.6649, 2.225,      3.2708, 2.5446, 3.5391, 11.5609, 5.7705, 2.2652, 3.0606,      2.2409, 5.2128, 7.9614, 3.6475, 8.2374, 2.6417, 4.6125, 4.125,      3.6625, 2.2031, 6.6605, 5.0275, 1.9066, 5.305, 5.4727, 4.1862,      2.6667, 2.675, 3.5112, 4.7813, 3.3799, 3.3368, 4.6424, 10.7237,      2.5833, 4.0556, 7.2096, 3.9632, 4.3571, 5.5347, 1.3785, 1.6424,      3.1445, 5.5, 2.5592, 2.81, 4.625, 3.4871, 2.1522, 4.1099,      2.5374, 1.7019, 2.9564, 5.3131, 4.3859, 3.7344, 3.6797, 7.2655,      5.6139, 3.43, 2.125, 4.5592, 6.3199, 4.1865, 4.6713, 1.4189,      6.1724, 3.0739, 1.3375, 3.4643), population = c(2114, 724,      850, 645, 791, 2592, 1687, 799, 1993, 1549, 5380, 1322, 1883,      682, 2315, 784, 818, 643, 600, 1580, 1517, 479, 492, 1412,      61, 1029, 2088, 1337, 1295, 600, 271, 1915, 4123, 724, 701,      681, 1437, 871, 266, 972, 608, 1261, 637, 2491, 4518, 1345,      589, 1696, 588, 999, 1289, 1221, 1134, 486, 2120, 3792, 1054,      1463, 4014, 2247, 939, 882, 1026, 1900, 976, 774, 1666, 696,      1272, 2009, 1225, 842, 355, 3496, 1476, 1395, 161, 1837,      1534, 2381, 1637, 910, 676, 1144, 142, 1134, 195, 1145, 1656,      1910, 793, 3418, 68, 1065, 994, 1500, 1152, 1640, 2421, 5913,      1014, 331, 1033, 1262, 978, 1796, 676, 1199, 637, 425, 859,      639, 5666, 4768, 1422, 1192, 1260, 492, 1807, 1057, 4176,      1370, 1230, 323, 1796, 382, 1305, 448, 1757, 686, 843, 1131,      633, 373, 888, 839, 1932, 2192, 1418, 3176, 1456, 448, 2479,      668, 971, 452, 3240, 1145, 866, 796, 451, 4458, 978, 2725,      795, 1417, 3450, 731, 2707, 870), total_bedrooms = c(867,      428, 288, 377, 285, 1816, 472, 260, 598, 637, 1646, 516,      662, 177, 968, 472, 450, 397, 263, 521, 557, 180, 165, 337,      20, 525, 795, 551, 300, 315, 327, 610, 2446, 355, 223, 348,      513, 328, 141, 385, 256, 567, 309, 581, 1823, 389, 128, 525,      284, 663, 451, 300, 302, 162, 774, 970, 291, 529, 1255, 673,      266, 385, 354, 1157, 453, 215, 514, 239, 358, 892, 301, 221,      147, 1082, 280, 441, 63, 446, 732, 614, 1062, 267, 133, 464,      36, 546, 60, 385, 854, 1312, 504, 1330, 20, 358, 366, 536,      371, 575, 1283, 2043, 545, 136, 449, 565, 499, 847, 269,      384, 221, 166, 327, 193, 1492, 1557, 515, 687, 461, 327,      1092, 386, 4522, 535, 550, 117, 531, 328, 613, 121, 594,      523, 307, 492, 331, 123, 321, 236, 727, 591, 320, 1309, 727,      114, 897, 251, 481, 201, 1634, 393, 268, 337, 194, 2022,      280, 934, 254, 308, 1307, 300, 1021, 303), total_rooms = c(2438,      2067, 1210, 1189, 1795, 6075, 2006, 1276, 3655, 2723, 7067,      2608, 2517, 1302, 4865, 1968, 2296, 1564, 1277, 2892, 2364,      907, 886, 1624, 80, 1906, 3870, 2844, 1411, 1312, 1347, 3252,      5293, 1526, 1293, 1432, 1954, 1621, 685, 1607, 1067, 2298,      1452, 3015, 8918, 1870, 793, 2792, 1621, 2912, 3236, 2240,      1625, 1142, 2422, 2929, 1040, 3038, 7353, 2238, 1053, 2005,      1718, 7374, 2280, 1293, 1904, 1576, 1298, 5480, 1660, 973,      712, 5257, 1205, 2263, 304, 2246, 2572, 3611, 4084, 1310,      512, 2859, 123, 2344, 336, 1950, 4324, 4524, 3152, 7141,      98, 1823, 1524, 2165, 2954, 3715, 4443, 10072, 2030, 792,      2492, 2530, 3652, 4110, 1608, 2399, 1246, 613, 2465, 1072,      6145, 7748, 2765, 2673, 1899, 1127, 4920, 2649, 24121, 2493,      3250, 1034, 2287, 1649, 3737, 804, 2891, 1929, 1375, 2082,      1607, 828, 1477, 1004, 4371, 3199, 1091, 7949, 3835, 411,      3659, 1364, 2139, 1167, 6638, 3004, 1852, 1811, 916, 9042,      1983, 5187, 1379, 798, 8814, 1698, 4289, 1686), median_house_value = c(150000,      500001, 59300, 216700, 500001, 178100, 158800, 128600, 150100,      183100, 265300, 70000, 223000, 423200, 173500, 370000, 160600,      150000, 61700, 164500, 139200, 104000, 267000, 167600, 247200,      183300, 152700, 133700, 164900, 91500, 87500, 151700, 187500,      435200, 281900, 218100, 93800, 201400, 384600, 64700, 180800,      159400, 103900, 176300, 254000, 136100, 190200, 171200, 500001,      91900, 493000, 289600, 164900, 270100, 92400, 173800, 83200,      172500, 213200, 125000, 320800, 120500, 128000, 478500, 97800,      141000, 175800, 261800, 117500, 500001, 184000, 94900, 150000,      237200, 139200, 123500, 112500, 164500, 175000, 231000, 256300,      237900, 52000, 327500, 2e+05, 118300, 71800, 87900, 232400,      335300, 469900, 237800, 212500, 131000, 93800, 55900, 500001,      247100, 269200, 119500, 114200, 238600, 500001, 197100, 500001,      122300, 361700, 264600, 184600, 93800, 220700, 179300, 54600,      311200, 238900, 188900, 320000, 241700, 231900, 326800, 239300,      121200, 312700, 500001, 90600, 133000, 490300, 147100, 199800,      500001, 142300, 108900, 438300, 146200, 70300, 103400, 136800,      136400, 159400, 120100, 97200, 350000, 150500, 314100, 271300,      179800, 271100, 494000, 279500, 292900, 63300, 378800, 236700,      154300, 231800, 141700, 414300, 87200, 59600, 136300)), row.names = c(NA,      -160L), class = "data.frame"), num.trees = 50L, mtry = 2,      importance = "impurity", num.threads = NULL, nodesize = NULL,      maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      160 
#> Number of independent variables:  6 
#> Mtry:                             2 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       7387140477 
#> R squared (OOB):                  0.4976402 
#>         households housing_median_age      median_income         population 
#>       2.060797e+11       1.562586e+11       1.100759e+12       2.600511e+11 
#>     total_bedrooms        total_rooms 
#>       1.975214e+11       2.565310e+11 
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -310700.0  -54208.8   -9683.1     178.7   50551.9  295392.5 
#>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
#> -74020.4  -6563.7  -1035.1   -602.1   3113.8  68844.7 
#>                           Min          Max        Mean         StD
#> households          959898113  65486202832 18284565066 14741632494
#> housing_median_age  873412280  82318349503 20357362400 14846805974
#> median_income      2065640820 158140687538 55585431895 41913084399
#> population         1340845576 128900379282 23229156352 22069866117
#> total_bedrooms      788425049  71623342662 18158202061 14647846658
#> total_rooms        1020627655 115618076856 25200483993 24334432505
#> 
#> Number of Observations: 160
#> Number of Independent Variables: 6
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 1604427066.769
#> R-squared (Not OOB) %: 89.021
#> AIC (Not OOB): 3405.365
#> AICc (Not OOB): 3406.102
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 10213730590.763
#> R-squared (OOB) %: 30.105
#> AIC (OOB): 3701.52
#> AICc (OOB): 3702.257
#> Mean squared error Predicted (Not OOB): 281836882.487
#> R-squared Predicted (Not OOB) %: 98.071
#> AIC Predicted (Not OOB): 3127.094
#> AICc Predicted (Not OOB): 3127.831
#> 
#> Calculation time (in seconds): 4.7094
#> Ranger result
#> 
#> Call:
#>  ranger(median_house_value ~ households + housing_median_age +      median_income + population + total_bedrooms + total_rooms,      data = structure(list(households = c(592, 354, 431, 61, 382,      458, 1283, 315, 188, 592, 429, 391, 51, 1205, 407, 688, 332,      278, 183, 160, 134, 273, 404, 316, 300, 190, 260, 780, 610,      528, 245, 384, 455, 130, 722, 549, 501, 496, 797, 483, 280,      527, 299, 530, 1772, 391, 137, 516, 272, 411, 416, 305, 288,      150, 715, 817, 297, 509, 1124, 583, 267, 353, 312, 794, 434,      217, 498, 249, 363, 831, 307, 178, 162, 1036, 301, 416, 61,      431, 669, 642, 987, 261, 124, 430, 40, 513, 68, 363, 885,      1243, 426, 1268, 19, 342, 370, 414, 347, 572, 1180, 1909,      518, 137, 437, 509, 462, 706, 267, 390, 222, 147, 315, 196,      1457, 1393, 438, 656, 415, 331, 922, 362, 2221, 504, 557,      117, 503, 151, 583, 140, 581, 455, 319, 473, 332, 133, 312,      235, 654, 563, 316, 1163, 658, 95, 903, 245, 418, 209, 1568,      376, 272, 333, 178, 1944, 287, 860, 297, 325, 1258, 291,      939, 320), housing_median_age = c(28, 25, 52, 35, 36, 18,      7, 35, 12, 34, 44, 34, 52, 42, 16, 6, 38, 41, 37, 11, 15,      40, 35, 23, 52, 52, 49, 19, 36, 41, 14, 44, 25, 33, 42, 35,      26, 38, 30, 10, 42, 15, 52, 22, 13, 44, 35, 16, 52, 18, 15,      16, 35, 25, 15, 26, 29, 19, 23, 50, 37, 38, 52, 10, 17, 34,      41, 52, 22, 15, 36, 37, 16, 27, 31, 22, 10, 30, 20, 18, 20,      23, 38, 27, 38, 37, 27, 32, 17, 30, 32, 24, 41, 43, 13, 30,      52, 25, 24, 16, 29, 49, 43, 47, 30, 13, 41, 32, 38, 36, 29,      36, 31, 5, 34, 14, 45, 37, 19, 17, 6, 16, 32, 21, 30, 19,      35, 20, 35, 29, 47, 50, 45, 33, 37, 43, 7, 30, 43, 10, 11,      26, 34, 36, 24, 44, 21, 25, 19, 46, 21, 25, 23, 25, 33, 43,      35, 16, 18, 46), median_income = c(2.5048, 3.35, 2.8333,      2.8056, 3.3906, 4.5272, 2.4079, 4.8359, 7.226, 2.2, 6.987,      5.1207, 1.4886, 6.4752, 2.4754, 5.8151, 3.1734, 4.9125, 3.25,      6.1274, 4.8125, 4.2206, 2.4537, 9.1974, 4.3036, 8.1548, 4.3452,      3.1042, 1.6045, 2.1979, 4.7857, 3.025, 3.256, 5.738, 2.3438,      3.788, 3.1859, 4.0057, 5.4746, 6.4696, 3.0096, 4.2422, 2.2083,      4.3419, 4.8052, 1.8932, 5.25, 3.668, 6.2223, 2.7344, 11.1121,      6.0198, 4.5595, 7.1472, 1.0617, 2.2577, 1.1818, 3.944, 5.4155,      1.6505, 3.1989, 2.5104, 2, 8.7991, 2.71, 3.8906, 3.6845,      6.07, 1.6488, 7.4678, 4.095, 1.6645, 2.56, 3.3906, 4.0231,      3.725, 2.1964, 4.7917, 2.4211, 5.6345, 3.2388, 5.3994, 1.7386,      5.0822, 2.3942, 2.4394, 5.3946, 2.8365, 3.6619, 2.8889, 7.1198,      4.6649, 2.225, 3.2708, 2.5446, 3.5391, 11.5609, 5.7705, 2.2652,      3.0606, 2.2409, 5.2128, 7.9614, 3.6475, 8.2374, 2.6417, 4.6125,      4.125, 3.6625, 2.2031, 6.6605, 5.0275, 1.9066, 5.305, 5.4727,      4.1862, 2.6667, 2.675, 3.5112, 4.7813, 3.3799, 3.3368, 4.6424,      10.7237, 2.5833, 4.0556, 7.2096, 3.9632, 4.3571, 5.5347,      1.3785, 1.6424, 3.1445, 5.5, 2.5592, 2.81, 4.625, 3.4871,      2.1522, 4.1099, 2.5374, 1.7019, 2.9564, 5.3131, 4.3859, 3.7344,      3.6797, 7.2655, 5.6139, 3.43, 2.125, 4.5592, 6.3199, 4.1865,      4.6713, 1.4189, 6.1724, 3.0739, 1.3375, 3.4643), population = c(2623,      1150, 1100, 157, 1076, 1454, 2557, 992, 685, 1127, 1219,      970, 124, 2096, 1428, 2071, 880, 753, 726, 386, 440, 932,      1957, 916, 890, 459, 688, 2317, 2175, 2325, 881, 1091, 1127,      258, 3004, 1312, 1921, 1132, 2568, 1700, 608, 1261, 637,      2491, 4518, 1345, 589, 1696, 588, 999, 1289, 1221, 1134,      486, 2120, 3792, 1054, 1463, 4014, 2247, 939, 882, 1026,      1900, 976, 774, 1666, 696, 1272, 2009, 1225, 842, 355, 3496,      1476, 1395, 161, 1837, 1534, 2381, 1637, 910, 676, 1144,      142, 1134, 195, 1145, 1656, 1910, 793, 3418, 68, 1065, 994,      1500, 1152, 1640, 2421, 5913, 1014, 331, 1033, 1262, 978,      1796, 676, 1199, 637, 425, 859, 639, 5666, 4768, 1422, 1192,      1260, 492, 1807, 1057, 4176, 1370, 1230, 323, 1796, 382,      1305, 448, 1757, 686, 843, 1131, 633, 373, 888, 839, 1932,      2192, 1418, 3176, 1456, 448, 2479, 668, 971, 452, 3240, 1145,      866, 796, 451, 4458, 978, 2725, 795, 1417, 3450, 731, 2707,      870), total_bedrooms = c(607, 362, 591, 71, 399, 522, 1336,      311, 187, 610, 438, 385, 68, 1307, 461, 717, 347, 288, 179,      174, 138, 255, 391, 305, 319, 230, 259, 833, 656, 530, 261,      396, 482, 143, 725, 544, 575, 498, 831, 469, 256, 567, 309,      581, 1823, 389, 128, 525, 284, 663, 451, 300, 302, 162, 774,      970, 291, 529, 1255, 673, 266, 385, 354, 1157, 453, 215,      514, 239, 358, 892, 301, 221, 147, 1082, 280, 441, 63, 446,      732, 614, 1062, 267, 133, 464, 36, 546, 60, 385, 854, 1312,      504, 1330, 20, 358, 366, 536, 371, 575, 1283, 2043, 545,      136, 449, 565, 499, 847, 269, 384, 221, 166, 327, 193, 1492,      1557, 515, 687, 461, 327, 1092, 386, 4522, 535, 550, 117,      531, 328, 613, 121, 594, 523, 307, 492, 331, 123, 321, 236,      727, 591, 320, 1309, 727, 114, 897, 251, 481, 201, 1634,      393, 268, 337, 194, 2022, 280, 934, 254, 308, 1307, 300,      1021, 303), total_rooms = c(2360, 1459, 2359, 321, 1940,      2837, 5178, 1724, 1550, 2352, 2890, 1980, 248, 6297, 2150,      4405, 2012, 1766, 775, 1080, 826, 1410, 1582, 2552, 1729,      1495, 1467, 2644, 2332, 2099, 1463, 1701, 1731, 778, 2729,      3137, 2925, 2662, 4781, 3486, 1067, 2298, 1452, 3015, 8918,      1870, 793, 2792, 1621, 2912, 3236, 2240, 1625, 1142, 2422,      2929, 1040, 3038, 7353, 2238, 1053, 2005, 1718, 7374, 2280,      1293, 1904, 1576, 1298, 5480, 1660, 973, 712, 5257, 1205,      2263, 304, 2246, 2572, 3611, 4084, 1310, 512, 2859, 123,      2344, 336, 1950, 4324, 4524, 3152, 7141, 98, 1823, 1524,      2165, 2954, 3715, 4443, 10072, 2030, 792, 2492, 2530, 3652,      4110, 1608, 2399, 1246, 613, 2465, 1072, 6145, 7748, 2765,      2673, 1899, 1127, 4920, 2649, 24121, 2493, 3250, 1034, 2287,      1649, 3737, 804, 2891, 1929, 1375, 2082, 1607, 828, 1477,      1004, 4371, 3199, 1091, 7949, 3835, 411, 3659, 1364, 2139,      1167, 6638, 3004, 1852, 1811, 916, 9042, 1983, 5187, 1379,      798, 8814, 1698, 4289, 1686), median_house_value = c(1e+05,      237500, 414700, 68100, 147800, 221000, 111400, 195600, 255300,      116500, 500001, 310900, 450000, 500001, 157300, 295600, 181600,      140700, 159200, 315900, 173900, 178000, 91500, 500001, 261800,      500001, 260100, 183100, 57300, 140800, 152500, 162300, 214300,      497600, 154300, 136800, 153100, 241600, 226400, 249500, 180800,      159400, 103900, 176300, 254000, 136100, 190200, 171200, 500001,      91900, 493000, 289600, 164900, 270100, 92400, 173800, 83200,      172500, 213200, 125000, 320800, 120500, 128000, 478500, 97800,      141000, 175800, 261800, 117500, 500001, 184000, 94900, 150000,      237200, 139200, 123500, 112500, 164500, 175000, 231000, 256300,      237900, 52000, 327500, 2e+05, 118300, 71800, 87900, 232400,      335300, 469900, 237800, 212500, 131000, 93800, 55900, 500001,      247100, 269200, 119500, 114200, 238600, 500001, 197100, 500001,      122300, 361700, 264600, 184600, 93800, 220700, 179300, 54600,      311200, 238900, 188900, 320000, 241700, 231900, 326800, 239300,      121200, 312700, 500001, 90600, 133000, 490300, 147100, 199800,      500001, 142300, 108900, 438300, 146200, 70300, 103400, 136800,      136400, 159400, 120100, 97200, 350000, 150500, 314100, 271300,      179800, 271100, 494000, 279500, 292900, 63300, 378800, 236700,      154300, 231800, 141700, 414300, 87200, 59600, 136300)), row.names = c(NA,      -160L), class = "data.frame"), num.trees = 50L, mtry = 2,      importance = "impurity", num.threads = NULL, nodesize = NULL,      maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      160 
#> Number of independent variables:  6 
#> Mtry:                             2 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       7285815193 
#> R squared (OOB):                  0.5331651 
#>         households housing_median_age      median_income         population 
#>       1.879083e+11       2.114460e+11       1.206817e+12       2.676443e+11 
#>     total_bedrooms        total_rooms 
#>       1.807950e+11       2.584922e+11 
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#> -252428  -59634  -10212    2743   48022  336325 
#>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
#> -72567.6  -6781.4   -990.4   -182.9   4976.5  82617.7 
#>                           Min          Max        Mean         StD
#> households          830898624  90128147345 22265634245 19083196569
#> housing_median_age  663217797  86072091573 20611695179 15239737367
#> median_income      3193454796 212557587346 58021348503 46524673262
#> population          444010868 145361793593 26303965865 25845647855
#> total_bedrooms     1374821984  69273104897 21204691844 16855074850
#> total_rooms         688834488 133461652796 30569742114 27282905567
#> 
#> Number of Observations: 160
#> Number of Independent Variables: 6
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 1499365355.87
#> R-squared (Not OOB) %: 90.332
#> AIC (Not OOB): 3394.529
#> AICc (Not OOB): 3395.266
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 12025691027.817
#> R-squared (OOB) %: 22.461
#> AIC (OOB): 3727.65
#> AICc (OOB): 3728.387
#> Mean squared error Predicted (Not OOB): 287055634.962
#> R-squared Predicted (Not OOB) %: 98.149
#> AIC Predicted (Not OOB): 3130.03
#> AICc Predicted (Not OOB): 3130.767
#> 
#> Calculation time (in seconds): 4.5781
#> Ranger result
#> 
#> Call:
#>  ranger(median_house_value ~ households + housing_median_age +      median_income + population + total_bedrooms + total_rooms,      data = structure(list(households = c(592, 354, 431, 61, 382,      458, 1283, 315, 188, 592, 429, 391, 51, 1205, 407, 688, 332,      278, 183, 160, 134, 273, 404, 316, 300, 190, 260, 780, 610,      528, 245, 384, 455, 130, 722, 549, 501, 496, 797, 483, 753,      377, 238, 377, 261, 1634, 463, 259, 596, 556, 1597, 528,      607, 190, 893, 430, 405, 347, 241, 484, 516, 177, 173, 323,      23, 491, 774, 516, 339, 265, 91, 631, 2127, 315, 216, 348,      440, 322, 123, 354, 987, 261, 124, 430, 40, 513, 68, 363,      885, 1243, 426, 1268, 19, 342, 370, 414, 347, 572, 1180,      1909, 518, 137, 437, 509, 462, 706, 267, 390, 222, 147, 315,      196, 1457, 1393, 438, 656, 415, 331, 922, 362, 2221, 504,      557, 117, 503, 151, 583, 140, 581, 455, 319, 473, 332, 133,      312, 235, 654, 563, 316, 1163, 658, 95, 903, 245, 418, 209,      1568, 376, 272, 333, 178, 1944, 287, 860, 297, 325, 1258,      291, 939, 320), housing_median_age = c(28, 25, 52, 35, 36,      18, 7, 35, 12, 34, 44, 34, 52, 42, 16, 6, 38, 41, 37, 11,      15, 40, 35, 23, 52, 52, 49, 19, 36, 41, 14, 44, 25, 33, 42,      35, 26, 38, 30, 10, 29, 35, 33, 37, 37, 16, 43, 42, 6, 32,      35, 43, 35, 9, 24, 52, 10, 10, 31, 32, 34, 52, 45, 33, 41,      23, 20, 32, 42, 32, 16, 13, 30, 29, 35, 31, 36, 19, 41, 37,      20, 23, 38, 27, 38, 37, 27, 32, 17, 30, 32, 24, 41, 43, 13,      30, 52, 25, 24, 16, 29, 49, 43, 47, 30, 13, 41, 32, 38, 36,      29, 36, 31, 5, 34, 14, 45, 37, 19, 17, 6, 16, 32, 21, 30,      19, 35, 20, 35, 29, 47, 50, 45, 33, 37, 43, 7, 30, 43, 10,      11, 26, 34, 36, 24, 44, 21, 25, 19, 46, 21, 25, 23, 25, 33,      43, 35, 16, 18, 46), median_income = c(2.5048, 3.35, 2.8333,      2.8056, 3.3906, 4.5272, 2.4079, 4.8359, 7.226, 2.2, 6.987,      5.1207, 1.4886, 6.4752, 2.4754, 5.8151, 3.1734, 4.9125, 3.25,      6.1274, 4.8125, 4.2206, 2.4537, 9.1974, 4.3036, 8.1548, 4.3452,      3.1042, 1.6045, 2.1979, 4.7857, 3.025, 3.256, 5.738, 2.3438,      3.788, 3.1859, 4.0057, 5.4746, 6.4696, 0.8351, 5.8371, 1.2171,      2.4672, 7.5794, 2.5553, 1.7991, 2.7273, 4.6053, 2.3942, 4.1776,      2.5714, 2.5787, 7.5, 4.2852, 3.3702, 4.3424, 2.7031, 1.7292,      3.7784, 2.8365, 2.2125, 4.2708, 4.0385, 5.25, 2.93, 3.3021,      2.7188, 2.6667, 1.5, 4, 4.2137, 1.51, 4.0313, 7.8543, 2.7243,      1.125, 3.7361, 5.2289, 1.9107, 3.2388, 5.3994, 1.7386, 5.0822,      2.3942, 2.4394, 5.3946, 2.8365, 3.6619, 2.8889, 7.1198, 4.6649,      2.225, 3.2708, 2.5446, 3.5391, 11.5609, 5.7705, 2.2652, 3.0606,      2.2409, 5.2128, 7.9614, 3.6475, 8.2374, 2.6417, 4.6125, 4.125,      3.6625, 2.2031, 6.6605, 5.0275, 1.9066, 5.305, 5.4727, 4.1862,      2.6667, 2.675, 3.5112, 4.7813, 3.3799, 3.3368, 4.6424, 10.7237,      2.5833, 4.0556, 7.2096, 3.9632, 4.3571, 5.5347, 1.3785, 1.6424,      3.1445, 5.5, 2.5592, 2.81, 4.625, 3.4871, 2.1522, 4.1099,      2.5374, 1.7019, 2.9564, 5.3131, 4.3859, 3.7344, 3.6797, 7.2655,      5.6139, 3.43, 2.125, 4.5592, 6.3199, 4.1865, 4.6713, 1.4189,      6.1724, 3.0739, 1.3375, 3.4643), population = c(2623, 1150,      1100, 157, 1076, 1454, 2557, 992, 685, 1127, 1219, 970, 124,      2096, 1428, 2071, 880, 753, 726, 386, 440, 932, 1957, 916,      890, 459, 688, 2317, 2175, 2325, 881, 1091, 1127, 258, 3004,      1312, 1921, 1132, 2568, 1700, 2114, 724, 850, 645, 791, 2592,      1687, 799, 1993, 1549, 5380, 1322, 1883, 682, 2315, 784,      818, 643, 600, 1580, 1517, 479, 492, 1412, 61, 1029, 2088,      1337, 1295, 600, 271, 1915, 4123, 724, 701, 681, 1437, 871,      266, 972, 1637, 910, 676, 1144, 142, 1134, 195, 1145, 1656,      1910, 793, 3418, 68, 1065, 994, 1500, 1152, 1640, 2421, 5913,      1014, 331, 1033, 1262, 978, 1796, 676, 1199, 637, 425, 859,      639, 5666, 4768, 1422, 1192, 1260, 492, 1807, 1057, 4176,      1370, 1230, 323, 1796, 382, 1305, 448, 1757, 686, 843, 1131,      633, 373, 888, 839, 1932, 2192, 1418, 3176, 1456, 448, 2479,      668, 971, 452, 3240, 1145, 866, 796, 451, 4458, 978, 2725,      795, 1417, 3450, 731, 2707, 870), total_bedrooms = c(607,      362, 591, 71, 399, 522, 1336, 311, 187, 610, 438, 385, 68,      1307, 461, 717, 347, 288, 179, 174, 138, 255, 391, 305, 319,      230, 259, 833, 656, 530, 261, 396, 482, 143, 725, 544, 575,      498, 831, 469, 867, 428, 288, 377, 285, 1816, 472, 260, 598,      637, 1646, 516, 662, 177, 968, 472, 450, 397, 263, 521, 557,      180, 165, 337, 20, 525, 795, 551, 300, 315, 327, 610, 2446,      355, 223, 348, 513, 328, 141, 385, 1062, 267, 133, 464, 36,      546, 60, 385, 854, 1312, 504, 1330, 20, 358, 366, 536, 371,      575, 1283, 2043, 545, 136, 449, 565, 499, 847, 269, 384,      221, 166, 327, 193, 1492, 1557, 515, 687, 461, 327, 1092,      386, 4522, 535, 550, 117, 531, 328, 613, 121, 594, 523, 307,      492, 331, 123, 321, 236, 727, 591, 320, 1309, 727, 114, 897,      251, 481, 201, 1634, 393, 268, 337, 194, 2022, 280, 934,      254, 308, 1307, 300, 1021, 303), total_rooms = c(2360, 1459,      2359, 321, 1940, 2837, 5178, 1724, 1550, 2352, 2890, 1980,      248, 6297, 2150, 4405, 2012, 1766, 775, 1080, 826, 1410,      1582, 2552, 1729, 1495, 1467, 2644, 2332, 2099, 1463, 1701,      1731, 778, 2729, 3137, 2925, 2662, 4781, 3486, 2438, 2067,      1210, 1189, 1795, 6075, 2006, 1276, 3655, 2723, 7067, 2608,      2517, 1302, 4865, 1968, 2296, 1564, 1277, 2892, 2364, 907,      886, 1624, 80, 1906, 3870, 2844, 1411, 1312, 1347, 3252,      5293, 1526, 1293, 1432, 1954, 1621, 685, 1607, 4084, 1310,      512, 2859, 123, 2344, 336, 1950, 4324, 4524, 3152, 7141,      98, 1823, 1524, 2165, 2954, 3715, 4443, 10072, 2030, 792,      2492, 2530, 3652, 4110, 1608, 2399, 1246, 613, 2465, 1072,      6145, 7748, 2765, 2673, 1899, 1127, 4920, 2649, 24121, 2493,      3250, 1034, 2287, 1649, 3737, 804, 2891, 1929, 1375, 2082,      1607, 828, 1477, 1004, 4371, 3199, 1091, 7949, 3835, 411,      3659, 1364, 2139, 1167, 6638, 3004, 1852, 1811, 916, 9042,      1983, 5187, 1379, 798, 8814, 1698, 4289, 1686), median_house_value = c(1e+05,      237500, 414700, 68100, 147800, 221000, 111400, 195600, 255300,      116500, 500001, 310900, 450000, 500001, 157300, 295600, 181600,      140700, 159200, 315900, 173900, 178000, 91500, 500001, 261800,      500001, 260100, 183100, 57300, 140800, 152500, 162300, 214300,      497600, 154300, 136800, 153100, 241600, 226400, 249500, 150000,      500001, 59300, 216700, 500001, 178100, 158800, 128600, 150100,      183100, 265300, 70000, 223000, 423200, 173500, 370000, 160600,      150000, 61700, 164500, 139200, 104000, 267000, 167600, 247200,      183300, 152700, 133700, 164900, 91500, 87500, 151700, 187500,      435200, 281900, 218100, 93800, 201400, 384600, 64700, 256300,      237900, 52000, 327500, 2e+05, 118300, 71800, 87900, 232400,      335300, 469900, 237800, 212500, 131000, 93800, 55900, 500001,      247100, 269200, 119500, 114200, 238600, 500001, 197100, 500001,      122300, 361700, 264600, 184600, 93800, 220700, 179300, 54600,      311200, 238900, 188900, 320000, 241700, 231900, 326800, 239300,      121200, 312700, 500001, 90600, 133000, 490300, 147100, 199800,      500001, 142300, 108900, 438300, 146200, 70300, 103400, 136800,      136400, 159400, 120100, 97200, 350000, 150500, 314100, 271300,      179800, 271100, 494000, 279500, 292900, 63300, 378800, 236700,      154300, 231800, 141700, 414300, 87200, 59600, 136300)), row.names = c(NA,      -160L), class = "data.frame"), num.trees = 50L, mtry = 2,      importance = "impurity", num.threads = NULL, nodesize = NULL,      maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      160 
#> Number of independent variables:  6 
#> Mtry:                             2 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       8207257917 
#> R squared (OOB):                  0.476206 
#>         households housing_median_age      median_income         population 
#>       2.422416e+11       2.664048e+11       1.185023e+12       2.790507e+11 
#>     total_bedrooms        total_rooms 
#>       1.934816e+11       2.627261e+11 
#>       Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
#> -301400.00  -56739.32   -3630.00     -20.38   53377.19  319927.19 
#>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
#> -55428.3  -6431.8  -1625.9    335.2   4145.6  56595.9 
#>                           Min          Max        Mean         StD
#> households         1036528185  72917356219 22193652045 17155632959
#> housing_median_age 1395111367  84901902121 22020572045 16811709634
#> median_income      2611527952 167645275173 54006787119 40354243215
#> population         1251747854  76834389764 24257255168 18314400062
#> total_bedrooms      993225920  85010874624 22086112963 17982119684
#> total_rooms        1461092190  91488098338 24649076168 18602675359
#> 
#> Number of Observations: 160
#> Number of Independent Variables: 6
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 1551418785.817
#> R-squared (Not OOB) %: 90.036
#> AIC (Not OOB): 3399.99
#> AICc (Not OOB): 3400.727
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 11064703654.196
#> R-squared (OOB) %: 28.94
#> AIC (OOB): 3714.324
#> AICc (OOB): 3715.061
#> Mean squared error Predicted (Not OOB): 297266632.507
#> R-squared Predicted (Not OOB) %: 98.091
#> AIC Predicted (Not OOB): 3135.622
#> AICc Predicted (Not OOB): 3136.359
#> 
#> Calculation time (in seconds): 18.3775
#> Ranger result
#> 
#> Call:
#>  ranger(median_house_value ~ households + housing_median_age +      median_income + population + total_bedrooms + total_rooms,      data = structure(list(households = c(592, 354, 431, 61, 382,      458, 1283, 315, 188, 592, 429, 391, 51, 1205, 407, 688, 332,      278, 183, 160, 134, 273, 404, 316, 300, 190, 260, 780, 610,      528, 245, 384, 455, 130, 722, 549, 501, 496, 797, 483, 753,      377, 238, 377, 261, 1634, 463, 259, 596, 556, 1597, 528,      607, 190, 893, 430, 405, 347, 241, 484, 516, 177, 173, 323,      23, 491, 774, 516, 339, 265, 91, 631, 2127, 315, 216, 348,      440, 322, 123, 354, 280, 527, 299, 530, 1772, 391, 137, 516,      272, 411, 416, 305, 288, 150, 715, 817, 297, 509, 1124, 583,      267, 353, 312, 794, 434, 217, 498, 249, 363, 831, 307, 178,      162, 1036, 301, 416, 61, 431, 669, 642, 2221, 504, 557, 117,      503, 151, 583, 140, 581, 455, 319, 473, 332, 133, 312, 235,      654, 563, 316, 1163, 658, 95, 903, 245, 418, 209, 1568, 376,      272, 333, 178, 1944, 287, 860, 297, 325, 1258, 291, 939,      320), housing_median_age = c(28, 25, 52, 35, 36, 18, 7, 35,      12, 34, 44, 34, 52, 42, 16, 6, 38, 41, 37, 11, 15, 40, 35,      23, 52, 52, 49, 19, 36, 41, 14, 44, 25, 33, 42, 35, 26, 38,      30, 10, 29, 35, 33, 37, 37, 16, 43, 42, 6, 32, 35, 43, 35,      9, 24, 52, 10, 10, 31, 32, 34, 52, 45, 33, 41, 23, 20, 32,      42, 32, 16, 13, 30, 29, 35, 31, 36, 19, 41, 37, 42, 15, 52,      22, 13, 44, 35, 16, 52, 18, 15, 16, 35, 25, 15, 26, 29, 19,      23, 50, 37, 38, 52, 10, 17, 34, 41, 52, 22, 15, 36, 37, 16,      27, 31, 22, 10, 30, 20, 18, 6, 16, 32, 21, 30, 19, 35, 20,      35, 29, 47, 50, 45, 33, 37, 43, 7, 30, 43, 10, 11, 26, 34,      36, 24, 44, 21, 25, 19, 46, 21, 25, 23, 25, 33, 43, 35, 16,      18, 46), median_income = c(2.5048, 3.35, 2.8333, 2.8056,      3.3906, 4.5272, 2.4079, 4.8359, 7.226, 2.2, 6.987, 5.1207,      1.4886, 6.4752, 2.4754, 5.8151, 3.1734, 4.9125, 3.25, 6.1274,      4.8125, 4.2206, 2.4537, 9.1974, 4.3036, 8.1548, 4.3452, 3.1042,      1.6045, 2.1979, 4.7857, 3.025, 3.256, 5.738, 2.3438, 3.788,      3.1859, 4.0057, 5.4746, 6.4696, 0.8351, 5.8371, 1.2171, 2.4672,      7.5794, 2.5553, 1.7991, 2.7273, 4.6053, 2.3942, 4.1776, 2.5714,      2.5787, 7.5, 4.2852, 3.3702, 4.3424, 2.7031, 1.7292, 3.7784,      2.8365, 2.2125, 4.2708, 4.0385, 5.25, 2.93, 3.3021, 2.7188,      2.6667, 1.5, 4, 4.2137, 1.51, 4.0313, 7.8543, 2.7243, 1.125,      3.7361, 5.2289, 1.9107, 3.0096, 4.2422, 2.2083, 4.3419, 4.8052,      1.8932, 5.25, 3.668, 6.2223, 2.7344, 11.1121, 6.0198, 4.5595,      7.1472, 1.0617, 2.2577, 1.1818, 3.944, 5.4155, 1.6505, 3.1989,      2.5104, 2, 8.7991, 2.71, 3.8906, 3.6845, 6.07, 1.6488, 7.4678,      4.095, 1.6645, 2.56, 3.3906, 4.0231, 3.725, 2.1964, 4.7917,      2.4211, 5.6345, 3.3799, 3.3368, 4.6424, 10.7237, 2.5833,      4.0556, 7.2096, 3.9632, 4.3571, 5.5347, 1.3785, 1.6424, 3.1445,      5.5, 2.5592, 2.81, 4.625, 3.4871, 2.1522, 4.1099, 2.5374,      1.7019, 2.9564, 5.3131, 4.3859, 3.7344, 3.6797, 7.2655, 5.6139,      3.43, 2.125, 4.5592, 6.3199, 4.1865, 4.6713, 1.4189, 6.1724,      3.0739, 1.3375, 3.4643), population = c(2623, 1150, 1100,      157, 1076, 1454, 2557, 992, 685, 1127, 1219, 970, 124, 2096,      1428, 2071, 880, 753, 726, 386, 440, 932, 1957, 916, 890,      459, 688, 2317, 2175, 2325, 881, 1091, 1127, 258, 3004, 1312,      1921, 1132, 2568, 1700, 2114, 724, 850, 645, 791, 2592, 1687,      799, 1993, 1549, 5380, 1322, 1883, 682, 2315, 784, 818, 643,      600, 1580, 1517, 479, 492, 1412, 61, 1029, 2088, 1337, 1295,      600, 271, 1915, 4123, 724, 701, 681, 1437, 871, 266, 972,      608, 1261, 637, 2491, 4518, 1345, 589, 1696, 588, 999, 1289,      1221, 1134, 486, 2120, 3792, 1054, 1463, 4014, 2247, 939,      882, 1026, 1900, 976, 774, 1666, 696, 1272, 2009, 1225, 842,      355, 3496, 1476, 1395, 161, 1837, 1534, 2381, 4176, 1370,      1230, 323, 1796, 382, 1305, 448, 1757, 686, 843, 1131, 633,      373, 888, 839, 1932, 2192, 1418, 3176, 1456, 448, 2479, 668,      971, 452, 3240, 1145, 866, 796, 451, 4458, 978, 2725, 795,      1417, 3450, 731, 2707, 870), total_bedrooms = c(607, 362,      591, 71, 399, 522, 1336, 311, 187, 610, 438, 385, 68, 1307,      461, 717, 347, 288, 179, 174, 138, 255, 391, 305, 319, 230,      259, 833, 656, 530, 261, 396, 482, 143, 725, 544, 575, 498,      831, 469, 867, 428, 288, 377, 285, 1816, 472, 260, 598, 637,      1646, 516, 662, 177, 968, 472, 450, 397, 263, 521, 557, 180,      165, 337, 20, 525, 795, 551, 300, 315, 327, 610, 2446, 355,      223, 348, 513, 328, 141, 385, 256, 567, 309, 581, 1823, 389,      128, 525, 284, 663, 451, 300, 302, 162, 774, 970, 291, 529,      1255, 673, 266, 385, 354, 1157, 453, 215, 514, 239, 358,      892, 301, 221, 147, 1082, 280, 441, 63, 446, 732, 614, 4522,      535, 550, 117, 531, 328, 613, 121, 594, 523, 307, 492, 331,      123, 321, 236, 727, 591, 320, 1309, 727, 114, 897, 251, 481,      201, 1634, 393, 268, 337, 194, 2022, 280, 934, 254, 308,      1307, 300, 1021, 303), total_rooms = c(2360, 1459, 2359,      321, 1940, 2837, 5178, 1724, 1550, 2352, 2890, 1980, 248,      6297, 2150, 4405, 2012, 1766, 775, 1080, 826, 1410, 1582,      2552, 1729, 1495, 1467, 2644, 2332, 2099, 1463, 1701, 1731,      778, 2729, 3137, 2925, 2662, 4781, 3486, 2438, 2067, 1210,      1189, 1795, 6075, 2006, 1276, 3655, 2723, 7067, 2608, 2517,      1302, 4865, 1968, 2296, 1564, 1277, 2892, 2364, 907, 886,      1624, 80, 1906, 3870, 2844, 1411, 1312, 1347, 3252, 5293,      1526, 1293, 1432, 1954, 1621, 685, 1607, 1067, 2298, 1452,      3015, 8918, 1870, 793, 2792, 1621, 2912, 3236, 2240, 1625,      1142, 2422, 2929, 1040, 3038, 7353, 2238, 1053, 2005, 1718,      7374, 2280, 1293, 1904, 1576, 1298, 5480, 1660, 973, 712,      5257, 1205, 2263, 304, 2246, 2572, 3611, 24121, 2493, 3250,      1034, 2287, 1649, 3737, 804, 2891, 1929, 1375, 2082, 1607,      828, 1477, 1004, 4371, 3199, 1091, 7949, 3835, 411, 3659,      1364, 2139, 1167, 6638, 3004, 1852, 1811, 916, 9042, 1983,      5187, 1379, 798, 8814, 1698, 4289, 1686), median_house_value = c(1e+05,      237500, 414700, 68100, 147800, 221000, 111400, 195600, 255300,      116500, 500001, 310900, 450000, 500001, 157300, 295600, 181600,      140700, 159200, 315900, 173900, 178000, 91500, 500001, 261800,      500001, 260100, 183100, 57300, 140800, 152500, 162300, 214300,      497600, 154300, 136800, 153100, 241600, 226400, 249500, 150000,      500001, 59300, 216700, 500001, 178100, 158800, 128600, 150100,      183100, 265300, 70000, 223000, 423200, 173500, 370000, 160600,      150000, 61700, 164500, 139200, 104000, 267000, 167600, 247200,      183300, 152700, 133700, 164900, 91500, 87500, 151700, 187500,      435200, 281900, 218100, 93800, 201400, 384600, 64700, 180800,      159400, 103900, 176300, 254000, 136100, 190200, 171200, 500001,      91900, 493000, 289600, 164900, 270100, 92400, 173800, 83200,      172500, 213200, 125000, 320800, 120500, 128000, 478500, 97800,      141000, 175800, 261800, 117500, 500001, 184000, 94900, 150000,      237200, 139200, 123500, 112500, 164500, 175000, 231000, 239300,      121200, 312700, 500001, 90600, 133000, 490300, 147100, 199800,      500001, 142300, 108900, 438300, 146200, 70300, 103400, 136800,      136400, 159400, 120100, 97200, 350000, 150500, 314100, 271300,      179800, 271100, 494000, 279500, 292900, 63300, 378800, 236700,      154300, 231800, 141700, 414300, 87200, 59600, 136300)), row.names = c(NA,      -160L), class = "data.frame"), num.trees = 50L, mtry = 2,      importance = "impurity", num.threads = NULL, nodesize = NULL,      maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      160 
#> Number of independent variables:  6 
#> Mtry:                             2 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       7759514816 
#> R squared (OOB):                  0.4908093 
#>         households housing_median_age      median_income         population 
#>       1.858676e+11       1.926618e+11       1.166016e+12       2.822583e+11 
#>     total_bedrooms        total_rooms 
#>       1.938730e+11       2.540698e+11 
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#> -347600  -52840  -15487   -2039   37159  398800 
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>  -74710   -8572   -1522   -1180    3817   92177 
#>                           Min          Max        Mean         StD
#> households          691020257  74013835655 22174626693 19022615419
#> housing_median_age 1249275966  71801116450 18158957187 15368648200
#> median_income      2309718574 156847836671 54147984896 41657417547
#> population          740318645 193425575862 29344361572 31518494392
#> total_bedrooms      913083742  73162237629 21379358167 17485154629
#> total_rooms         725756284 111345663054 23814879837 21650118159
#> 
#> Number of Observations: 160
#> Number of Independent Variables: 6
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 1586263099.609
#> R-squared (Not OOB) %: 89.525
#> AIC (Not OOB): 3403.543
#> AICc (Not OOB): 3404.28
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 11644295709.198
#> R-squared (OOB) %: 23.108
#> AIC (OOB): 3722.493
#> AICc (OOB): 3723.23
#> Mean squared error Predicted (Not OOB): 356052094.034
#> R-squared Predicted (Not OOB) %: 97.649
#> AIC Predicted (Not OOB): 3164.494
#> AICc Predicted (Not OOB): 3165.231
#> 
#> Calculation time (in seconds): 2.4583
#> Ranger result
#> 
#> Call:
#>  ranger(median_house_value ~ households + housing_median_age +      median_income + population + total_bedrooms + total_rooms,      data = structure(list(households = c(592, 354, 431, 61, 382,      458, 1283, 315, 188, 592, 429, 391, 51, 1205, 407, 688, 332,      278, 183, 160, 134, 273, 404, 316, 300, 190, 260, 780, 610,      528, 245, 384, 455, 130, 722, 549, 501, 496, 797, 483, 753,      377, 238, 377, 261, 1634, 463, 259, 596, 556, 1597, 528,      607, 190, 893, 430, 405, 347, 241, 484, 516, 177, 173, 323,      23, 491, 774, 516, 339, 265, 91, 631, 2127, 315, 216, 348,      440, 322, 123, 354, 280, 527, 299, 530, 1772, 391, 137, 516,      272, 411, 416, 305, 288, 150, 715, 817, 297, 509, 1124, 583,      267, 353, 312, 794, 434, 217, 498, 249, 363, 831, 307, 178,      162, 1036, 301, 416, 61, 431, 669, 642, 987, 261, 124, 430,      40, 513, 68, 363, 885, 1243, 426, 1268, 19, 342, 370, 414,      347, 572, 1180, 1909, 518, 137, 437, 509, 462, 706, 267,      390, 222, 147, 315, 196, 1457, 1393, 438, 656, 415, 331,      922, 362), housing_median_age = c(28, 25, 52, 35, 36, 18,      7, 35, 12, 34, 44, 34, 52, 42, 16, 6, 38, 41, 37, 11, 15,      40, 35, 23, 52, 52, 49, 19, 36, 41, 14, 44, 25, 33, 42, 35,      26, 38, 30, 10, 29, 35, 33, 37, 37, 16, 43, 42, 6, 32, 35,      43, 35, 9, 24, 52, 10, 10, 31, 32, 34, 52, 45, 33, 41, 23,      20, 32, 42, 32, 16, 13, 30, 29, 35, 31, 36, 19, 41, 37, 42,      15, 52, 22, 13, 44, 35, 16, 52, 18, 15, 16, 35, 25, 15, 26,      29, 19, 23, 50, 37, 38, 52, 10, 17, 34, 41, 52, 22, 15, 36,      37, 16, 27, 31, 22, 10, 30, 20, 18, 20, 23, 38, 27, 38, 37,      27, 32, 17, 30, 32, 24, 41, 43, 13, 30, 52, 25, 24, 16, 29,      49, 43, 47, 30, 13, 41, 32, 38, 36, 29, 36, 31, 5, 34, 14,      45, 37, 19, 17), median_income = c(2.5048, 3.35, 2.8333,      2.8056, 3.3906, 4.5272, 2.4079, 4.8359, 7.226, 2.2, 6.987,      5.1207, 1.4886, 6.4752, 2.4754, 5.8151, 3.1734, 4.9125, 3.25,      6.1274, 4.8125, 4.2206, 2.4537, 9.1974, 4.3036, 8.1548, 4.3452,      3.1042, 1.6045, 2.1979, 4.7857, 3.025, 3.256, 5.738, 2.3438,      3.788, 3.1859, 4.0057, 5.4746, 6.4696, 0.8351, 5.8371, 1.2171,      2.4672, 7.5794, 2.5553, 1.7991, 2.7273, 4.6053, 2.3942, 4.1776,      2.5714, 2.5787, 7.5, 4.2852, 3.3702, 4.3424, 2.7031, 1.7292,      3.7784, 2.8365, 2.2125, 4.2708, 4.0385, 5.25, 2.93, 3.3021,      2.7188, 2.6667, 1.5, 4, 4.2137, 1.51, 4.0313, 7.8543, 2.7243,      1.125, 3.7361, 5.2289, 1.9107, 3.0096, 4.2422, 2.2083, 4.3419,      4.8052, 1.8932, 5.25, 3.668, 6.2223, 2.7344, 11.1121, 6.0198,      4.5595, 7.1472, 1.0617, 2.2577, 1.1818, 3.944, 5.4155, 1.6505,      3.1989, 2.5104, 2, 8.7991, 2.71, 3.8906, 3.6845, 6.07, 1.6488,      7.4678, 4.095, 1.6645, 2.56, 3.3906, 4.0231, 3.725, 2.1964,      4.7917, 2.4211, 5.6345, 3.2388, 5.3994, 1.7386, 5.0822, 2.3942,      2.4394, 5.3946, 2.8365, 3.6619, 2.8889, 7.1198, 4.6649, 2.225,      3.2708, 2.5446, 3.5391, 11.5609, 5.7705, 2.2652, 3.0606,      2.2409, 5.2128, 7.9614, 3.6475, 8.2374, 2.6417, 4.6125, 4.125,      3.6625, 2.2031, 6.6605, 5.0275, 1.9066, 5.305, 5.4727, 4.1862,      2.6667, 2.675, 3.5112, 4.7813), population = c(2623, 1150,      1100, 157, 1076, 1454, 2557, 992, 685, 1127, 1219, 970, 124,      2096, 1428, 2071, 880, 753, 726, 386, 440, 932, 1957, 916,      890, 459, 688, 2317, 2175, 2325, 881, 1091, 1127, 258, 3004,      1312, 1921, 1132, 2568, 1700, 2114, 724, 850, 645, 791, 2592,      1687, 799, 1993, 1549, 5380, 1322, 1883, 682, 2315, 784,      818, 643, 600, 1580, 1517, 479, 492, 1412, 61, 1029, 2088,      1337, 1295, 600, 271, 1915, 4123, 724, 701, 681, 1437, 871,      266, 972, 608, 1261, 637, 2491, 4518, 1345, 589, 1696, 588,      999, 1289, 1221, 1134, 486, 2120, 3792, 1054, 1463, 4014,      2247, 939, 882, 1026, 1900, 976, 774, 1666, 696, 1272, 2009,      1225, 842, 355, 3496, 1476, 1395, 161, 1837, 1534, 2381,      1637, 910, 676, 1144, 142, 1134, 195, 1145, 1656, 1910, 793,      3418, 68, 1065, 994, 1500, 1152, 1640, 2421, 5913, 1014,      331, 1033, 1262, 978, 1796, 676, 1199, 637, 425, 859, 639,      5666, 4768, 1422, 1192, 1260, 492, 1807, 1057), total_bedrooms = c(607,      362, 591, 71, 399, 522, 1336, 311, 187, 610, 438, 385, 68,      1307, 461, 717, 347, 288, 179, 174, 138, 255, 391, 305, 319,      230, 259, 833, 656, 530, 261, 396, 482, 143, 725, 544, 575,      498, 831, 469, 867, 428, 288, 377, 285, 1816, 472, 260, 598,      637, 1646, 516, 662, 177, 968, 472, 450, 397, 263, 521, 557,      180, 165, 337, 20, 525, 795, 551, 300, 315, 327, 610, 2446,      355, 223, 348, 513, 328, 141, 385, 256, 567, 309, 581, 1823,      389, 128, 525, 284, 663, 451, 300, 302, 162, 774, 970, 291,      529, 1255, 673, 266, 385, 354, 1157, 453, 215, 514, 239,      358, 892, 301, 221, 147, 1082, 280, 441, 63, 446, 732, 614,      1062, 267, 133, 464, 36, 546, 60, 385, 854, 1312, 504, 1330,      20, 358, 366, 536, 371, 575, 1283, 2043, 545, 136, 449, 565,      499, 847, 269, 384, 221, 166, 327, 193, 1492, 1557, 515,      687, 461, 327, 1092, 386), total_rooms = c(2360, 1459, 2359,      321, 1940, 2837, 5178, 1724, 1550, 2352, 2890, 1980, 248,      6297, 2150, 4405, 2012, 1766, 775, 1080, 826, 1410, 1582,      2552, 1729, 1495, 1467, 2644, 2332, 2099, 1463, 1701, 1731,      778, 2729, 3137, 2925, 2662, 4781, 3486, 2438, 2067, 1210,      1189, 1795, 6075, 2006, 1276, 3655, 2723, 7067, 2608, 2517,      1302, 4865, 1968, 2296, 1564, 1277, 2892, 2364, 907, 886,      1624, 80, 1906, 3870, 2844, 1411, 1312, 1347, 3252, 5293,      1526, 1293, 1432, 1954, 1621, 685, 1607, 1067, 2298, 1452,      3015, 8918, 1870, 793, 2792, 1621, 2912, 3236, 2240, 1625,      1142, 2422, 2929, 1040, 3038, 7353, 2238, 1053, 2005, 1718,      7374, 2280, 1293, 1904, 1576, 1298, 5480, 1660, 973, 712,      5257, 1205, 2263, 304, 2246, 2572, 3611, 4084, 1310, 512,      2859, 123, 2344, 336, 1950, 4324, 4524, 3152, 7141, 98, 1823,      1524, 2165, 2954, 3715, 4443, 10072, 2030, 792, 2492, 2530,      3652, 4110, 1608, 2399, 1246, 613, 2465, 1072, 6145, 7748,      2765, 2673, 1899, 1127, 4920, 2649), median_house_value = c(1e+05,      237500, 414700, 68100, 147800, 221000, 111400, 195600, 255300,      116500, 500001, 310900, 450000, 500001, 157300, 295600, 181600,      140700, 159200, 315900, 173900, 178000, 91500, 500001, 261800,      500001, 260100, 183100, 57300, 140800, 152500, 162300, 214300,      497600, 154300, 136800, 153100, 241600, 226400, 249500, 150000,      500001, 59300, 216700, 500001, 178100, 158800, 128600, 150100,      183100, 265300, 70000, 223000, 423200, 173500, 370000, 160600,      150000, 61700, 164500, 139200, 104000, 267000, 167600, 247200,      183300, 152700, 133700, 164900, 91500, 87500, 151700, 187500,      435200, 281900, 218100, 93800, 201400, 384600, 64700, 180800,      159400, 103900, 176300, 254000, 136100, 190200, 171200, 500001,      91900, 493000, 289600, 164900, 270100, 92400, 173800, 83200,      172500, 213200, 125000, 320800, 120500, 128000, 478500, 97800,      141000, 175800, 261800, 117500, 500001, 184000, 94900, 150000,      237200, 139200, 123500, 112500, 164500, 175000, 231000, 256300,      237900, 52000, 327500, 2e+05, 118300, 71800, 87900, 232400,      335300, 469900, 237800, 212500, 131000, 93800, 55900, 500001,      247100, 269200, 119500, 114200, 238600, 500001, 197100, 500001,      122300, 361700, 264600, 184600, 93800, 220700, 179300, 54600,      311200, 238900, 188900, 320000, 241700, 231900, 326800)), row.names = c(NA,      -160L), class = "data.frame"), num.trees = 50L, mtry = 2,      importance = "impurity", num.threads = NULL, nodesize = NULL,      maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      160 
#> Number of independent variables:  6 
#> Mtry:                             2 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       7545899121 
#> R squared (OOB):                  0.4817143 
#>         households housing_median_age      median_income         population 
#>       1.886719e+11       2.320754e+11       1.070679e+12       1.942059e+11 
#>     total_bedrooms        total_rooms 
#>       1.842155e+11       2.808110e+11 
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#> -227223  -49089   -8123    6160   61200  324201 
#>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
#> -61406.4  -6428.4  -1083.2    190.3   3726.3  84617.2 
#>                           Min          Max        Mean         StD
#> households         1419817266  81804184548 18934782557 15465987316
#> housing_median_age  898467331 106253447376 22010407309 19997411452
#> median_income      1616529499 172755509166 55071483969 44612021914
#> population          988771935  62337778711 21638489655 16549786470
#> total_bedrooms     1105828270  90223191261 19412949712 16503384179
#> total_rooms        1302695294  79747573996 24806698118 20744895134
#> 
#> Number of Observations: 160
#> Number of Independent Variables: 6
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 1604006078.192
#> R-squared (Not OOB) %: 88.914
#> AIC (Not OOB): 3405.323
#> AICc (Not OOB): 3406.06
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 10496330539.336
#> R-squared (OOB) %: 27.453
#> AIC (OOB): 3705.887
#> AICc (OOB): 3706.623
#> Mean squared error Predicted (Not OOB): 352079527.184
#> R-squared Predicted (Not OOB) %: 97.567
#> AIC Predicted (Not OOB): 3162.699
#> AICc Predicted (Not OOB): 3163.436
#> 
#> Calculation time (in seconds): 30.322
#> Ranger result
#> 
#> Call:
#>  ranger(Income01 ~ Foreig01 + PrSect01 + UnemrT01, data = structure(list(     Foreig01 = c(1.326379, 0.739066, 4.091277, 2.284376, 8.65707,      4.493009, 3.314757, 3.725453, 3.927859, 3.358342, 0.963082,      1.421484, 4.76081, 2.206378, 8.534976, 4.862805, 5.376344,      1.918058, 2.70233, 4.551465, 17.443299, 10.773481, 2.803964,      1.872839, 6.492916, 9.309483, 5.264627, 9.116022, 7.177934,      5.821225, 8.276884, 3.97829, 2.672556, 10.791309, 2.37487,      3.115023, 8.890436, 13.82815, 7.36147, 5.509564, 5.664887,      5.355954, 8.611015, 8.331449, 8.184301, 7.056066, 5.495312,      7.097849, 6.582164, 8.803252, 13.518336, 6.801438, 8.509372,      14.364707, 7.974206, 7.730033, 7.830598, 11.019203, 6.504752,      6.726014, 13.819578, 17.966102, 11.988178, 9.663226, 7.916497,      1.99678, 0.038337, 0.598828, 0.695308, 1.317189, 7.200951,      6.90266, 2.722651, 4.978021, 6.001122, 3.628457, 2.303796,      18.517776, 2.034241, 2.966533, 5.752894, 8.021119, 2.762162,      4.345621, 18.693849, 9.498062, 6.852363, 5.997017, 4.315751,      2.739917, 7.213248, 6.868, 5.301864, 2.284037, 5.205073,      1.953719, 7.753512, 6.779058, 8.847185, 7.827199, 9.441715,      8.244769, 4.805635, 5.155828, 7.097387, 6.705269, 13.038322,      7.206725, 5.871832, 5.506176, 11.399549, 4.899598, 1.143241,      4.210526, 10.188476, 1.102941, 9.291085, 4.733728, 14.470678,      6.573276, 4.912837, 9.170128, 5.853358, 3.513776, 3.856971,      4.195804, 2.148056, 14.680209, 8.889386, 4.960728, 8.088618,      6.225509, 5.934958, 7.347162, 9.349243, 6.040992, 4.023818,      1.907888, 6.657243, 8.846268, 6.229869, 2.352673, 14.74122,      3.812906, 6.746862, 0.8522, 6.373809, 5.834723, 4.265624,      1.43841, 8.990228, 1.611482, 5.886121, 14.233419, 5.19424,      10.037652, 10.275453, 4.161395, 2.328034, 10.180573, 6.349635,      4.502847, 6.597823, 4.128939, 9.413947, 9.631219, 11.469108,      5.017, 5.025733, 8.043588, 9.058772, 4.68281, 6.433254, 12.438579,      9.830658, 7.101978, 8.723006, 8.515141, 6.678547, 5.757121,      4.429016, 2.605863, 4.438607, 9.210526, 3.132648, 0.357995,      7.323496, 14.097339, 6.451613, 7.18703, 4.976455, 1.923704,      6.982319, 9.876543, 7.916303, 2.961633, 2.688983, 1.663541,      1.664659, 0.062147, 2.637279, 5.799806, 5.183398, 6.780155,      3.03135, 2.765511, 3.610861, 3.024963, 2.228995, 2.285309,      3.845944, 4.739134, 7.524262, 0.321543, 9.47912, 19.157686,      6.345588, 5.082042, 12.927131, 9.315655, 1.315209, 4.130708,      7.771945, 7.359933, 7.761194, 14.780181, 10.156464, 11.460221,      13.59267, 6.558645, 7.208287, 11.146436, 8.205619, 4.682677,      6.65286, 6.18246, 3.252711, 3.736699, 7.97901, 7.109372,      15.055692, 13.387156, 13.233622, 12.38675, 7.463988, 5.658489,      12.962963, 13.889667, 11.746032, 3.938444, 1.680672, 4.765343,      5.142483, 20.259019, 7.67155, 4.048727, 6.25157, 6.310989,      7.400555, 8.900264), PrSect01 = c(37.692656, 38.823028, 37.303852,      6.445493, 34.664993, 1.590318, 20.292905, 31.595236, 17.261758,      21.718973, 23.253676, 29.723837, 41.352201, 38.636966, 45.666551,      56.900124, 44.190172, 21.224781, 66.130079, 6.68381, 22.484472,      12.420156, 19.500245, 39.303754, 68.01065, 39.224697, 32.363107,      44.260506, 12.056562, 26.758572, 15.523418, 52.281369, 67.8333,      44.060725, 43.198681, 33.688984, 30.265756, 49.669926, 0.463182,      0.491463, 0.633389, 0.517554, 0.366845, 0.82332, 0.398047,      0.458925, 0.283763, 0.613263, 0.474993, 0.438809, 3.019678,      4.702739, 1.169509, 4.541261, 9.045477, 10.352113, 15.295877,      4.719357, 5.552309, 28.228228, 12.236287, 31.683168, 44.98284,      11.545543, 5.725071, 21.817852, 92.912436, 37.69697, 44.698545,      58.076846, 0.834415, 12.871646, 1.480707, 1.154857, 9.59213,      43.03042, 56.606724, 15.64907, 6.843546, 27.572169, 55.736337,      56.198347, 68.631464, 42.735043, 6.319515, 8.396947, 51.096154,      30.266171, 17.692308, 51.948052, 14.317028, 20.297168, 2.567481,      40.04717, 17.467761, 33.86938, 46.38916, 34.49692, 36.956522,      55.393008, 60.579377, 0.278552, 0.45586, 0.521431, 0.551688,      0.319103, 7.621111, 6.583814, 1.056288, 0.762893, 3.930131,      29.294261, 18.808777, 13.157895, 18.308351, 43.809524, 17.768595,      31.428571, 14.63539, 5.836576, 13.366337, 4.961814, 12.782486,      54.140389, 62.739767, 25.19685, 53.339605, 61.525841, 51.305684,      63.929619, 22.823121, 38.083927, 1.159091, 20.658431, 12.182284,      25.421061, 20.39555, 15.660427, 33.918837, 27.202407, 31.296344,      9.428216, 64.480874, 25.292137, 28.17224, 24.695122, 18.9669,      48.379164, 7.244547, 49.516324, 48.806999, 42.079395, 15.288577,      36.097368, 16.864528, 36.605617, 24.949971, 32.202216, 15.550423,      21.865889, 41.800387, 26.050272, 38.35232, 14.152989, 45.304102,      6.852248, 39.820481, 10.481552, 0.425861, 0.467575, 1.050271,      0.781873, 0.451669, 1.514451, 6.311523, 1.227819, 16.135987,      0.491722, 0.349096, 0.476543, 29.819161, 44.144144, 11.452587,      56, 7.658158, 16.574586, 23.594053, 12.075552, 2.439024,      65.793103, 51.843287, 47.257384, 45.10826, 51.351351, 45.701249,      7.298838, 49.159664, 13.235721, 40.009308, 62.992652, 30.067125,      42.931896, 52.172303, 48.856417, 58.607969, 57.756056, 19.057454,      28.368794, 30.543933, 53.617733, 30.949859, 5.275029, 43.202073,      59.071118, 38.639943, 25.041356, 32.841823, 16.761522, 25.029516,      16.531286, 42.385267, 40.660232, 42.81265, 29.070523, 52.111411,      25.659879, 66.371681, 67.480046, 55.569206, 51.205796, 42.586207,      0.367745, 0.302285, 0.497295, 0.883996, 0.716765, 0.448012,      0.328626, 0.572086, 2.442077, 15.073684, 2.054305, 4.613297,      6.518078, 0.364312, 5.284913, 7.039106, 19.320938, 6.478659,      20.368713, 27.027027, 19.911504, 11.524501, 26.279863, 9.341501,      7.477305, 47.181719, 37.721555, 38.57868, 35.838009), UnemrT01 = c(9.922417,      3.685218, 3.719812, 9.030693, 3.714694, 5.505411, 6.182881,      7.934726, 15.764364, 5.158126, 5.308964, 7.464694, 7.826087,      2.809278, 3.49345, 2.975472, 2.118423, 4.704569, 4.11999,      6.254473, 4.280618, 8.684381, 6.216358, 6.173946, 1.793052,      3.33713, 1.926851, 4.549401, 6.386438, 6.448413, 12.317644,      3.294009, 3.381548, 8.367845, 6.25966, 4.726811, 5.224525,      2.620229, 6.080016, 4.621528, 4.380707, 3.008167, 4.928766,      4.781411, 4.256849, 5.234798, 7.413793, 4.699718, 5.877712,      4.797139, 3.40752, 9.118504, 5.834153, 8.343512, 10.848741,      11.965282, 10.889016, 11.034832, 4.83871, 5.932203, 8.846154,      1.941748, 5.839809, 8.836888, 6.666993, 5.221281, 2.15424,      3.746435, 5.143796, 5.673624, 6.336333, 4.653253, 5.61862,      8.363331, 5.573834, 5.586524, 3.489908, 8.665065, 5.398406,      5.015233, 2.143295, 2.276065, 2.759719, 3.769705, 8.889912,      5.629669, 5.144108, 3.600497, 5.405405, 3.399433, 6.068487,      3.698704, 8.493895, 6.319046, 4.612804, 4.392846, 3.491507,      2.573124, 6.122449, 4.43128, 4.833617, 4.348947, 4.943621,      4.004405, 6.606146, 4.202529, 4.835082, 4.33121, 8.056316,      6.550318, 9.84252, 5.081193, 12.121212, 7, 7.555262, 1.869159,      5.958549, 4.669261, 12.494422, 19.6875, 3.809524, 15.389431,      6.100796, 2.001881, 4.458874, 8.724016, 3.407542, 2.284569,      5.938448, 2.198853, 13.36772, 4.639262, 8.424908, 6.984719,      6.422553, 5.720858, 9.631886, 7.700063, 4.256553, 4.560742,      13.127499, 7.167602, 7.200811, 2.922515, 4.463895, 6.339235,      6.710119, 7.525326, 5.139822, 3.575593, 4.530499, 6.238922,      4.671632, 5.46305, 5.685698, 7.832546, 6.219839, 5.559189,      6.770335, 7.630162, 11.03574, 6.564108, 9.623993, 5.029412,      2.831226, 6.856146, 5.165409, 5.956961, 5.917458, 4.738235,      4.94433, 4.481024, 5.640914, 4.483216, 4.497696, 5.958702,      4.679102, 6.480184, 7.156274, 6.384455, 6.47715, 1.769912,      6.0406, 12.280702, 4.420085, 2.162162, 7.600418, 7.042809,      3.529412, 7.643312, 3.833072, 2.569373, 4.003079, 0.35, 5.191257,      10.851115, 10.526316, 4.028502, 9.019054, 6.188313, 8.377709,      4.551818, 5.106582, 3.063895, 6.528736, 5.407035, 7.758919,      14.533122, 8.795203, 4.398241, 6.147473, 5.829585, 3.471041,      5.874317, 6.480118, 3.674933, 6.866417, 5.14449, 6.615215,      8.164604, 10.044702, 4.729155, 8.525093, 5.978814, 3.329473,      6.767446, 0.673894, 2.685308, 6.365031, 4.689755, 2.602855,      5.52713, 3.888003, 3.922883, 5.351646, 6.147813, 5.227775,      4.818924, 4.318526, 6.918793, 6.505265, 3.946465, 4.729075,      5.786281, 7.185884, 7.264762, 6.478579, 7.479432, 5.949821,      5.144312, 1.333333, 3.211991, 12.816456, 0.677966, 13.852243,      6.557167, 4.44999, 6.408027, 5.806011, 7.009982), Income01 = c(7677.032664,      9259.577454, 8888.786526, 11165.632108, 8698.950125, 16570.163224,      9969.430572, 8615.250773, 9911.50949, 11556.608348, 10024.730993,      10163.272567, 7449.295834, 8272.693788, 8712.479825, 7415.7966,      8129.73061, 10535.622267, 7714.695626, 11928.756482, 10429.892408,      10073.256411, 10269.971914, 8504.131187, 7590.490634, 10698.178577,      8754.512875, 9093.900799, 10771.582496, 8862.16138, 11126.873309,      7343.168771, 7435.687056, 8922.910571, 7529.754975, 8687.94206,      11534.499063, 9953.122462, 13966.464409, 14465.664932, 18932.911377,      19938.129264, 13399.832918, 20040.300881, 24573.894541, 12433.888268,      11085.772268, 12571.419116, 13734.152858, 16035.157882, 20617.695628,      11458.787767, 15578.637857, 12144.689612, 9532.880665, 9296.633841,      9167.76417, 11774.029563, 12157.022236, 9025.079789, 9261.601516,      8888.138597, 10033.980853, 13184.757809, 11612.229683, 10969.315256,      6398.641486, 8636.939034, 8843.261472, 6502.769207, 13388.724605,      13924.64678, 14271.725498, 10877.619318, 14228.969009, 9367.845149,      7842.985808, 9232.707133, 13043.96637, 9237.032366, 8939.464373,      8531.132636, 7079.01195, 9705.812326, 10289.083287, 15628.575709,      10835.459224, 9594.79381, 11236.559344, 7051.83592, 11307.658657,      11070.811825, 12699.732926, 7101.793614, 12663.682886, 7934.747765,      9600.666543, 10769.102635, 8778.104036, 8127.118396, 7128.254242,      13417.328212, 15546.215489, 19957.239934, 12066.649255, 16619.007474,      12282.968054, 11755.163618, 10706.765565, 11927.693805, 9532.880665,      11387.172049, 9107.992058, 11645.230736, 10136.635143, 9062.404166,      9373.082883, 9215.517837, 8595.080677, 10000.015403, 10381.576323,      12302.954954, 10143.649419, 8080.973395, 7264.695448, 10508.368742,      8208.923846, 7989.958401, 8120.027122, 6602.391386, 8780.451519,      8481.42276, 10295.348873, 10747.375964, 12023.819373, 9257.263138,      9872.956088, 8838.624722, 9985.949665, 9842.416491, 8227.782136,      12772.15574, 7037.584312, 9906.743471, 8421.408087, 7092.552025,      11206.061683, 7978.206235, 11793.212235, 7319.147599, 7329.73737,      10106.062749, 12371.653766, 9073.853801, 11092.951384, 9580.809008,      10865.369261, 8926.201158, 11146.901005, 10848.913392, 8667.022944,      10513.652134, 8745.057899, 12944.741373, 9574.161074, 11940.521945,      9033.625889, 12338.160411, 14933.37738, 13782.751527, 22713.819971,      18012.846533, 12459.106366, 19520.441161, 12800.674576, 13481.769913,      10213.399503, 13526.48684, 12390.076276, 11067.580526, 9832.88178,      7725.916147, 11786.19731, 5421.733909, 12235.922352, 10928.188656,      10360.87907, 10528.1431, 9412.224138, 7416.650771, 8427.782051,      8457.863978, 9470.432432, 8498.080328, 8750.030129, 11299.106498,      7540.976656, 12802.25257, 10893.762596, 6619.932397, 9065.74985,      8963.729293, 7700.217079, 7992.93997, 7945.20396, 7219.935905,      9949.272583, 8226.640394, 8733.883025, 8891.511834, 8947.602528,      11747.257893, 8242.186064, 6048.887084, 8859.143656, 11230.95668,      9704.660134, 11916.715607, 8981.63753, 10762.936983, 6722.157048,      9101.784044, 8561.815567, 9582.188937, 8169.299538, 8996.95022,      7689.421102, 7192.308026, 7431.348413, 7839.114314, 8012.720158,      13689.648935, 14776.121451, 22306.368861, 14017.158218, 18996.201304,      13472.29011, 13704.54664, 17935.643677, 11532.813908, 11591.464247,      16607.307299, 13089.828808, 11324.658709, 11750.491094, 10981.720456,      11245.356004, 11610.35747, 9269.2439, 10122.848992, 7566.666874,      11184.921534, 9166.012535, 11273.367499, 9593.545145, 12479.911946,      9011.115786, 10867.976043, 8924.440205, 8787.677923)), row.names = c(NA,  -260L), class = "data.frame"), num.trees = 50L, mtry = 1, importance = "impurity",      num.threads = NULL, nodesize = NULL, maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      260 
#> Number of independent variables:  3 
#> Mtry:                             1 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       3047921 
#> R squared (OOB):                  0.6719823 
#>   Foreig01   PrSect01   UnemrT01 
#>  379888380 1289142272  539135797 
#>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
#> -9441.57 -1151.31  -112.28   -95.41  1058.35 10336.10 
#>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
#> -1828.25  -133.51   -14.03     8.87   109.34  1727.33 
#>              Min       Max     Mean      StD
#> Foreig01 1400258  98480803 18817309 16403436
#> PrSect01 2699314 101983380 26703404 17542368
#> UnemrT01 2519036 122133405 21115654 19935825
#> 
#> Number of Observations: 260
#> Number of Independent Variables: 3
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 763585.319
#> R-squared (Not OOB) %: 91.751
#> AIC (Not OOB): 3529.903
#> AICc (Not OOB): 3530.06
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 4608998.354
#> R-squared (OOB) %: 50.206
#> AIC (OOB): 3997.315
#> AICc (OOB): 3997.472
#> Mean squared error Predicted (Not OOB): 97560.956
#> R-squared Predicted (Not OOB) %: 98.946
#> AIC Predicted (Not OOB): 2994.94
#> AICc Predicted (Not OOB): 2995.097
#> 
#> Calculation time (in seconds): 34.4423
#> Ranger result
#> 
#> Call:
#>  ranger(Income01 ~ Foreig01 + PrSect01 + UnemrT01, data = structure(list(     Foreig01 = c(1.339977, 0.890172, 2.552864, 2.463825, 1.991885,      4.665301, 4.815093, 4.382022, 6.62604, 3.013393, 4.472027,      5.276178, 2.344013, 1.753005, 1.10597, 1.760782, 6.263982,      4.065584, 3.023547, 12.317792, 2.945441, 0.617024, 3.954178,      7.017951, 4.023361, 3.13649, 1.317752, 5.473717, 2.312979,      10.641892, 5.642833, 1.499305, 13.219145, 3.31992, 7.423719,      2.717079, 2.318117, 2.357132, 5.681818, 6.042729, 3.481225,      3.104939, 10.527485, 7.249063, 17.426785, 8.201391, 6.166604,      5.75461, 7.740544, 7.603582, 13.960731, 11.762564, 5.361922,      7.531381, 2.763603, 14.937336, 4.221252, 9.575518, 3.185956,      5.633256, 24.533592, 9.557235, 13.828361, 8.46983, 1.307351,      1.99678, 0.038337, 0.598828, 0.695308, 1.317189, 7.200951,      6.90266, 2.722651, 4.978021, 6.001122, 3.628457, 2.303796,      18.517776, 2.034241, 2.966533, 5.752894, 8.021119, 2.762162,      4.345621, 18.693849, 9.498062, 6.852363, 5.997017, 4.315751,      2.739917, 7.213248, 6.868, 5.301864, 2.284037, 5.205073,      1.953719, 7.753512, 6.779058, 8.847185, 7.827199, 9.441715,      8.244769, 4.805635, 5.155828, 7.097387, 6.705269, 13.038322,      7.206725, 5.871832, 5.506176, 11.399549, 4.899598, 1.143241,      4.210526, 10.188476, 1.102941, 9.291085, 4.733728, 14.470678,      6.573276, 4.912837, 9.170128, 5.853358, 3.513776, 3.856971,      4.195804, 2.148056, 14.680209, 8.889386, 4.960728, 8.088618,      6.225509, 5.934958, 7.347162, 9.349243, 6.040992, 4.023818,      1.907888, 6.657243, 8.846268, 6.229869, 2.352673, 14.74122,      3.812906, 6.746862, 0.8522, 6.373809, 5.834723, 4.265624,      1.43841, 8.990228, 1.611482, 5.886121, 14.233419, 5.19424,      10.037652, 10.275453, 4.161395, 2.328034, 10.180573, 6.349635,      4.502847, 6.597823, 4.128939, 9.413947, 9.631219, 11.469108,      5.017, 5.025733, 8.043588, 9.058772, 4.68281, 6.433254, 12.438579,      9.830658, 7.101978, 8.723006, 8.515141, 6.678547, 5.757121,      4.429016, 2.605863, 4.438607, 9.210526, 3.132648, 0.357995,      7.323496, 14.097339, 6.451613, 7.18703, 4.976455, 1.923704,      6.982319, 9.876543, 7.916303, 2.961633, 2.688983, 1.663541,      1.664659, 0.062147, 2.637279, 5.799806, 5.183398, 6.780155,      3.03135, 2.765511, 3.610861, 3.024963, 2.228995, 2.285309,      3.845944, 4.739134, 7.524262, 0.321543, 9.47912, 19.157686,      6.345588, 5.082042, 12.927131, 9.315655, 1.315209, 4.130708,      7.771945, 7.359933, 7.761194, 14.780181, 10.156464, 11.460221,      13.59267, 6.558645, 7.208287, 11.146436, 8.205619, 4.682677,      6.65286, 6.18246, 3.252711, 3.736699, 7.97901, 7.109372,      15.055692, 13.387156, 13.233622, 12.38675, 7.463988, 5.658489,      12.962963, 13.889667, 11.746032, 3.938444, 1.680672, 4.765343,      5.142483, 20.259019, 7.67155, 4.048727, 6.25157, 6.310989,      7.400555, 8.900264), PrSect01 = c(70.206767, 57.748085, 28.412363,      42.787795, 44.731183, 5.374961, 1.218122, 25.957295, 0.847579,      29.397378, 24.652368, 40.024104, 47.0726, 47.674767, 54.581307,      38.775762, 37.212276, 23.277291, 24.122207, 36.839789, 25.113386,      52.922756, 48.589099, 23.579571, 30.988275, 53.68586, 34.608031,      63.47282, 61.155645, 42.602916, 7.864911, 19.215686, 28.121995,      29.62963, 26.769912, 37.23871, 29.615408, 50.880597, 16.361599,      32.053002, 41.260379, 47.43295, 22.881027, 43.056592, 0.515649,      0.361087, 0.309353, 0.429726, 0.515624, 5.838417, 15.238266,      53.857884, 16.574001, 14.583333, 4.161377, 5.720258, 20,      25.454545, 37.478109, 16.464088, 4.341671, 26.903553, 16.006904,      11.268322, 56.706408, 21.817852, 92.912436, 37.69697, 44.698545,      58.076846, 0.834415, 12.871646, 1.480707, 1.154857, 9.59213,      43.03042, 56.606724, 15.64907, 6.843546, 27.572169, 55.736337,      56.198347, 68.631464, 42.735043, 6.319515, 8.396947, 51.096154,      30.266171, 17.692308, 51.948052, 14.317028, 20.297168, 2.567481,      40.04717, 17.467761, 33.86938, 46.38916, 34.49692, 36.956522,      55.393008, 60.579377, 0.278552, 0.45586, 0.521431, 0.551688,      0.319103, 7.621111, 6.583814, 1.056288, 0.762893, 3.930131,      29.294261, 18.808777, 13.157895, 18.308351, 43.809524, 17.768595,      31.428571, 14.63539, 5.836576, 13.366337, 4.961814, 12.782486,      54.140389, 62.739767, 25.19685, 53.339605, 61.525841, 51.305684,      63.929619, 22.823121, 38.083927, 1.159091, 20.658431, 12.182284,      25.421061, 20.39555, 15.660427, 33.918837, 27.202407, 31.296344,      9.428216, 64.480874, 25.292137, 28.17224, 24.695122, 18.9669,      48.379164, 7.244547, 49.516324, 48.806999, 42.079395, 15.288577,      36.097368, 16.864528, 36.605617, 24.949971, 32.202216, 15.550423,      21.865889, 41.800387, 26.050272, 38.35232, 14.152989, 45.304102,      6.852248, 39.820481, 10.481552, 0.425861, 0.467575, 1.050271,      0.781873, 0.451669, 1.514451, 6.311523, 1.227819, 16.135987,      0.491722, 0.349096, 0.476543, 29.819161, 44.144144, 11.452587,      56, 7.658158, 16.574586, 23.594053, 12.075552, 2.439024,      65.793103, 51.843287, 47.257384, 45.10826, 51.351351, 45.701249,      7.298838, 49.159664, 13.235721, 40.009308, 62.992652, 30.067125,      42.931896, 52.172303, 48.856417, 58.607969, 57.756056, 19.057454,      28.368794, 30.543933, 53.617733, 30.949859, 5.275029, 43.202073,      59.071118, 38.639943, 25.041356, 32.841823, 16.761522, 25.029516,      16.531286, 42.385267, 40.660232, 42.81265, 29.070523, 52.111411,      25.659879, 66.371681, 67.480046, 55.569206, 51.205796, 42.586207,      0.367745, 0.302285, 0.497295, 0.883996, 0.716765, 0.448012,      0.328626, 0.572086, 2.442077, 15.073684, 2.054305, 4.613297,      6.518078, 0.364312, 5.284913, 7.039106, 19.320938, 6.478659,      20.368713, 27.027027, 19.911504, 11.524501, 26.279863, 9.341501,      7.477305, 47.181719, 37.721555, 38.57868, 35.838009), UnemrT01 = c(6.06239,      7.421934, 12.1437, 6.967742, 2.719665, 7.838207, 8.085858,      5.003381, 7.19091, 6.03052, 6.279391, 3.885847, 7.249525,      3.767865, 5.585205, 6.496654, 18.286311, 16.689682, 5.960549,      5.726141, 3.897883, 5.148515, 3.578084, 5.191048, 5.798817,      2.935138, 2.96846, 3.290469, 3.698939, 2.691425, 4.585775,      14.869029, 10.41782, 3.076923, 5.828548, 6.671484, 4.965232,      3.109183, 5.982206, 9.316298, 5.796229, 4.465593, 4.36019,      2.645777, 5.624998, 5.753463, 4.167878, 5.745355, 5.865497,      6.079738, 4.589434, 2.758007, 5.275038, 8.571429, 6.242561,      11.622439, 7.239819, 12.350598, 3.709949, 3.311966, 5.147717,      6.339144, 13.273453, 10.028391, 6.415621, 5.221281, 2.15424,      3.746435, 5.143796, 5.673624, 6.336333, 4.653253, 5.61862,      8.363331, 5.573834, 5.586524, 3.489908, 8.665065, 5.398406,      5.015233, 2.143295, 2.276065, 2.759719, 3.769705, 8.889912,      5.629669, 5.144108, 3.600497, 5.405405, 3.399433, 6.068487,      3.698704, 8.493895, 6.319046, 4.612804, 4.392846, 3.491507,      2.573124, 6.122449, 4.43128, 4.833617, 4.348947, 4.943621,      4.004405, 6.606146, 4.202529, 4.835082, 4.33121, 8.056316,      6.550318, 9.84252, 5.081193, 12.121212, 7, 7.555262, 1.869159,      5.958549, 4.669261, 12.494422, 19.6875, 3.809524, 15.389431,      6.100796, 2.001881, 4.458874, 8.724016, 3.407542, 2.284569,      5.938448, 2.198853, 13.36772, 4.639262, 8.424908, 6.984719,      6.422553, 5.720858, 9.631886, 7.700063, 4.256553, 4.560742,      13.127499, 7.167602, 7.200811, 2.922515, 4.463895, 6.339235,      6.710119, 7.525326, 5.139822, 3.575593, 4.530499, 6.238922,      4.671632, 5.46305, 5.685698, 7.832546, 6.219839, 5.559189,      6.770335, 7.630162, 11.03574, 6.564108, 9.623993, 5.029412,      2.831226, 6.856146, 5.165409, 5.956961, 5.917458, 4.738235,      4.94433, 4.481024, 5.640914, 4.483216, 4.497696, 5.958702,      4.679102, 6.480184, 7.156274, 6.384455, 6.47715, 1.769912,      6.0406, 12.280702, 4.420085, 2.162162, 7.600418, 7.042809,      3.529412, 7.643312, 3.833072, 2.569373, 4.003079, 0.35, 5.191257,      10.851115, 10.526316, 4.028502, 9.019054, 6.188313, 8.377709,      4.551818, 5.106582, 3.063895, 6.528736, 5.407035, 7.758919,      14.533122, 8.795203, 4.398241, 6.147473, 5.829585, 3.471041,      5.874317, 6.480118, 3.674933, 6.866417, 5.14449, 6.615215,      8.164604, 10.044702, 4.729155, 8.525093, 5.978814, 3.329473,      6.767446, 0.673894, 2.685308, 6.365031, 4.689755, 2.602855,      5.52713, 3.888003, 3.922883, 5.351646, 6.147813, 5.227775,      4.818924, 4.318526, 6.918793, 6.505265, 3.946465, 4.729075,      5.786281, 7.185884, 7.264762, 6.478579, 7.479432, 5.949821,      5.144312, 1.333333, 3.211991, 12.816456, 0.677966, 13.852243,      6.557167, 4.44999, 6.408027, 5.806011, 7.009982), Income01 = c(6608.897469,      6700.375345, 8113.734335, 8254.78138, 8854.808951, 12089.546953,      11223.754399, 8828.002975, 11302.215662, 10328.830565, 9404.901993,      9307.385836, 7009.9788, 7103.904861, 7702.959498, 7986.308061,      7677.617968, 8545.609766, 8782.155674, 7960.399667, 11396.168364,      6108.573218, 11157.846552, 11996.398122, 9436.025072, 7601.731706,      6561.738552, 6748.683511, 9863.021507, 9387.335884, 13130.020655,      8762.927768, 9988.949414, 8399.15, 10101.165348, 7753.584266,      10180.431082, 7407.616034, 10082.5818, 9537.223848, 7360.044866,      8672.125241, 11896.61317, 9188.499391, 14497.393539, 13027.386484,      16958.46242, 15089.917269, 13509.901996, 14564.768268, 12059.234007,      9316.761604, 11308.205869, 9669.141958, 12864.63848, 11524.866425,      5421.733909, 8647.091748, 10105.426114, 10584.591181, 13106.51712,      9479.281342, 10616.655944, 12393.127582, 7760.382903, 10969.315256,      6398.641486, 8636.939034, 8843.261472, 6502.769207, 13388.724605,      13924.64678, 14271.725498, 10877.619318, 14228.969009, 9367.845149,      7842.985808, 9232.707133, 13043.96637, 9237.032366, 8939.464373,      8531.132636, 7079.01195, 9705.812326, 10289.083287, 15628.575709,      10835.459224, 9594.79381, 11236.559344, 7051.83592, 11307.658657,      11070.811825, 12699.732926, 7101.793614, 12663.682886, 7934.747765,      9600.666543, 10769.102635, 8778.104036, 8127.118396, 7128.254242,      13417.328212, 15546.215489, 19957.239934, 12066.649255, 16619.007474,      12282.968054, 11755.163618, 10706.765565, 11927.693805, 9532.880665,      11387.172049, 9107.992058, 11645.230736, 10136.635143, 9062.404166,      9373.082883, 9215.517837, 8595.080677, 10000.015403, 10381.576323,      12302.954954, 10143.649419, 8080.973395, 7264.695448, 10508.368742,      8208.923846, 7989.958401, 8120.027122, 6602.391386, 8780.451519,      8481.42276, 10295.348873, 10747.375964, 12023.819373, 9257.263138,      9872.956088, 8838.624722, 9985.949665, 9842.416491, 8227.782136,      12772.15574, 7037.584312, 9906.743471, 8421.408087, 7092.552025,      11206.061683, 7978.206235, 11793.212235, 7319.147599, 7329.73737,      10106.062749, 12371.653766, 9073.853801, 11092.951384, 9580.809008,      10865.369261, 8926.201158, 11146.901005, 10848.913392, 8667.022944,      10513.652134, 8745.057899, 12944.741373, 9574.161074, 11940.521945,      9033.625889, 12338.160411, 14933.37738, 13782.751527, 22713.819971,      18012.846533, 12459.106366, 19520.441161, 12800.674576, 13481.769913,      10213.399503, 13526.48684, 12390.076276, 11067.580526, 9832.88178,      7725.916147, 11786.19731, 5421.733909, 12235.922352, 10928.188656,      10360.87907, 10528.1431, 9412.224138, 7416.650771, 8427.782051,      8457.863978, 9470.432432, 8498.080328, 8750.030129, 11299.106498,      7540.976656, 12802.25257, 10893.762596, 6619.932397, 9065.74985,      8963.729293, 7700.217079, 7992.93997, 7945.20396, 7219.935905,      9949.272583, 8226.640394, 8733.883025, 8891.511834, 8947.602528,      11747.257893, 8242.186064, 6048.887084, 8859.143656, 11230.95668,      9704.660134, 11916.715607, 8981.63753, 10762.936983, 6722.157048,      9101.784044, 8561.815567, 9582.188937, 8169.299538, 8996.95022,      7689.421102, 7192.308026, 7431.348413, 7839.114314, 8012.720158,      13689.648935, 14776.121451, 22306.368861, 14017.158218, 18996.201304,      13472.29011, 13704.54664, 17935.643677, 11532.813908, 11591.464247,      16607.307299, 13089.828808, 11324.658709, 11750.491094, 10981.720456,      11245.356004, 11610.35747, 9269.2439, 10122.848992, 7566.666874,      11184.921534, 9166.012535, 11273.367499, 9593.545145, 12479.911946,      9011.115786, 10867.976043, 8924.440205, 8787.677923)), row.names = c(NA,  -260L), class = "data.frame"), num.trees = 50L, mtry = 1, importance = "impurity",      num.threads = NULL, nodesize = NULL, maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      260 
#> Number of independent variables:  3 
#> Mtry:                             1 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       2176044 
#> R squared (OOB):                  0.7109885 
#>   Foreig01   PrSect01   UnemrT01 
#>  313610842 1042712615  406597134 
#>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
#> -9838.77 -1324.07   -85.92  -132.07   819.21  9273.48 
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -1140.459  -122.688   -31.096     2.094   107.056  1707.389 
#>              Min       Max     Mean      StD
#> Foreig01 3998476  75901492 17457393 13111412
#> PrSect01 5191832 102223351 23465323 15112667
#> UnemrT01 3604564 119790711 17162886 15174973
#> 
#> Number of Observations: 260
#> Number of Independent Variables: 3
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 524487.746
#> R-squared (Not OOB) %: 93.007
#> AIC (Not OOB): 3432.246
#> AICc (Not OOB): 3432.403
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 4181086.762
#> R-squared (OOB) %: 44.254
#> AIC (OOB): 3971.981
#> AICc (OOB): 3972.138
#> Mean squared error Predicted (Not OOB): 76104.64
#> R-squared Predicted (Not OOB) %: 98.985
#> AIC Predicted (Not OOB): 2930.365
#> AICc Predicted (Not OOB): 2930.522
#> 
#> Calculation time (in seconds): 1.7469
#> Ranger result
#> 
#> Call:
#>  ranger(Income01 ~ Foreig01 + PrSect01 + UnemrT01, data = structure(list(     Foreig01 = c(1.339977, 0.890172, 2.552864, 2.463825, 1.991885,      4.665301, 4.815093, 4.382022, 6.62604, 3.013393, 4.472027,      5.276178, 2.344013, 1.753005, 1.10597, 1.760782, 6.263982,      4.065584, 3.023547, 12.317792, 2.945441, 0.617024, 3.954178,      7.017951, 4.023361, 3.13649, 1.317752, 5.473717, 2.312979,      10.641892, 5.642833, 1.499305, 13.219145, 3.31992, 7.423719,      2.717079, 2.318117, 2.357132, 5.681818, 6.042729, 3.481225,      3.104939, 10.527485, 7.249063, 17.426785, 8.201391, 6.166604,      5.75461, 7.740544, 7.603582, 13.960731, 11.762564, 5.361922,      7.531381, 2.763603, 14.937336, 4.221252, 9.575518, 3.185956,      5.633256, 24.533592, 9.557235, 13.828361, 8.46983, 1.307351,      1.326379, 0.739066, 4.091277, 2.284376, 8.65707, 4.493009,      3.314757, 3.725453, 3.927859, 3.358342, 0.963082, 1.421484,      4.76081, 2.206378, 8.534976, 4.862805, 5.376344, 1.918058,      2.70233, 4.551465, 17.443299, 10.773481, 2.803964, 1.872839,      6.492916, 9.309483, 5.264627, 9.116022, 7.177934, 5.821225,      8.276884, 3.97829, 2.672556, 10.791309, 2.37487, 3.115023,      8.890436, 13.82815, 7.36147, 5.509564, 5.664887, 5.355954,      8.611015, 8.331449, 8.184301, 7.056066, 5.495312, 7.097849,      6.582164, 8.803252, 13.518336, 6.801438, 8.509372, 14.364707,      7.974206, 7.730033, 7.830598, 11.019203, 6.504752, 6.726014,      13.819578, 17.966102, 11.988178, 9.663226, 7.916497, 8.088618,      6.225509, 5.934958, 7.347162, 9.349243, 6.040992, 4.023818,      1.907888, 6.657243, 8.846268, 6.229869, 2.352673, 14.74122,      3.812906, 6.746862, 0.8522, 6.373809, 5.834723, 4.265624,      1.43841, 8.990228, 1.611482, 5.886121, 14.233419, 5.19424,      10.037652, 10.275453, 4.161395, 2.328034, 10.180573, 6.349635,      4.502847, 6.597823, 4.128939, 9.413947, 9.631219, 11.469108,      5.017, 5.025733, 8.043588, 9.058772, 4.68281, 6.433254, 12.438579,      9.830658, 7.101978, 8.723006, 8.515141, 6.678547, 5.757121,      4.429016, 2.605863, 4.438607, 9.210526, 3.132648, 0.357995,      7.323496, 14.097339, 6.451613, 7.18703, 4.976455, 1.923704,      6.982319, 9.876543, 7.916303, 2.961633, 2.688983, 1.663541,      1.664659, 0.062147, 2.637279, 5.799806, 5.183398, 6.780155,      3.03135, 2.765511, 3.610861, 3.024963, 2.228995, 2.285309,      3.845944, 4.739134, 7.524262, 0.321543, 9.47912, 19.157686,      6.345588, 5.082042, 12.927131, 9.315655, 1.315209, 4.130708,      7.771945, 7.359933, 7.761194, 14.780181, 10.156464, 11.460221,      13.59267, 6.558645, 7.208287, 11.146436, 8.205619, 4.682677,      6.65286, 6.18246, 3.252711, 3.736699, 7.97901, 7.109372,      15.055692, 13.387156, 13.233622, 12.38675, 7.463988, 5.658489,      12.962963, 13.889667, 11.746032, 3.938444, 1.680672, 4.765343,      5.142483, 20.259019, 7.67155, 4.048727, 6.25157, 6.310989,      7.400555, 8.900264), PrSect01 = c(70.206767, 57.748085, 28.412363,      42.787795, 44.731183, 5.374961, 1.218122, 25.957295, 0.847579,      29.397378, 24.652368, 40.024104, 47.0726, 47.674767, 54.581307,      38.775762, 37.212276, 23.277291, 24.122207, 36.839789, 25.113386,      52.922756, 48.589099, 23.579571, 30.988275, 53.68586, 34.608031,      63.47282, 61.155645, 42.602916, 7.864911, 19.215686, 28.121995,      29.62963, 26.769912, 37.23871, 29.615408, 50.880597, 16.361599,      32.053002, 41.260379, 47.43295, 22.881027, 43.056592, 0.515649,      0.361087, 0.309353, 0.429726, 0.515624, 5.838417, 15.238266,      53.857884, 16.574001, 14.583333, 4.161377, 5.720258, 20,      25.454545, 37.478109, 16.464088, 4.341671, 26.903553, 16.006904,      11.268322, 56.706408, 37.692656, 38.823028, 37.303852, 6.445493,      34.664993, 1.590318, 20.292905, 31.595236, 17.261758, 21.718973,      23.253676, 29.723837, 41.352201, 38.636966, 45.666551, 56.900124,      44.190172, 21.224781, 66.130079, 6.68381, 22.484472, 12.420156,      19.500245, 39.303754, 68.01065, 39.224697, 32.363107, 44.260506,      12.056562, 26.758572, 15.523418, 52.281369, 67.8333, 44.060725,      43.198681, 33.688984, 30.265756, 49.669926, 0.463182, 0.491463,      0.633389, 0.517554, 0.366845, 0.82332, 0.398047, 0.458925,      0.283763, 0.613263, 0.474993, 0.438809, 3.019678, 4.702739,      1.169509, 4.541261, 9.045477, 10.352113, 15.295877, 4.719357,      5.552309, 28.228228, 12.236287, 31.683168, 44.98284, 11.545543,      5.725071, 22.823121, 38.083927, 1.159091, 20.658431, 12.182284,      25.421061, 20.39555, 15.660427, 33.918837, 27.202407, 31.296344,      9.428216, 64.480874, 25.292137, 28.17224, 24.695122, 18.9669,      48.379164, 7.244547, 49.516324, 48.806999, 42.079395, 15.288577,      36.097368, 16.864528, 36.605617, 24.949971, 32.202216, 15.550423,      21.865889, 41.800387, 26.050272, 38.35232, 14.152989, 45.304102,      6.852248, 39.820481, 10.481552, 0.425861, 0.467575, 1.050271,      0.781873, 0.451669, 1.514451, 6.311523, 1.227819, 16.135987,      0.491722, 0.349096, 0.476543, 29.819161, 44.144144, 11.452587,      56, 7.658158, 16.574586, 23.594053, 12.075552, 2.439024,      65.793103, 51.843287, 47.257384, 45.10826, 51.351351, 45.701249,      7.298838, 49.159664, 13.235721, 40.009308, 62.992652, 30.067125,      42.931896, 52.172303, 48.856417, 58.607969, 57.756056, 19.057454,      28.368794, 30.543933, 53.617733, 30.949859, 5.275029, 43.202073,      59.071118, 38.639943, 25.041356, 32.841823, 16.761522, 25.029516,      16.531286, 42.385267, 40.660232, 42.81265, 29.070523, 52.111411,      25.659879, 66.371681, 67.480046, 55.569206, 51.205796, 42.586207,      0.367745, 0.302285, 0.497295, 0.883996, 0.716765, 0.448012,      0.328626, 0.572086, 2.442077, 15.073684, 2.054305, 4.613297,      6.518078, 0.364312, 5.284913, 7.039106, 19.320938, 6.478659,      20.368713, 27.027027, 19.911504, 11.524501, 26.279863, 9.341501,      7.477305, 47.181719, 37.721555, 38.57868, 35.838009), UnemrT01 = c(6.06239,      7.421934, 12.1437, 6.967742, 2.719665, 7.838207, 8.085858,      5.003381, 7.19091, 6.03052, 6.279391, 3.885847, 7.249525,      3.767865, 5.585205, 6.496654, 18.286311, 16.689682, 5.960549,      5.726141, 3.897883, 5.148515, 3.578084, 5.191048, 5.798817,      2.935138, 2.96846, 3.290469, 3.698939, 2.691425, 4.585775,      14.869029, 10.41782, 3.076923, 5.828548, 6.671484, 4.965232,      3.109183, 5.982206, 9.316298, 5.796229, 4.465593, 4.36019,      2.645777, 5.624998, 5.753463, 4.167878, 5.745355, 5.865497,      6.079738, 4.589434, 2.758007, 5.275038, 8.571429, 6.242561,      11.622439, 7.239819, 12.350598, 3.709949, 3.311966, 5.147717,      6.339144, 13.273453, 10.028391, 6.415621, 9.922417, 3.685218,      3.719812, 9.030693, 3.714694, 5.505411, 6.182881, 7.934726,      15.764364, 5.158126, 5.308964, 7.464694, 7.826087, 2.809278,      3.49345, 2.975472, 2.118423, 4.704569, 4.11999, 6.254473,      4.280618, 8.684381, 6.216358, 6.173946, 1.793052, 3.33713,      1.926851, 4.549401, 6.386438, 6.448413, 12.317644, 3.294009,      3.381548, 8.367845, 6.25966, 4.726811, 5.224525, 2.620229,      6.080016, 4.621528, 4.380707, 3.008167, 4.928766, 4.781411,      4.256849, 5.234798, 7.413793, 4.699718, 5.877712, 4.797139,      3.40752, 9.118504, 5.834153, 8.343512, 10.848741, 11.965282,      10.889016, 11.034832, 4.83871, 5.932203, 8.846154, 1.941748,      5.839809, 8.836888, 6.666993, 13.36772, 4.639262, 8.424908,      6.984719, 6.422553, 5.720858, 9.631886, 7.700063, 4.256553,      4.560742, 13.127499, 7.167602, 7.200811, 2.922515, 4.463895,      6.339235, 6.710119, 7.525326, 5.139822, 3.575593, 4.530499,      6.238922, 4.671632, 5.46305, 5.685698, 7.832546, 6.219839,      5.559189, 6.770335, 7.630162, 11.03574, 6.564108, 9.623993,      5.029412, 2.831226, 6.856146, 5.165409, 5.956961, 5.917458,      4.738235, 4.94433, 4.481024, 5.640914, 4.483216, 4.497696,      5.958702, 4.679102, 6.480184, 7.156274, 6.384455, 6.47715,      1.769912, 6.0406, 12.280702, 4.420085, 2.162162, 7.600418,      7.042809, 3.529412, 7.643312, 3.833072, 2.569373, 4.003079,      0.35, 5.191257, 10.851115, 10.526316, 4.028502, 9.019054,      6.188313, 8.377709, 4.551818, 5.106582, 3.063895, 6.528736,      5.407035, 7.758919, 14.533122, 8.795203, 4.398241, 6.147473,      5.829585, 3.471041, 5.874317, 6.480118, 3.674933, 6.866417,      5.14449, 6.615215, 8.164604, 10.044702, 4.729155, 8.525093,      5.978814, 3.329473, 6.767446, 0.673894, 2.685308, 6.365031,      4.689755, 2.602855, 5.52713, 3.888003, 3.922883, 5.351646,      6.147813, 5.227775, 4.818924, 4.318526, 6.918793, 6.505265,      3.946465, 4.729075, 5.786281, 7.185884, 7.264762, 6.478579,      7.479432, 5.949821, 5.144312, 1.333333, 3.211991, 12.816456,      0.677966, 13.852243, 6.557167, 4.44999, 6.408027, 5.806011,      7.009982), Income01 = c(6608.897469, 6700.375345, 8113.734335,      8254.78138, 8854.808951, 12089.546953, 11223.754399, 8828.002975,      11302.215662, 10328.830565, 9404.901993, 9307.385836, 7009.9788,      7103.904861, 7702.959498, 7986.308061, 7677.617968, 8545.609766,      8782.155674, 7960.399667, 11396.168364, 6108.573218, 11157.846552,      11996.398122, 9436.025072, 7601.731706, 6561.738552, 6748.683511,      9863.021507, 9387.335884, 13130.020655, 8762.927768, 9988.949414,      8399.15, 10101.165348, 7753.584266, 10180.431082, 7407.616034,      10082.5818, 9537.223848, 7360.044866, 8672.125241, 11896.61317,      9188.499391, 14497.393539, 13027.386484, 16958.46242, 15089.917269,      13509.901996, 14564.768268, 12059.234007, 9316.761604, 11308.205869,      9669.141958, 12864.63848, 11524.866425, 5421.733909, 8647.091748,      10105.426114, 10584.591181, 13106.51712, 9479.281342, 10616.655944,      12393.127582, 7760.382903, 7677.032664, 9259.577454, 8888.786526,      11165.632108, 8698.950125, 16570.163224, 9969.430572, 8615.250773,      9911.50949, 11556.608348, 10024.730993, 10163.272567, 7449.295834,      8272.693788, 8712.479825, 7415.7966, 8129.73061, 10535.622267,      7714.695626, 11928.756482, 10429.892408, 10073.256411, 10269.971914,      8504.131187, 7590.490634, 10698.178577, 8754.512875, 9093.900799,      10771.582496, 8862.16138, 11126.873309, 7343.168771, 7435.687056,      8922.910571, 7529.754975, 8687.94206, 11534.499063, 9953.122462,      13966.464409, 14465.664932, 18932.911377, 19938.129264, 13399.832918,      20040.300881, 24573.894541, 12433.888268, 11085.772268, 12571.419116,      13734.152858, 16035.157882, 20617.695628, 11458.787767, 15578.637857,      12144.689612, 9532.880665, 9296.633841, 9167.76417, 11774.029563,      12157.022236, 9025.079789, 9261.601516, 8888.138597, 10033.980853,      13184.757809, 11612.229683, 8780.451519, 8481.42276, 10295.348873,      10747.375964, 12023.819373, 9257.263138, 9872.956088, 8838.624722,      9985.949665, 9842.416491, 8227.782136, 12772.15574, 7037.584312,      9906.743471, 8421.408087, 7092.552025, 11206.061683, 7978.206235,      11793.212235, 7319.147599, 7329.73737, 10106.062749, 12371.653766,      9073.853801, 11092.951384, 9580.809008, 10865.369261, 8926.201158,      11146.901005, 10848.913392, 8667.022944, 10513.652134, 8745.057899,      12944.741373, 9574.161074, 11940.521945, 9033.625889, 12338.160411,      14933.37738, 13782.751527, 22713.819971, 18012.846533, 12459.106366,      19520.441161, 12800.674576, 13481.769913, 10213.399503, 13526.48684,      12390.076276, 11067.580526, 9832.88178, 7725.916147, 11786.19731,      5421.733909, 12235.922352, 10928.188656, 10360.87907, 10528.1431,      9412.224138, 7416.650771, 8427.782051, 8457.863978, 9470.432432,      8498.080328, 8750.030129, 11299.106498, 7540.976656, 12802.25257,      10893.762596, 6619.932397, 9065.74985, 8963.729293, 7700.217079,      7992.93997, 7945.20396, 7219.935905, 9949.272583, 8226.640394,      8733.883025, 8891.511834, 8947.602528, 11747.257893, 8242.186064,      6048.887084, 8859.143656, 11230.95668, 9704.660134, 11916.715607,      8981.63753, 10762.936983, 6722.157048, 9101.784044, 8561.815567,      9582.188937, 8169.299538, 8996.95022, 7689.421102, 7192.308026,      7431.348413, 7839.114314, 8012.720158, 13689.648935, 14776.121451,      22306.368861, 14017.158218, 18996.201304, 13472.29011, 13704.54664,      17935.643677, 11532.813908, 11591.464247, 16607.307299, 13089.828808,      11324.658709, 11750.491094, 10981.720456, 11245.356004, 11610.35747,      9269.2439, 10122.848992, 7566.666874, 11184.921534, 9166.012535,      11273.367499, 9593.545145, 12479.911946, 9011.115786, 10867.976043,      8924.440205, 8787.677923)), row.names = c(NA, -260L), class = "data.frame"),      num.trees = 50L, mtry = 1, importance = "impurity", num.threads = NULL,      nodesize = NULL, maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      260 
#> Number of independent variables:  3 
#> Mtry:                             1 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       3077290 
#> R squared (OOB):                  0.6619007 
#>   Foreig01   PrSect01   UnemrT01 
#>  456477408 1292640090  526521461 
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#> -8558.5 -1334.4  -244.9  -192.3  1064.8  9797.8 
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -1855.143  -151.348   -25.664    -1.435   115.644  1603.504 
#>              Min       Max     Mean      StD
#> Foreig01 3653034 107971067 18420656 17001135
#> PrSect01 4376722 129414289 23711997 17971267
#> UnemrT01 2756979 124897600 20826932 22179466
#> 
#> Number of Observations: 260
#> Number of Independent Variables: 3
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 703869.007
#> R-squared (Not OOB) %: 92.237
#> AIC (Not OOB): 3508.73
#> AICc (Not OOB): 3508.887
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 5143440.547
#> R-squared (OOB) %: 43.271
#> AIC (OOB): 4025.841
#> AICc (OOB): 4025.997
#> Mean squared error Predicted (Not OOB): 98477.184
#> R-squared Predicted (Not OOB) %: 98.914
#> AIC Predicted (Not OOB): 2997.371
#> AICc Predicted (Not OOB): 2997.528
#> 
#> Calculation time (in seconds): 28.0712
#> Ranger result
#> 
#> Call:
#>  ranger(Income01 ~ Foreig01 + PrSect01 + UnemrT01, data = structure(list(     Foreig01 = c(1.339977, 0.890172, 2.552864, 2.463825, 1.991885,      4.665301, 4.815093, 4.382022, 6.62604, 3.013393, 4.472027,      5.276178, 2.344013, 1.753005, 1.10597, 1.760782, 6.263982,      4.065584, 3.023547, 12.317792, 2.945441, 0.617024, 3.954178,      7.017951, 4.023361, 3.13649, 1.317752, 5.473717, 2.312979,      10.641892, 5.642833, 1.499305, 13.219145, 3.31992, 7.423719,      2.717079, 2.318117, 2.357132, 5.681818, 6.042729, 3.481225,      3.104939, 10.527485, 7.249063, 17.426785, 8.201391, 6.166604,      5.75461, 7.740544, 7.603582, 13.960731, 11.762564, 5.361922,      7.531381, 2.763603, 14.937336, 4.221252, 9.575518, 3.185956,      5.633256, 24.533592, 9.557235, 13.828361, 8.46983, 1.307351,      1.326379, 0.739066, 4.091277, 2.284376, 8.65707, 4.493009,      3.314757, 3.725453, 3.927859, 3.358342, 0.963082, 1.421484,      4.76081, 2.206378, 8.534976, 4.862805, 5.376344, 1.918058,      2.70233, 4.551465, 17.443299, 10.773481, 2.803964, 1.872839,      6.492916, 9.309483, 5.264627, 9.116022, 7.177934, 5.821225,      8.276884, 3.97829, 2.672556, 10.791309, 2.37487, 3.115023,      8.890436, 13.82815, 7.36147, 5.509564, 5.664887, 5.355954,      8.611015, 8.331449, 8.184301, 7.056066, 5.495312, 7.097849,      6.582164, 8.803252, 13.518336, 6.801438, 8.509372, 14.364707,      7.974206, 7.730033, 7.830598, 11.019203, 6.504752, 6.726014,      13.819578, 17.966102, 11.988178, 9.663226, 7.916497, 1.99678,      0.038337, 0.598828, 0.695308, 1.317189, 7.200951, 6.90266,      2.722651, 4.978021, 6.001122, 3.628457, 2.303796, 18.517776,      2.034241, 2.966533, 5.752894, 8.021119, 2.762162, 4.345621,      18.693849, 9.498062, 6.852363, 5.997017, 4.315751, 2.739917,      7.213248, 6.868, 5.301864, 2.284037, 5.205073, 1.953719,      7.753512, 6.779058, 8.847185, 7.827199, 9.441715, 8.244769,      4.805635, 5.155828, 7.097387, 6.705269, 13.038322, 7.206725,      5.871832, 5.506176, 11.399549, 4.899598, 1.143241, 4.210526,      10.188476, 1.102941, 9.291085, 4.733728, 14.470678, 6.573276,      4.912837, 9.170128, 5.853358, 3.513776, 3.856971, 4.195804,      2.148056, 14.680209, 8.889386, 4.960728, 2.961633, 2.688983,      1.663541, 1.664659, 0.062147, 2.637279, 5.799806, 5.183398,      6.780155, 3.03135, 2.765511, 3.610861, 3.024963, 2.228995,      2.285309, 3.845944, 4.739134, 7.524262, 0.321543, 9.47912,      19.157686, 6.345588, 5.082042, 12.927131, 9.315655, 1.315209,      4.130708, 7.771945, 7.359933, 7.761194, 14.780181, 10.156464,      11.460221, 13.59267, 6.558645, 7.208287, 11.146436, 8.205619,      4.682677, 6.65286, 6.18246, 3.252711, 3.736699, 7.97901,      7.109372, 15.055692, 13.387156, 13.233622, 12.38675, 7.463988,      5.658489, 12.962963, 13.889667, 11.746032, 3.938444, 1.680672,      4.765343, 5.142483, 20.259019, 7.67155, 4.048727, 6.25157,      6.310989, 7.400555, 8.900264), PrSect01 = c(70.206767, 57.748085,      28.412363, 42.787795, 44.731183, 5.374961, 1.218122, 25.957295,      0.847579, 29.397378, 24.652368, 40.024104, 47.0726, 47.674767,      54.581307, 38.775762, 37.212276, 23.277291, 24.122207, 36.839789,      25.113386, 52.922756, 48.589099, 23.579571, 30.988275, 53.68586,      34.608031, 63.47282, 61.155645, 42.602916, 7.864911, 19.215686,      28.121995, 29.62963, 26.769912, 37.23871, 29.615408, 50.880597,      16.361599, 32.053002, 41.260379, 47.43295, 22.881027, 43.056592,      0.515649, 0.361087, 0.309353, 0.429726, 0.515624, 5.838417,      15.238266, 53.857884, 16.574001, 14.583333, 4.161377, 5.720258,      20, 25.454545, 37.478109, 16.464088, 4.341671, 26.903553,      16.006904, 11.268322, 56.706408, 37.692656, 38.823028, 37.303852,      6.445493, 34.664993, 1.590318, 20.292905, 31.595236, 17.261758,      21.718973, 23.253676, 29.723837, 41.352201, 38.636966, 45.666551,      56.900124, 44.190172, 21.224781, 66.130079, 6.68381, 22.484472,      12.420156, 19.500245, 39.303754, 68.01065, 39.224697, 32.363107,      44.260506, 12.056562, 26.758572, 15.523418, 52.281369, 67.8333,      44.060725, 43.198681, 33.688984, 30.265756, 49.669926, 0.463182,      0.491463, 0.633389, 0.517554, 0.366845, 0.82332, 0.398047,      0.458925, 0.283763, 0.613263, 0.474993, 0.438809, 3.019678,      4.702739, 1.169509, 4.541261, 9.045477, 10.352113, 15.295877,      4.719357, 5.552309, 28.228228, 12.236287, 31.683168, 44.98284,      11.545543, 5.725071, 21.817852, 92.912436, 37.69697, 44.698545,      58.076846, 0.834415, 12.871646, 1.480707, 1.154857, 9.59213,      43.03042, 56.606724, 15.64907, 6.843546, 27.572169, 55.736337,      56.198347, 68.631464, 42.735043, 6.319515, 8.396947, 51.096154,      30.266171, 17.692308, 51.948052, 14.317028, 20.297168, 2.567481,      40.04717, 17.467761, 33.86938, 46.38916, 34.49692, 36.956522,      55.393008, 60.579377, 0.278552, 0.45586, 0.521431, 0.551688,      0.319103, 7.621111, 6.583814, 1.056288, 0.762893, 3.930131,      29.294261, 18.808777, 13.157895, 18.308351, 43.809524, 17.768595,      31.428571, 14.63539, 5.836576, 13.366337, 4.961814, 12.782486,      54.140389, 62.739767, 25.19685, 53.339605, 61.525841, 51.305684,      63.929619, 7.298838, 49.159664, 13.235721, 40.009308, 62.992652,      30.067125, 42.931896, 52.172303, 48.856417, 58.607969, 57.756056,      19.057454, 28.368794, 30.543933, 53.617733, 30.949859, 5.275029,      43.202073, 59.071118, 38.639943, 25.041356, 32.841823, 16.761522,      25.029516, 16.531286, 42.385267, 40.660232, 42.81265, 29.070523,      52.111411, 25.659879, 66.371681, 67.480046, 55.569206, 51.205796,      42.586207, 0.367745, 0.302285, 0.497295, 0.883996, 0.716765,      0.448012, 0.328626, 0.572086, 2.442077, 15.073684, 2.054305,      4.613297, 6.518078, 0.364312, 5.284913, 7.039106, 19.320938,      6.478659, 20.368713, 27.027027, 19.911504, 11.524501, 26.279863,      9.341501, 7.477305, 47.181719, 37.721555, 38.57868, 35.838009     ), UnemrT01 = c(6.06239, 7.421934, 12.1437, 6.967742, 2.719665,      7.838207, 8.085858, 5.003381, 7.19091, 6.03052, 6.279391,      3.885847, 7.249525, 3.767865, 5.585205, 6.496654, 18.286311,      16.689682, 5.960549, 5.726141, 3.897883, 5.148515, 3.578084,      5.191048, 5.798817, 2.935138, 2.96846, 3.290469, 3.698939,      2.691425, 4.585775, 14.869029, 10.41782, 3.076923, 5.828548,      6.671484, 4.965232, 3.109183, 5.982206, 9.316298, 5.796229,      4.465593, 4.36019, 2.645777, 5.624998, 5.753463, 4.167878,      5.745355, 5.865497, 6.079738, 4.589434, 2.758007, 5.275038,      8.571429, 6.242561, 11.622439, 7.239819, 12.350598, 3.709949,      3.311966, 5.147717, 6.339144, 13.273453, 10.028391, 6.415621,      9.922417, 3.685218, 3.719812, 9.030693, 3.714694, 5.505411,      6.182881, 7.934726, 15.764364, 5.158126, 5.308964, 7.464694,      7.826087, 2.809278, 3.49345, 2.975472, 2.118423, 4.704569,      4.11999, 6.254473, 4.280618, 8.684381, 6.216358, 6.173946,      1.793052, 3.33713, 1.926851, 4.549401, 6.386438, 6.448413,      12.317644, 3.294009, 3.381548, 8.367845, 6.25966, 4.726811,      5.224525, 2.620229, 6.080016, 4.621528, 4.380707, 3.008167,      4.928766, 4.781411, 4.256849, 5.234798, 7.413793, 4.699718,      5.877712, 4.797139, 3.40752, 9.118504, 5.834153, 8.343512,      10.848741, 11.965282, 10.889016, 11.034832, 4.83871, 5.932203,      8.846154, 1.941748, 5.839809, 8.836888, 6.666993, 5.221281,      2.15424, 3.746435, 5.143796, 5.673624, 6.336333, 4.653253,      5.61862, 8.363331, 5.573834, 5.586524, 3.489908, 8.665065,      5.398406, 5.015233, 2.143295, 2.276065, 2.759719, 3.769705,      8.889912, 5.629669, 5.144108, 3.600497, 5.405405, 3.399433,      6.068487, 3.698704, 8.493895, 6.319046, 4.612804, 4.392846,      3.491507, 2.573124, 6.122449, 4.43128, 4.833617, 4.348947,      4.943621, 4.004405, 6.606146, 4.202529, 4.835082, 4.33121,      8.056316, 6.550318, 9.84252, 5.081193, 12.121212, 7, 7.555262,      1.869159, 5.958549, 4.669261, 12.494422, 19.6875, 3.809524,      15.389431, 6.100796, 2.001881, 4.458874, 8.724016, 3.407542,      2.284569, 5.938448, 2.198853, 10.851115, 10.526316, 4.028502,      9.019054, 6.188313, 8.377709, 4.551818, 5.106582, 3.063895,      6.528736, 5.407035, 7.758919, 14.533122, 8.795203, 4.398241,      6.147473, 5.829585, 3.471041, 5.874317, 6.480118, 3.674933,      6.866417, 5.14449, 6.615215, 8.164604, 10.044702, 4.729155,      8.525093, 5.978814, 3.329473, 6.767446, 0.673894, 2.685308,      6.365031, 4.689755, 2.602855, 5.52713, 3.888003, 3.922883,      5.351646, 6.147813, 5.227775, 4.818924, 4.318526, 6.918793,      6.505265, 3.946465, 4.729075, 5.786281, 7.185884, 7.264762,      6.478579, 7.479432, 5.949821, 5.144312, 1.333333, 3.211991,      12.816456, 0.677966, 13.852243, 6.557167, 4.44999, 6.408027,      5.806011, 7.009982), Income01 = c(6608.897469, 6700.375345,      8113.734335, 8254.78138, 8854.808951, 12089.546953, 11223.754399,      8828.002975, 11302.215662, 10328.830565, 9404.901993, 9307.385836,      7009.9788, 7103.904861, 7702.959498, 7986.308061, 7677.617968,      8545.609766, 8782.155674, 7960.399667, 11396.168364, 6108.573218,      11157.846552, 11996.398122, 9436.025072, 7601.731706, 6561.738552,      6748.683511, 9863.021507, 9387.335884, 13130.020655, 8762.927768,      9988.949414, 8399.15, 10101.165348, 7753.584266, 10180.431082,      7407.616034, 10082.5818, 9537.223848, 7360.044866, 8672.125241,      11896.61317, 9188.499391, 14497.393539, 13027.386484, 16958.46242,      15089.917269, 13509.901996, 14564.768268, 12059.234007, 9316.761604,      11308.205869, 9669.141958, 12864.63848, 11524.866425, 5421.733909,      8647.091748, 10105.426114, 10584.591181, 13106.51712, 9479.281342,      10616.655944, 12393.127582, 7760.382903, 7677.032664, 9259.577454,      8888.786526, 11165.632108, 8698.950125, 16570.163224, 9969.430572,      8615.250773, 9911.50949, 11556.608348, 10024.730993, 10163.272567,      7449.295834, 8272.693788, 8712.479825, 7415.7966, 8129.73061,      10535.622267, 7714.695626, 11928.756482, 10429.892408, 10073.256411,      10269.971914, 8504.131187, 7590.490634, 10698.178577, 8754.512875,      9093.900799, 10771.582496, 8862.16138, 11126.873309, 7343.168771,      7435.687056, 8922.910571, 7529.754975, 8687.94206, 11534.499063,      9953.122462, 13966.464409, 14465.664932, 18932.911377, 19938.129264,      13399.832918, 20040.300881, 24573.894541, 12433.888268, 11085.772268,      12571.419116, 13734.152858, 16035.157882, 20617.695628, 11458.787767,      15578.637857, 12144.689612, 9532.880665, 9296.633841, 9167.76417,      11774.029563, 12157.022236, 9025.079789, 9261.601516, 8888.138597,      10033.980853, 13184.757809, 11612.229683, 10969.315256, 6398.641486,      8636.939034, 8843.261472, 6502.769207, 13388.724605, 13924.64678,      14271.725498, 10877.619318, 14228.969009, 9367.845149, 7842.985808,      9232.707133, 13043.96637, 9237.032366, 8939.464373, 8531.132636,      7079.01195, 9705.812326, 10289.083287, 15628.575709, 10835.459224,      9594.79381, 11236.559344, 7051.83592, 11307.658657, 11070.811825,      12699.732926, 7101.793614, 12663.682886, 7934.747765, 9600.666543,      10769.102635, 8778.104036, 8127.118396, 7128.254242, 13417.328212,      15546.215489, 19957.239934, 12066.649255, 16619.007474, 12282.968054,      11755.163618, 10706.765565, 11927.693805, 9532.880665, 11387.172049,      9107.992058, 11645.230736, 10136.635143, 9062.404166, 9373.082883,      9215.517837, 8595.080677, 10000.015403, 10381.576323, 12302.954954,      10143.649419, 8080.973395, 7264.695448, 10508.368742, 8208.923846,      7989.958401, 8120.027122, 6602.391386, 11299.106498, 7540.976656,      12802.25257, 10893.762596, 6619.932397, 9065.74985, 8963.729293,      7700.217079, 7992.93997, 7945.20396, 7219.935905, 9949.272583,      8226.640394, 8733.883025, 8891.511834, 8947.602528, 11747.257893,      8242.186064, 6048.887084, 8859.143656, 11230.95668, 9704.660134,      11916.715607, 8981.63753, 10762.936983, 6722.157048, 9101.784044,      8561.815567, 9582.188937, 8169.299538, 8996.95022, 7689.421102,      7192.308026, 7431.348413, 7839.114314, 8012.720158, 13689.648935,      14776.121451, 22306.368861, 14017.158218, 18996.201304, 13472.29011,      13704.54664, 17935.643677, 11532.813908, 11591.464247, 16607.307299,      13089.828808, 11324.658709, 11750.491094, 10981.720456, 11245.356004,      11610.35747, 9269.2439, 10122.848992, 7566.666874, 11184.921534,      9166.012535, 11273.367499, 9593.545145, 12479.911946, 9011.115786,      10867.976043, 8924.440205, 8787.677923)), row.names = c(NA,  -260L), class = "data.frame"), num.trees = 50L, mtry = 1, importance = "impurity",      num.threads = NULL, nodesize = NULL, maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      260 
#> Number of independent variables:  3 
#> Mtry:                             1 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       2899548 
#> R squared (OOB):                  0.6703987 
#>   Foreig01   PrSect01   UnemrT01 
#>  474892637 1145850590  522926157 
#>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
#> -6883.81 -1034.21  -152.77   -73.56   975.02  9234.91 
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -1231.987  -141.761   -18.627     4.329    90.711  2219.220 
#>              Min       Max     Mean      StD
#> Foreig01 3174892 112410892 18682794 15485809
#> PrSect01 3486886 119249689 24806382 17402903
#> UnemrT01 2286145 130163140 21579468 22733938
#> 
#> Number of Observations: 260
#> Number of Independent Variables: 3
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 691826.112
#> R-squared (Not OOB) %: 92.105
#> AIC (Not OOB): 3504.243
#> AICc (Not OOB): 3504.4
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 3623833.587
#> R-squared (OOB) %: 58.648
#> AIC (OOB): 3934.791
#> AICc (OOB): 3934.948
#> Mean squared error Predicted (Not OOB): 88382.266
#> R-squared Predicted (Not OOB) %: 98.991
#> AIC Predicted (Not OOB): 2969.251
#> AICc Predicted (Not OOB): 2969.408
#> 
#> Calculation time (in seconds): 5.2595
#> Ranger result
#> 
#> Call:
#>  ranger(Income01 ~ Foreig01 + PrSect01 + UnemrT01, data = structure(list(     Foreig01 = c(1.339977, 0.890172, 2.552864, 2.463825, 1.991885,      4.665301, 4.815093, 4.382022, 6.62604, 3.013393, 4.472027,      5.276178, 2.344013, 1.753005, 1.10597, 1.760782, 6.263982,      4.065584, 3.023547, 12.317792, 2.945441, 0.617024, 3.954178,      7.017951, 4.023361, 3.13649, 1.317752, 5.473717, 2.312979,      10.641892, 5.642833, 1.499305, 13.219145, 3.31992, 7.423719,      2.717079, 2.318117, 2.357132, 5.681818, 6.042729, 3.481225,      3.104939, 10.527485, 7.249063, 17.426785, 8.201391, 6.166604,      5.75461, 7.740544, 7.603582, 13.960731, 11.762564, 5.361922,      7.531381, 2.763603, 14.937336, 4.221252, 9.575518, 3.185956,      5.633256, 24.533592, 9.557235, 13.828361, 8.46983, 1.307351,      1.326379, 0.739066, 4.091277, 2.284376, 8.65707, 4.493009,      3.314757, 3.725453, 3.927859, 3.358342, 0.963082, 1.421484,      4.76081, 2.206378, 8.534976, 4.862805, 5.376344, 1.918058,      2.70233, 4.551465, 17.443299, 10.773481, 2.803964, 1.872839,      6.492916, 9.309483, 5.264627, 9.116022, 7.177934, 5.821225,      8.276884, 3.97829, 2.672556, 10.791309, 2.37487, 3.115023,      8.890436, 13.82815, 7.36147, 5.509564, 5.664887, 5.355954,      8.611015, 8.331449, 8.184301, 7.056066, 5.495312, 7.097849,      6.582164, 8.803252, 13.518336, 6.801438, 8.509372, 14.364707,      7.974206, 7.730033, 7.830598, 11.019203, 6.504752, 6.726014,      13.819578, 17.966102, 11.988178, 9.663226, 7.916497, 1.99678,      0.038337, 0.598828, 0.695308, 1.317189, 7.200951, 6.90266,      2.722651, 4.978021, 6.001122, 3.628457, 2.303796, 18.517776,      2.034241, 2.966533, 5.752894, 8.021119, 2.762162, 4.345621,      18.693849, 9.498062, 6.852363, 5.997017, 4.315751, 2.739917,      7.213248, 6.868, 5.301864, 2.284037, 5.205073, 1.953719,      7.753512, 6.779058, 8.847185, 7.827199, 9.441715, 8.244769,      4.805635, 5.155828, 7.097387, 6.705269, 13.038322, 7.206725,      5.871832, 5.506176, 11.399549, 4.899598, 1.143241, 4.210526,      10.188476, 1.102941, 9.291085, 4.733728, 14.470678, 6.573276,      4.912837, 9.170128, 5.853358, 3.513776, 3.856971, 4.195804,      2.148056, 14.680209, 8.889386, 4.960728, 8.088618, 6.225509,      5.934958, 7.347162, 9.349243, 6.040992, 4.023818, 1.907888,      6.657243, 8.846268, 6.229869, 2.352673, 14.74122, 3.812906,      6.746862, 0.8522, 6.373809, 5.834723, 4.265624, 1.43841,      8.990228, 1.611482, 5.886121, 14.233419, 5.19424, 10.037652,      10.275453, 4.161395, 2.328034, 10.180573, 6.349635, 4.502847,      6.597823, 4.128939, 9.413947, 9.631219, 11.469108, 5.017,      5.025733, 8.043588, 9.058772, 4.68281, 6.433254, 12.438579,      9.830658, 7.101978, 8.723006, 8.515141, 6.678547, 5.757121,      4.429016, 2.605863, 4.438607, 9.210526, 3.132648, 0.357995,      7.323496, 14.097339, 6.451613, 7.18703, 4.976455, 1.923704,      6.982319, 9.876543, 7.916303), PrSect01 = c(70.206767, 57.748085,      28.412363, 42.787795, 44.731183, 5.374961, 1.218122, 25.957295,      0.847579, 29.397378, 24.652368, 40.024104, 47.0726, 47.674767,      54.581307, 38.775762, 37.212276, 23.277291, 24.122207, 36.839789,      25.113386, 52.922756, 48.589099, 23.579571, 30.988275, 53.68586,      34.608031, 63.47282, 61.155645, 42.602916, 7.864911, 19.215686,      28.121995, 29.62963, 26.769912, 37.23871, 29.615408, 50.880597,      16.361599, 32.053002, 41.260379, 47.43295, 22.881027, 43.056592,      0.515649, 0.361087, 0.309353, 0.429726, 0.515624, 5.838417,      15.238266, 53.857884, 16.574001, 14.583333, 4.161377, 5.720258,      20, 25.454545, 37.478109, 16.464088, 4.341671, 26.903553,      16.006904, 11.268322, 56.706408, 37.692656, 38.823028, 37.303852,      6.445493, 34.664993, 1.590318, 20.292905, 31.595236, 17.261758,      21.718973, 23.253676, 29.723837, 41.352201, 38.636966, 45.666551,      56.900124, 44.190172, 21.224781, 66.130079, 6.68381, 22.484472,      12.420156, 19.500245, 39.303754, 68.01065, 39.224697, 32.363107,      44.260506, 12.056562, 26.758572, 15.523418, 52.281369, 67.8333,      44.060725, 43.198681, 33.688984, 30.265756, 49.669926, 0.463182,      0.491463, 0.633389, 0.517554, 0.366845, 0.82332, 0.398047,      0.458925, 0.283763, 0.613263, 0.474993, 0.438809, 3.019678,      4.702739, 1.169509, 4.541261, 9.045477, 10.352113, 15.295877,      4.719357, 5.552309, 28.228228, 12.236287, 31.683168, 44.98284,      11.545543, 5.725071, 21.817852, 92.912436, 37.69697, 44.698545,      58.076846, 0.834415, 12.871646, 1.480707, 1.154857, 9.59213,      43.03042, 56.606724, 15.64907, 6.843546, 27.572169, 55.736337,      56.198347, 68.631464, 42.735043, 6.319515, 8.396947, 51.096154,      30.266171, 17.692308, 51.948052, 14.317028, 20.297168, 2.567481,      40.04717, 17.467761, 33.86938, 46.38916, 34.49692, 36.956522,      55.393008, 60.579377, 0.278552, 0.45586, 0.521431, 0.551688,      0.319103, 7.621111, 6.583814, 1.056288, 0.762893, 3.930131,      29.294261, 18.808777, 13.157895, 18.308351, 43.809524, 17.768595,      31.428571, 14.63539, 5.836576, 13.366337, 4.961814, 12.782486,      54.140389, 62.739767, 25.19685, 53.339605, 61.525841, 51.305684,      63.929619, 22.823121, 38.083927, 1.159091, 20.658431, 12.182284,      25.421061, 20.39555, 15.660427, 33.918837, 27.202407, 31.296344,      9.428216, 64.480874, 25.292137, 28.17224, 24.695122, 18.9669,      48.379164, 7.244547, 49.516324, 48.806999, 42.079395, 15.288577,      36.097368, 16.864528, 36.605617, 24.949971, 32.202216, 15.550423,      21.865889, 41.800387, 26.050272, 38.35232, 14.152989, 45.304102,      6.852248, 39.820481, 10.481552, 0.425861, 0.467575, 1.050271,      0.781873, 0.451669, 1.514451, 6.311523, 1.227819, 16.135987,      0.491722, 0.349096, 0.476543, 29.819161, 44.144144, 11.452587,      56, 7.658158, 16.574586, 23.594053, 12.075552, 2.439024,      65.793103, 51.843287, 47.257384, 45.10826, 51.351351, 45.701249     ), UnemrT01 = c(6.06239, 7.421934, 12.1437, 6.967742, 2.719665,      7.838207, 8.085858, 5.003381, 7.19091, 6.03052, 6.279391,      3.885847, 7.249525, 3.767865, 5.585205, 6.496654, 18.286311,      16.689682, 5.960549, 5.726141, 3.897883, 5.148515, 3.578084,      5.191048, 5.798817, 2.935138, 2.96846, 3.290469, 3.698939,      2.691425, 4.585775, 14.869029, 10.41782, 3.076923, 5.828548,      6.671484, 4.965232, 3.109183, 5.982206, 9.316298, 5.796229,      4.465593, 4.36019, 2.645777, 5.624998, 5.753463, 4.167878,      5.745355, 5.865497, 6.079738, 4.589434, 2.758007, 5.275038,      8.571429, 6.242561, 11.622439, 7.239819, 12.350598, 3.709949,      3.311966, 5.147717, 6.339144, 13.273453, 10.028391, 6.415621,      9.922417, 3.685218, 3.719812, 9.030693, 3.714694, 5.505411,      6.182881, 7.934726, 15.764364, 5.158126, 5.308964, 7.464694,      7.826087, 2.809278, 3.49345, 2.975472, 2.118423, 4.704569,      4.11999, 6.254473, 4.280618, 8.684381, 6.216358, 6.173946,      1.793052, 3.33713, 1.926851, 4.549401, 6.386438, 6.448413,      12.317644, 3.294009, 3.381548, 8.367845, 6.25966, 4.726811,      5.224525, 2.620229, 6.080016, 4.621528, 4.380707, 3.008167,      4.928766, 4.781411, 4.256849, 5.234798, 7.413793, 4.699718,      5.877712, 4.797139, 3.40752, 9.118504, 5.834153, 8.343512,      10.848741, 11.965282, 10.889016, 11.034832, 4.83871, 5.932203,      8.846154, 1.941748, 5.839809, 8.836888, 6.666993, 5.221281,      2.15424, 3.746435, 5.143796, 5.673624, 6.336333, 4.653253,      5.61862, 8.363331, 5.573834, 5.586524, 3.489908, 8.665065,      5.398406, 5.015233, 2.143295, 2.276065, 2.759719, 3.769705,      8.889912, 5.629669, 5.144108, 3.600497, 5.405405, 3.399433,      6.068487, 3.698704, 8.493895, 6.319046, 4.612804, 4.392846,      3.491507, 2.573124, 6.122449, 4.43128, 4.833617, 4.348947,      4.943621, 4.004405, 6.606146, 4.202529, 4.835082, 4.33121,      8.056316, 6.550318, 9.84252, 5.081193, 12.121212, 7, 7.555262,      1.869159, 5.958549, 4.669261, 12.494422, 19.6875, 3.809524,      15.389431, 6.100796, 2.001881, 4.458874, 8.724016, 3.407542,      2.284569, 5.938448, 2.198853, 13.36772, 4.639262, 8.424908,      6.984719, 6.422553, 5.720858, 9.631886, 7.700063, 4.256553,      4.560742, 13.127499, 7.167602, 7.200811, 2.922515, 4.463895,      6.339235, 6.710119, 7.525326, 5.139822, 3.575593, 4.530499,      6.238922, 4.671632, 5.46305, 5.685698, 7.832546, 6.219839,      5.559189, 6.770335, 7.630162, 11.03574, 6.564108, 9.623993,      5.029412, 2.831226, 6.856146, 5.165409, 5.956961, 5.917458,      4.738235, 4.94433, 4.481024, 5.640914, 4.483216, 4.497696,      5.958702, 4.679102, 6.480184, 7.156274, 6.384455, 6.47715,      1.769912, 6.0406, 12.280702, 4.420085, 2.162162, 7.600418,      7.042809, 3.529412, 7.643312, 3.833072, 2.569373, 4.003079,      0.35, 5.191257), Income01 = c(6608.897469, 6700.375345, 8113.734335,      8254.78138, 8854.808951, 12089.546953, 11223.754399, 8828.002975,      11302.215662, 10328.830565, 9404.901993, 9307.385836, 7009.9788,      7103.904861, 7702.959498, 7986.308061, 7677.617968, 8545.609766,      8782.155674, 7960.399667, 11396.168364, 6108.573218, 11157.846552,      11996.398122, 9436.025072, 7601.731706, 6561.738552, 6748.683511,      9863.021507, 9387.335884, 13130.020655, 8762.927768, 9988.949414,      8399.15, 10101.165348, 7753.584266, 10180.431082, 7407.616034,      10082.5818, 9537.223848, 7360.044866, 8672.125241, 11896.61317,      9188.499391, 14497.393539, 13027.386484, 16958.46242, 15089.917269,      13509.901996, 14564.768268, 12059.234007, 9316.761604, 11308.205869,      9669.141958, 12864.63848, 11524.866425, 5421.733909, 8647.091748,      10105.426114, 10584.591181, 13106.51712, 9479.281342, 10616.655944,      12393.127582, 7760.382903, 7677.032664, 9259.577454, 8888.786526,      11165.632108, 8698.950125, 16570.163224, 9969.430572, 8615.250773,      9911.50949, 11556.608348, 10024.730993, 10163.272567, 7449.295834,      8272.693788, 8712.479825, 7415.7966, 8129.73061, 10535.622267,      7714.695626, 11928.756482, 10429.892408, 10073.256411, 10269.971914,      8504.131187, 7590.490634, 10698.178577, 8754.512875, 9093.900799,      10771.582496, 8862.16138, 11126.873309, 7343.168771, 7435.687056,      8922.910571, 7529.754975, 8687.94206, 11534.499063, 9953.122462,      13966.464409, 14465.664932, 18932.911377, 19938.129264, 13399.832918,      20040.300881, 24573.894541, 12433.888268, 11085.772268, 12571.419116,      13734.152858, 16035.157882, 20617.695628, 11458.787767, 15578.637857,      12144.689612, 9532.880665, 9296.633841, 9167.76417, 11774.029563,      12157.022236, 9025.079789, 9261.601516, 8888.138597, 10033.980853,      13184.757809, 11612.229683, 10969.315256, 6398.641486, 8636.939034,      8843.261472, 6502.769207, 13388.724605, 13924.64678, 14271.725498,      10877.619318, 14228.969009, 9367.845149, 7842.985808, 9232.707133,      13043.96637, 9237.032366, 8939.464373, 8531.132636, 7079.01195,      9705.812326, 10289.083287, 15628.575709, 10835.459224, 9594.79381,      11236.559344, 7051.83592, 11307.658657, 11070.811825, 12699.732926,      7101.793614, 12663.682886, 7934.747765, 9600.666543, 10769.102635,      8778.104036, 8127.118396, 7128.254242, 13417.328212, 15546.215489,      19957.239934, 12066.649255, 16619.007474, 12282.968054, 11755.163618,      10706.765565, 11927.693805, 9532.880665, 11387.172049, 9107.992058,      11645.230736, 10136.635143, 9062.404166, 9373.082883, 9215.517837,      8595.080677, 10000.015403, 10381.576323, 12302.954954, 10143.649419,      8080.973395, 7264.695448, 10508.368742, 8208.923846, 7989.958401,      8120.027122, 6602.391386, 8780.451519, 8481.42276, 10295.348873,      10747.375964, 12023.819373, 9257.263138, 9872.956088, 8838.624722,      9985.949665, 9842.416491, 8227.782136, 12772.15574, 7037.584312,      9906.743471, 8421.408087, 7092.552025, 11206.061683, 7978.206235,      11793.212235, 7319.147599, 7329.73737, 10106.062749, 12371.653766,      9073.853801, 11092.951384, 9580.809008, 10865.369261, 8926.201158,      11146.901005, 10848.913392, 8667.022944, 10513.652134, 8745.057899,      12944.741373, 9574.161074, 11940.521945, 9033.625889, 12338.160411,      14933.37738, 13782.751527, 22713.819971, 18012.846533, 12459.106366,      19520.441161, 12800.674576, 13481.769913, 10213.399503, 13526.48684,      12390.076276, 11067.580526, 9832.88178, 7725.916147, 11786.19731,      5421.733909, 12235.922352, 10928.188656, 10360.87907, 10528.1431,      9412.224138, 7416.650771, 8427.782051, 8457.863978, 9470.432432,      8498.080328, 8750.030129)), row.names = c(NA, -260L), class = "data.frame"),      num.trees = 50L, mtry = 1, importance = "impurity", num.threads = NULL,      nodesize = NULL, maxnodes = NULL) 
#> 
#> Type:                             Regression 
#> Number of trees:                  50 
#> Sample size:                      260 
#> Number of independent variables:  3 
#> Mtry:                             1 
#> Target node size:                 5 
#> Variable importance mode:         impurity 
#> Splitrule:                        variance 
#> OOB prediction error (MSE):       2930892 
#> R squared (OOB):                  0.6580596 
#>   Foreig01   PrSect01   UnemrT01 
#>  434738934 1128837729  462292278 
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -10493.66  -1065.63    -20.93    -78.52    945.37   9620.75 
#>       Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
#> -1988.8976  -124.8554   -14.0760     0.7845    74.1419  1845.8284 
#>              Min       Max     Mean      StD
#> Foreig01 3385555 111681234 18043412 14053397
#> PrSect01 3921895 110420861 24276159 15491039
#> UnemrT01 2561179 114267967 21480793 20998864
#> 
#> Number of Observations: 260
#> Number of Independent Variables: 3
#> Kernel: Adaptive
#> Neightbours: 20
#> 
#> --------------- Global ML Model Summary ---------------
#> 
#> Importance:
#> 
#> Mean Square Error (Not OOB): 734571.154
#> R-squared (Not OOB) %: 91.397
#> AIC (Not OOB): 3519.831
#> AICc (Not OOB): 3519.988
#> 
#> --------------- Local Model Summary ---------------
#> 
#> Residuals OOB:
#> 
#> Residuals Predicted (Not OOB):
#> 
#> Local Variable Importance:
#> 
#> Mean squared error (OOB): 4581010.623
#> R-squared (OOB) %: 46.348
#> AIC (OOB): 3995.732
#> AICc (OOB): 3995.889
#> Mean squared error Predicted (Not OOB): 104651.99
#> R-squared Predicted (Not OOB) %: 98.774
#> AIC Predicted (Not OOB): 3013.183
#> AICc Predicted (Not OOB): 3013.34
#> 
#> Calculation time (in seconds): 2.9917

scores_dt <- bench_results$score(mlr3::msr("regr.rmse"))
rm(bench_results)

Results Visualization

We visualize the Root Mean Squared Error (RMSE) to compare the performance of our learners. A lower RMSE indicates a better fit to the spatial data.


results_dt <- as.data.table(scores_dt)

results_dt[, algorithm := gsub("regr.", "", learner_id, fixed = TRUE)]
results_dt[, dataset := task_id]
results_dt[, rmse := regr.rmse]

algo_order <- results_dt[, .(m = mean(rmse)), by = algorithm][order(-m), algorithm]
results_dt[, algorithm := factor(algorithm, levels = algo_order)]

results_dt[, dataset := factor(dataset, levels = c("Income", "California_Housing"))]

ggplot(results_dt, aes(x = rmse, y = algorithm)) +
  geom_point(
    shape = 21,
    size = 2,
    fill = "white",
    color = "black",
    stroke = 1
  ) +
  labs(
    x = "RMSE",
    y = "Algorithm"
  )


ggplot(results_dt,  aes(x = rmse, y = algorithm)) +
    geom_point(
    shape = 21,
    size = 2,
    fill = "white",
    color = "black",
    stroke = 1
  ) +
  facet_grid(dataset ~ .) +
  labs(
    x = "RMSE",
    y = "Algorithm"
  )