run_gb_mc
is called from within run_gb
. It tunes using
multiple cores.
run_gb_mc(
y,
L1.x,
L2.eval.unit,
L2.unit,
L2.reg,
form,
gb.grid,
n.minobsinnode,
loss.unit,
loss.fun,
data,
cores
)
The tuning parameter combinations and there associated loss function scores. A list.
Outcome variable. A character vector containing the column names of
the outcome variable. A character scalar containing the column name of
the outcome variable in survey
.
Individual-level covariates. A character vector containing the
column names of the individual-level variables in survey
and
census
used to predict outcome y
. Note that geographic unit
is specified in argument L2.unit
.
Geographic unit for the loss function. A character scalar
containing the column name of the geographic unit in survey
and
census
.
Geographic unit. A character scalar containing the column
name of the geographic unit in survey
and census
at which
outcomes should be aggregated.
Geographic region. A character scalar containing the column
name of the geographic region in survey
and census
by which
geographic units are grouped (L2.unit
must be nested within
L2.reg
). Default is NULL
.
The model formula. A formula object.
The hyper-parameter search grid. A matrix of all hyper-parameter combinations.
GB minimum number of observations in the terminal nodes. An integer-valued scalar specifying the minimum number of observations that each terminal node of the trees must contain. Default is \(5\).
Loss function unit. A character-valued scalar indicating
whether performance loss should be evaluated at the level of individual
respondents (individuals
) or geographic units (L2 units
).
Default is individuals
.
Loss function. A character-valued scalar indicating whether
prediction loss should be measured by the mean squared error (MSE
)
or the mean absolute error (MAE
). Default is MSE
.
Data for cross-validation. A list
of \(k\)
data.frames
, one for each fold to be used in \(k\)-fold
cross-validation.
The number of cores to be used. An integer indicating the number of processor cores used for parallel computing. Default is 1.