This script calculates for each model the best set of parameters for the random forest
library(tidyverse)
library(feather)
The script evaluate_rf.R
is a function performing a cross-validation
with a random forest and returning a set of performance measures
source("evaluate_rf.R")
Instead get_file_list.R
loads the list of the target files
with a set of metadata for each of them
source("get_file_list.R")
file_list <- get_file_list()
## Parsed with column specification:
## cols(
## area_name = col_character(),
## country = col_character(),
## source = col_character(),
## active = col_double(),
## filename = col_character()
## )
## Joining, by = c("area_name", "country", "source", "active", "filename")
print(head(file_list))
## # A tibble: 6 x 10
## area_name country source active filename max q95 median avg nas
## <chr> <chr> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <int>
## 1 AT AT ror 1 AT_ror.… 11419. 4604 2.75e3 2846. 0
## 2 AT AT solar 1 AT_sola… 886 468 1.30e1 115. 0
## 3 AT AT wind_o… 1 AT_wind… 2662 1527 2.60e2 439. 0
## 4 BE BE solar 1 BE_sola… 2620. 1595. 5.47e0 335. 0
## 5 BG BG ror 1 BG_ror.… 367 333 1.44e2 167. 0
## 6 BG BG solar 1 BG_sola… 856 658 3.00e0 150. 0
The target data is in BASE_PATH
and the NUTS_LEVEL
sets the level
of spatial aggregation for the predictors (meteorological data from ERA-NUTS)
BASE_PATH <- "ts_prod/"
NUTS_LEVEL <- "NUTS0"
res
will contain all the hyper-parameters
res <- NULL
For each target file the algorithm will test a set of hyper-parameters calculating the error
for (index in seq(1, nrow(file_list))) {
region <- file_list$country[index]
message(region)
#' Load the meteorological predictors
e5 <- sprintf("ERA5-NUTS-2015-2018/%s-%s.feather", region, NUTS_LEVEL) %>%
read_feather()
#' Load the target data
ts_prod <- paste0(BASE_PATH, file_list$filename[index]) %>%
read_feather()
#' Use for the target column in `ts_prod` the name `Generation`
if ("Value" %in% colnames(ts_prod)) {
ts_prod <- ts_prod %>%
rename(Generation = Value)
}
#' In the modelling omit all the target values where the generation
#' is below the 10th percentile.
THRES <- quantile(ts_prod$Generation, 0.1, na.rm = TRUE)
full <- inner_join(e5, ts_prod,
by = c("time" = "Datetime")
) %>%
select(-contains("Type")) %>%
select(-contains("Name")) %>%
select(-contains("Area")) %>%
select(-contains("region")) %>%
filter(!is.na(Generation)) %>%
filter(Generation > THRES) %>%
select(-time) %>%
select(-starts_with("CS_")) %>%
select(-starts_with("ssrdc_")) %>%
rename(y = Generation)
print(head(full))
#' Set the list of the hyper-parameters to explore. See the
#' the randomForest documentation for more information
if (nrow(full) > 0) {
NT <- c(50, 100, 200)
MNODES <- 100
MTRY <- unique(
round(
ncol(full) *
c(0.1, 0.2, 0.33, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
)
)
#' For each combination evaluate the randomForest (without cross-validation)
#' thus with `K` set to 1 and append the output to the results
for (nt in NT) {
for (mnodes in MNODES) {
for (mtry in MTRY) {
e <- evaluate_rf(full,
K = 1,
nt = nt,
mnodes = mnodes,
mtry = mtry,
assess_importance = FALSE
)
to_append <- tibble(
filename = file_list$filename[index],
nt = nt, mnodes = mnodes,
mtry = mtry,
oob_cor = e$single$cor,
oob_nmae = e$single$mae / mean(e$target)
)
if (is.null(res)) {
res <- to_append
} else {
res <- rbind(res, to_append)
}
}
}
}
}
}
## AT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5 33.2 -1.06 0.970 2.06 49.1 1623.
## 2 4.99 2.5 -1.53 0.920 1.99 48.9 1744
## 3 4.98 0 -2.12 0.920 1.86 48.8 1809.
## 4 4.99 0 -2.43 0.990 2.08 48.8 1810.
## 5 4.98 0 -2.62 1 2.16 48.8 1813.
## 6 4.97 0 -2.68 0.980 2.09 48.9 1770.
## AT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.98 0.100 -5.26 1.32 2.68 50.3 2
## 2 4.99 21.2 -4.64 1.28 2.59 50.3 10
## 3 4.99 72.9 -3.89 1.24 2.49 49.9 21
## 4 4.99 117. -2.43 1.19 2.13 50.1 32
## 5 5 137. -1.51 1.19 2.16 49.7 37
## 6 5 136. -0.970 1.23 2.29 49.4 35
## AT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.71 0 -6.07 1.10 2.06 49.3 70
## 2 4.71 0 -6.14 1.10 2.12 49.3 64
## 3 4.70 0 -6.08 1.17 2.21 49.4 65
## 4 4.70 0 -5.87 1.18 2.28 50.0 64
## 5 4.70 0 -5.78 1.21 2.40 50.3 64
## 6 4.70 0 -5.65 1.27 2.57 50.3 84
## BE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.940 0 -0.580 4.79 7.91 1.77 0.04
## 2 0.940 0.800 -0.380 5.16 8.36 1.74 92.7
## 3 0.940 31.3 0.190 4.98 7.93 1.76 375.
## 4 0.940 93.3 1.08 4.60 7.83 1.73 740.
## 5 0.950 153. 1.97 4.86 7.48 1.73 938.
## 6 0.950 192. 2.75 4.97 7.55 1.76 849.
## BG
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.290 45.6 16.0 0.920 2.17 0 59
## 2 0.290 198. 18.0 1.18 2.06 0 73
## 3 0.290 379. 20.5 1.67 2.22 0 72
## 4 0.270 665. 25.7 1.87 2.40 0 59
## 5 0.25 752. 29.0 1.73 2.20 0 63
## 6 0.25 707. 29.5 1.59 2 0 64
## BG
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.80 0.600 -12.0 2.17 4.21 16.6 52
## 2 2.60 58.5 -11.6 2.24 4.07 16.7 234
## 3 2.61 186. -9.5 2.38 4.06 16.6 445
## 4 2.60 304. -8.58 2.59 4.05 16.5 576
## 5 2.61 385 -6.40 2.74 3.83 16.3 599
## 6 2.60 408. -5.82 3.05 4.28 16.1 588
## BG
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.80 0 -11.5 2.95 5.16 16.0 472
## 2 2.79 0 -11.8 2.96 5.26 16.6 479
## 3 2.79 0 -12.2 2.94 5.29 17.0 465
## 4 2.80 0 -12.3 2.71 5.06 16.5 460
## 5 2.80 0 -12.4 2.5 4.64 16.6 468
## 6 2.79 0 -12.7 2.29 4.32 16.6 460
## CH
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3.45 0 -8.25 0.790 1.88 66.5 0.03
## 2 3.46 0 -8.56 0.75 1.80 66.8 0.05
## 3 3.46 0 -8.80 0.660 1.87 65.7 0.07
## 4 3.45 0 -8.83 0.580 1.80 64.6 0.07
## 5 3.45 0 -8.84 0.460 1.55 64.5 0.07
## 6 3.44 0 -8.74 0.420 1.43 64.8 0.07
## CZ
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.5 0 -2.40 1.97 3.93 8.73 95.9
## 2 1.5 0 -2.22 1.96 3.93 8.52 95.9
## 3 1.51 0 -2.02 1.97 3.95 8.48 96.0
## 4 1.54 0 -1.78 1.93 3.94 9.06 96
## 5 1.56 0 -1.60 1.92 3.97 9.15 96
## 6 1.61 0 -1.43 1.93 4.02 9.15 90.3
## CZ
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.60 0 -1.20 1.91 4.05 9.20 3.9
## 2 1.53 0 -0.880 1.93 4.13 9.22 7.3
## 3 1.58 8.10 -0.470 2 4.24 9.25 21
## 4 1.59 31.8 -0.0900 2.04 4.18 8.53 36.6
## 5 1.63 55.7 0.290 2.05 4.12 8.22 70.9
## 6 1.68 76.7 0.740 2.08 4.08 7.70 108.
## CZ
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.5 0 -2.40 1.97 3.93 8.73 28.5
## 2 1.5 0 -2.22 1.96 3.93 8.52 26.9
## 3 1.51 0 -2.02 1.97 3.95 8.48 42.4
## 4 1.54 0 -1.78 1.93 3.94 9.06 55.5
## 5 1.56 0 -1.60 1.92 3.97 9.15 56.5
## 6 1.61 0 -1.43 1.93 4.02 9.15 58.7
## DE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.0 0 0.340 2.59 4.73 8.68 27
## 2 11.0 5.10 0.360 2.73 4.96 8.54 267
## 3 11.0 47.2 0.700 2.91 5.10 8.21 804
## 4 11.1 105. 1.31 2.86 5.05 8.35 1512
## 5 11.4 154. 1.98 2.99 5.01 8.27 1892
## 6 11.7 183. 2.43 3.21 5.21 8.52 1580
## DE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 7.24 0 2.26 1.96 4.07 0.670 1424
## 2 7.25 0 2.18 1.95 4.05 0.180 1413
## 3 7.26 0 2.14 1.93 3.99 0.420 1535
## 4 7.24 0 2.11 1.90 3.90 0.540 1655
## 5 7.23 0 2.07 1.95 3.95 0.450 1628
## 6 7.30 0 2 1.94 3.90 0.420 1463
## DE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.0 0 0.340 2.59 4.73 8.68 10
## 2 11.0 5.10 0.360 2.73 4.96 8.54 272
## 3 11.0 47.2 0.700 2.91 5.10 8.21 773
## 4 11.1 105. 1.31 2.86 5.05 8.35 1057
## 5 11.4 154. 1.98 2.99 5.01 8.27 1379
## 6 11.7 183. 2.43 3.21 5.21 8.52 1089
## DE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.3 0 1.21 2.54 4.75 9.48 862
## 2 11.2 0 1.12 2.51 4.69 9.48 794
## 3 11.2 0 0.920 2.43 4.52 9.34 826
## 4 11.1 0 0.810 2.37 4.36 9.02 852
## 5 11.1 0 0.660 2.42 4.41 8.87 800
## 6 11.1 0 0.5 2.46 4.49 8.89 949
## DE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.0 0 0.340 2.59 4.73 8.68 11
## 2 11.0 5.10 0.360 2.73 4.96 8.54 174
## 3 11.0 47.2 0.700 2.91 5.10 8.21 426
## 4 11.1 105. 1.31 2.86 5.05 8.35 658
## 5 11.4 154. 1.98 2.99 5.01 8.27 762
## 6 11.7 183. 2.43 3.21 5.21 8.52 711
## DE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.3 0 1.21 2.54 4.75 9.48 3415
## 2 11.2 0 1.12 2.51 4.69 9.48 3508
## 3 11.2 0 0.920 2.43 4.52 9.34 3724
## 4 11.1 0 0.810 2.37 4.36 9.02 3973
## 5 11.1 0 0.660 2.42 4.41 8.87 4198
## 6 11.1 0 0.5 2.46 4.49 8.89 4490
## DE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.0 0 0.340 2.59 4.73 8.68 5
## 2 11.0 5.10 0.360 2.73 4.96 8.54 60
## 3 11.0 47.2 0.700 2.91 5.10 8.21 113
## 4 11.1 105. 1.31 2.86 5.05 8.35 137
## 5 11.4 154. 1.98 2.99 5.01 8.27 166
## 6 11.7 183. 2.43 3.21 5.21 8.52 120
## DE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.3 0 1.21 2.54 4.75 9.48 5
## 2 11.2 0 1.12 2.51 4.69 9.48 7
## 3 11.2 0 0.920 2.43 4.52 9.34 8
## 4 11.1 0 0.810 2.37 4.36 9.02 11
## 5 11.1 0 0.660 2.42 4.41 8.87 6
## 6 11.1 0 0.390 2.53 4.61 9.15 6
## DK
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.5 0.200 6.61 8.42 12.9 0.0500 1
## 2 1.5 8.90 6.68 8.49 12.9 0.0400 2
## 3 1.5 24.2 6.68 8.32 12.7 0.0600 4
## 4 1.5 36.7 6.70 8.49 12.9 0.0600 5
## 5 1.5 34.3 6.65 8.64 13.2 0.0500 4
## 6 1.5 31.7 6.68 8.56 13.1 0.0400 1
## DK
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.5 0.200 6.61 8.42 12.9 0.0500 1
## 2 1.5 8.90 6.68 8.49 12.9 0.0400 4
## 3 1.5 24.2 6.68 8.32 12.7 0.0600 4
## 4 1.5 36.7 6.70 8.49 12.9 0.0600 3
## 5 1.5 34.3 6.65 8.64 13.2 0.0500 2
## 6 1.5 31.7 6.68 8.56 13.1 0.0400 1
## DK
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.40 0 5.53 6.25 9.84 0.730 1488.
## 2 1.40 0 5.75 6.53 10.2 0.730 1448.
## 3 1.40 0 5.88 6.61 10.4 0.730 1549.
## 4 1.40 0 6.05 6.81 10.6 0.460 1710.
## 5 1.40 0 6.23 7.37 11.5 0.210 2078.
## 6 1.41 0 6.45 7.23 11.3 0.130 2244.
## EE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.450 0 2.70 4.16 7.73 16.4 46.5
## 2 0.470 0 2.69 4.14 7.64 16.3 46.1
## 3 0.5 0 2.56 4.09 7.52 16.1 51.1
## 4 0.510 0 2.55 4.06 7.43 11.8 56.1
## 5 0.470 0 2.5 4.19 7.60 10.4 52.9
## 6 0.460 0 2.42 4.44 7.95 9.83 68
## ES
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.88 0 0.840 1.20 2.84 0.550 1009
## 2 4.90 0 0.590 1.15 2.71 0.550 973
## 3 4.90 0 -0.110 1.13 2.62 0.550 949
## 4 4.87 0 -0.350 1.09 2.52 0.550 953
## 5 4.88 0 -0.320 1.07 2.5 0.550 952
## 6 4.88 0 -0.550 1.01 2.38 0.550 961
## ES
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.88 0 0.840 1.20 2.84 0.550 50
## 2 4.90 0 0.590 1.15 2.71 0.550 50
## 3 4.90 0 -0.110 1.13 2.62 0.550 50
## 4 4.87 0 -0.350 1.09 2.52 0.550 42
## 5 4.88 0 -0.320 1.07 2.5 0.550 34
## 6 4.88 0 -0.550 1.01 2.38 0.550 34
## ES
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.88 0 0.840 1.20 2.84 0.550 5890
## 2 4.90 0 0.590 1.15 2.71 0.550 5461
## 3 4.90 0 -0.110 1.13 2.62 0.550 5238
## 4 4.87 0 -0.350 1.09 2.52 0.550 4935
## 5 4.88 0 -0.320 1.07 2.5 0.550 4618
## 6 4.88 0 -0.550 1.01 2.38 0.550 4397
## FI
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 9.5 19.4 1.55 3.70 7.19 44.8 909.
## 2 9.44 11.9 1.51 3.58 6.96 44.8 996
## 3 9.35 2.80 1.41 3.46 6.76 44.8 986.
## 4 9.29 0.100 1.11 3.38 6.59 44.8 998.
## 5 9.39 0 0.890 3.28 6.43 44.7 1020.
## 6 9.56 0 0.75 3.21 6.28 44.7 1000.
## FI
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 9.90 0 0.610 3.07 6.20 45.0 208.
## 2 9.84 0 0.640 3.14 6.32 45.1 250.
## 3 9.78 0 0.780 3.20 6.41 45.1 264.
## 4 9.75 0 0.940 3.26 6.53 44.7 274.
## 5 9.74 0 1 3.33 6.61 44.7 287.
## 6 9.74 0 1.20 3.41 6.75 44.8 264.
## FR
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 12.1 0 -2.22 0.430 0.880 2.51 4229
## 2 12.1 0 -2.36 0.340 0.730 2.51 4007
## 3 12.1 0 -2.49 0.340 0.690 2.49 3787
## 4 12.1 0 -2.80 0.480 0.880 2.52 3654
## 5 12.1 0 -2.93 0.540 0.970 2.59 3594
## 6 12.1 0 -3.16 0.550 1 2.69 3416
## FR
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.9 0 -3.19 0.430 0.880 2.77 59
## 2 11.9 6.90 -3.01 0.590 0.950 2.80 385
## 3 11.9 75.2 -1.42 0.870 1.30 2.76 1053
## 4 12.0 174. 0.580 0.860 1.51 2.66 1635
## 5 12.1 251. 2.17 0.890 1.5 2.63 1883
## 6 12.5 294 3.45 0.950 1.47 2.61 1857
## FR
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 12.1 0 -2.22 0.430 0.880 2.51 1383
## 2 12.1 0 -2.36 0.340 0.730 2.51 1464
## 3 12.1 0 -2.49 0.340 0.690 2.49 1543
## 4 12.1 0 -2.80 0.480 0.880 2.52 1579
## 5 12.1 0 -2.93 0.540 0.970 2.59 1482
## 6 12.1 0 -3.16 0.550 1 2.69 1387
## GB
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 25.2 2 9.07 7.34 11.7 0.110 14
## 2 26.7 12.2 9.34 7.70 12.2 0.120 63
## 3 26.5 27.4 9.59 8.06 12.7 0.110 54
## 4 29.8 36.4 9.88 8.46 13.3 0.1000 46
## 5 25.6 37.2 10.2 8.83 13.8 0.0900 37
## 6 23.5 29.4 10.5 9.05 14.2 0.0800 28
## GB
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 20.0 0 7.83 7.05 11.5 0.310 1087
## 2 20.5 0 8.01 7.02 11.5 0.360 1065
## 3 21.0 0 8.15 6.93 11.3 0.310 973
## 4 20.4 0 8.34 6.81 11.1 0.230 968
## 5 20.4 0 8.56 6.61 10.8 0.190 960
## 6 20.8 0 8.72 6.57 10.7 0.170 977
## GR
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.85 0 0.410 4.19 6.47 4.05 10
## 2 4.18 1 0.270 4.11 6.41 3.89 48
## 3 6.66 44.9 0.380 4.09 6.20 3.78 207
## 4 6.75 136. 1.29 4.14 6.02 3.68 400
## 5 5.70 228. 1.68 4.30 6.05 3.70 546
## 6 3.98 295. 2.85 4.08 5.57 4.09 585
## GR
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.58 0 1.55 4.17 6.42 5.49 557
## 2 2.45 0 1.43 4.20 6.51 5.65 555
## 3 3.10 0 0.980 4.15 6.43 5.79 557
## 4 3.16 0 0.800 4.12 6.37 4.81 559
## 5 2.85 0 0.670 4.17 6.42 4.32 597
## 6 2.85 0 0.410 4.19 6.47 4.05 608
## HU
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.33 0 -8.16 1.97 3.47 3.60 14
## 2 1.33 0 -7.82 2.06 3.79 3.54 15
## 3 1.33 0 -7.47 2.12 4.04 3.5 11
## 4 1.33 0 -7.31 2.16 4.17 3.19 9
## 5 1.33 0 -7.21 2.18 4.22 3.22 6
## 6 1.33 0 -7.06 2.16 4.15 3.25 5
## IE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 6.47 0 9.43 6.26 10.4 0 132.
## 2 6.49 0 9.40 6.45 10.7 0 132.
## 3 6.58 0 9.47 6.63 11 0 132.
## 4 6.78 0 9.60 6.47 10.8 0 131.
## 5 7.25 0 9.59 6.63 11.0 0 134.
## 6 8.61 0 9.72 7.11 11.7 0 132.
## IE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5.99 0 5.48 8.99 14.1 0 1580
## 2 6.06 0 5.16 8.79 13.8 0 1586
## 3 5.98 0 4.94 8.63 13.5 0 1549
## 4 6.02 0 4.66 8.45 13.2 0 1577
## 5 5.95 0 4.62 8.20 12.9 0 1499
## 6 5.96 0 4.48 7.68 12.2 0 1423
## IT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 6.62 0 9.59 0.520 0.900 0.890 2792
## 2 6.62 0 9.24 0.420 0.730 0.890 2562
## 3 6.62 0 8.94 0.410 0.760 0.890 2128
## 4 6.62 0 8.78 0.350 0.680 0.890 2079
## 5 6.62 0 8.30 0.350 0.690 0.890 2127
## 6 6.61 0 8.47 0.320 0.650 0.870 2080
## IT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.1 0 13.9 1.31 2.44 1.68 97
## 2 10.8 15.4 13.9 1.28 2.36 1.68 901
## 3 12.5 74.2 14.2 1.30 2.31 1.68 2046
## 4 12.2 153. 15.2 1.29 2.20 1.66 2817
## 5 14.8 229. 15.7 1.34 2.18 1.64 3005
## 6 20.1 285. 16.6 1.44 2.19 1.59 3101
## IT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 6.62 0 9.59 0.520 0.900 0.890 530
## 2 6.62 0 9.24 0.420 0.730 0.890 438
## 3 3.80 0 3.05 0.360 0.960 1.33 486
## 4 4.11 0 3.13 0.380 1.05 1.23 560
## 5 4.64 0 3.32 0.410 1.12 1.19 569
## 6 5.31 0 3.29 0.460 1.19 1.17 587
## LT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.450 0 0.710 7.40 11.9 2.09 52
## 2 0.450 0 0.660 7.31 11.8 2.28 49
## 3 0.460 0 0.680 7.18 11.6 2.42 38
## 4 0.460 0 0.670 7.01 11.3 2.49 58
## 5 0.460 0 0.620 6.91 11.2 2.55 45
## 6 0.460 0 0.630 6.89 11.2 2.61 37
## LT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.450 0 0.710 7.40 11.9 2.09 263
## 2 0.450 0 0.660 7.31 11.8 2.28 256
## 3 0.460 0 0.680 7.18 11.6 2.42 247
## 4 0.460 0 0.670 7.01 11.3 2.49 238
## 5 0.460 0 0.620 6.91 11.2 2.55 236
## 6 0.460 0 0.630 6.89 11.2 2.61 228
## LV
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.11 312. 7.5 2.95 3.99 0.0400 750
## 2 2.10 241. 7.05 3.19 4.46 0.0400 761
## 3 2.10 163. 6.67 3.19 5.04 0.0400 754
## 4 2.09 73.9 6.40 3.28 5.86 0.0400 752
## 5 2.09 11.7 3.33 3.48 6.69 0.0400 937
## 6 2.09 0 2.82 3.76 7.23 0.0400 727
## NL
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.680 0.300 2.02 6.05 10.1 0.180 31
## 2 0.680 33.2 2.32 6.32 10.0 0.170 125
## 3 0.680 81.5 2.91 6.29 10.4 0.170 247
## 4 0.690 122. 3.59 6.36 10.7 0.160 313
## 5 0.690 139. 4.23 6.49 10.1 0.160 283
## 6 0.690 140. 4.59 6.19 10.4 0.130 179
## NL
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.590 0 2.39 5.48 9.54 0.410 1306
## 2 0.600 0 2.23 5.59 9.67 0.330 1302
## 3 0.600 0 2.14 5.62 9.74 0.280 1331
## 4 0.600 0 2.04 5.63 9.79 0.240 1206
## 5 0.600 0 2.01 5.31 9.33 0.220 1262
## 6 0.600 0 1.86 5.93 10.1 0.200 1568
## NO
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 34.4 0 1.79 2.58 5.04 68.2 1238.
## 2 35.3 0 1.85 2.59 5.06 68.2 1230.
## 3 35.0 0 1.88 2.62 5.09 68.3 1232.
## 4 34.0 0 1.86 2.68 5.16 66.7 1234.
## 5 35.5 0 1.82 2.71 5.26 66.6 1228.
## 6 34.8 0 1.86 2.73 5.31 66.8 1223.
## NO
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 34.4 0 1.79 2.58 5.04 68.2 498.
## 2 35.3 0 1.85 2.59 5.06 68.2 479.
## 3 35.0 0 1.88 2.62 5.09 68.3 423.
## 4 34.0 0 1.86 2.68 5.16 66.7 408.
## 5 35.5 0 1.82 2.71 5.26 66.6 416.
## 6 34.8 0 1.86 2.73 5.31 66.8 379.
## PL
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.07 0 0.740 4.88 8.90 2.65 173.
## 2 2.07 0 0.770 5.05 9.20 4.92 173.
## 3 2.07 0 0.780 5.22 9.48 4.90 173.
## 4 2.08 0 0.900 5.45 9.84 4.89 173.
## 5 2.13 0 1.10 5.75 10.3 2.64 173.
## 6 2.25 0 1.34 6.04 10.7 2.01 173.
## PL
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.94 0 0.200 4.25 7.54 4.44 1440.
## 2 2.91 0 0.240 4.26 7.53 4.44 1444.
## 3 2.93 0 0.470 4.33 7.61 4.43 1509.
## 4 2.94 0 0.610 4.38 7.67 3.86 1548.
## 5 2.92 0 0.740 4.36 7.64 3.70 1619.
## 6 2.89 0 0.910 4.36 7.64 3.63 1660.
## PT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.53 0 3.31 1.88 3.57 0 967.
## 2 1.53 0 2.92 1.88 3.53 0 568.
## 3 1.53 0 2.36 1.89 3.60 0 392.
## 4 1.53 0 2.20 1.90 3.63 0 404.
## 5 1.53 0 1.91 1.93 3.70 0 410.
## 6 1.52 0 1.56 1.92 3.73 0 569.
## PT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.71 0 1.46 1.92 3.87 0 0.3
## 2 1.70 0.200 1.83 1.89 3.80 0 50.9
## 3 1.70 64.4 2.76 1.96 3.70 0 177
## 4 1.71 212 8.16 1.99 3.74 0 253
## 5 1.70 347. 9.80 1.66 2.94 0 279.
## 6 1.70 438 11.1 1.60 2.32 0 290.
## PT
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.53 0 3.31 1.88 3.57 0 513.
## 2 1.53 0 2.92 1.88 3.53 0 551
## 3 1.53 0 2.36 1.89 3.60 0 596.
## 4 1.53 0 2.20 1.90 3.63 0 706.
## 5 1.53 0 1.91 1.93 3.70 0 720.
## 6 1.52 0 1.56 1.92 3.73 0 765.
## RO
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.75 0 -5.28 2.30 4.86 19.3 655.
## 2 2.75 0 -5.56 2.33 4.95 19.1 823.
## 3 2.75 0 -6.34 2.35 5.01 19.1 780.
## 4 2.77 0 -6.56 2.38 5.08 19.7 733.
## 5 2.77 0 -6.60 2.40 5.16 19.8 737.
## 6 2.77 0 -6.84 2.44 5.29 19.8 869.
## RO
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.77 0.100 -2.17 3.88 7.47 19.3 19.6
## 2 2.77 29 -2.06 4.09 7.55 19.3 92.2
## 3 2.77 110. -1.80 4.25 7.43 19.3 173.
## 4 2.77 196. -1.53 4.5 7.36 19.4 226.
## 5 2.77 257. -0.340 4.77 7.44 19.6 251.
## 6 2.78 290. -0.230 4.94 7.65 19.6 274.
## RO
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2.73 0 -1.79 3.54 7.23 18.8 872.
## 2 2.73 0 -2.19 3.45 7.07 18.8 753.
## 3 2.73 0 -3.10 3.37 6.92 18.8 553.
## 4 2.76 0 -3.24 3.39 6.95 18.9 463.
## 5 2.76 0 -3.41 3.45 7.03 18.9 488.
## 6 2.76 0 -3.44 3.59 7.19 19.3 622.
## RS
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.75 0 -3.84 0.790 1.5 0.120 421
## 2 0.760 0 -4.02 1.14 2 0.1000 540
## 3 0.75 0 -4.27 1.16 2.05 0.1000 626
## 4 0.75 0 -4.13 1.26 2.20 0.0900 1008
## 5 0.75 18.2 -4.12 1.37 2.27 0.0900 1224
## 6 0.75 93 -2.90 1.49 2.21 0.0900 1202
## SE
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 14.3 0 -6.24 2.31 4.31 35.3 2366
## 2 14.3 0 -6.47 2.11 3.96 33.2 2203
## 3 14.3 0 -6.75 1.93 3.65 33.2 2083
## 4 14.3 0 -7.03 1.79 3.43 33.3 1930
## 5 14.3 0 -7.14 1.65 3.23 35.5 1830
## 6 14.3 0 -7.28 1.52 3 35.8 1691
## SI
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.76 0 -12.8 0.760 1.64 20.9 242.
## 2 1.75 0 -11.9 0.610 0.930 20.2 199.
## 3 1.75 0 -11.6 0.600 0.860 20.0 227.
## 4 1.94 0.800 -10.5 0.560 0.770 19.9 316.
## 5 1.94 43.5 -9.57 0.520 0.710 19.9 454
## 6 1.94 100. -7.45 0.360 0.590 19.6 469.
## SI
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.94 0.800 -10.5 0.560 0.770 19.9 1.33
## 2 1.94 43.5 -9.57 0.520 0.710 19.9 4.97
## 3 1.94 100. -7.45 0.360 0.590 19.6 8.23
## 4 1.94 126. -4.33 0.590 1.02 19.3 11.4
## 5 1.94 151. -3.27 0.720 1.22 18.9 11.7
## 6 1.93 157. -2.51 0.480 0.890 18.6 9.84
## SK
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.770 0 -6.37 1.09 1.64 3.02 277.
## 2 0.770 0 -6.24 1.03 1.53 3.02 278.
## 3 0.770 0 -6.01 1.01 1.5 3.02 278.
## 4 0.770 0 -5.81 0.950 1.45 3.21 278.
## 5 0.770 0 -5.67 0.840 1.35 3.32 280.
## 6 0.770 0 -5.76 0.680 1.20 3.33 280.
## SK
## # A tibble: 6 x 7
## ro ssrd t2m ws10 ws100 sd y
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.770 0 -6.37 1.09 1.64 3.02 3.8
## 2 0.770 0 -6.24 1.03 1.53 3.02 3.8
## 3 0.770 0 -6.01 1.01 1.5 3.02 3.8
## 4 0.770 0 -5.81 0.950 1.45 3.21 3.8
## 5 0.770 0 -5.67 0.840 1.35 3.32 3.8
## 6 0.770 0 -5.76 0.680 1.20 3.33 3.8
print(head(res))
## # A tibble: 6 x 6
## filename nt mnodes mtry oob_cor oob_nmae
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 AT_ror.feather 50 100 1 0.669 0.187
## 2 AT_ror.feather 50 100 2 0.705 0.172
## 3 AT_ror.feather 50 100 3 0.717 0.167
## 4 AT_ror.feather 50 100 4 0.717 0.166
## 5 AT_ror.feather 50 100 5 0.719 0.165
## 6 AT_ror.feather 50 100 6 0.715 0.165
write_rds(res, sprintf("hyperparams-%s.rds", NUTS_LEVEL))