Fits spacemap model to B bootstrapped data replicates to create an ensemble network.
bootEnsemble(Y, X = NULL, tune, method = c("spacemap", "space"), boot = TRUE, B = 100L, resPath = tempdir(), iscale = TRUE, aszero = 1e-06, seed = sample.int(n = 1e+06, size = 1), p0 = 1, ...)
Y | Numeric matrix \((N \times Q)\) containing N iid samples of the response vector \(\textbf{y}\). |
---|---|
X | Numeric matrix \((N \times P)\) containing N iid samples of the predictor vector \(\textbf{x}\). |
tune | List with names being the tuning penalties
|
method | Character value specifying to use |
boot | Logical. Default is |
B | Positive integer denoting the number of model fits making up the ensemble. Default is 1000, but can be lowered to save time. |
resPath | Character vector specifying the directory where each
each model fit to bootstrap replicate data is written to file through serialization by |
iscale | Logical indicating to standardize the whole input data. Defaults to TRUE.
See |
aszero | Positive numeric value (defaults to 1e-6) indicating at what point to consider extremely small parameter estimates of \(\Gamma\) and \(\rho\) as zero. |
seed | Positive integer allowing user to set the random seed for reproducing the network ensemble. |
p0 | Positive numeric not exceeding the default of 1, which represents the proportion of the original samples that will be down-sampled for each model fitting iteration of the ensemble. |
... |
A list, call it ens
, up to length B
of convergent model fits from
either spacemap
or space
. ens
should typically
not be modified by the user, but passed on to the bootVote
function.
Non-convergent model fits to bootstrap replciates are not included in list `ens`,
but can be inspected individually at location resPath
and are identified
by attr(good, which = "not_conv_bootids")
.
#Load simulation library(spacemap) data(sim1) #Boostrap Ensemble (B = 10) for illustration only tune <- data.frame(lam1 = 70, lam2 = 28, lam3 = 17.5) ens <- bootEnsemble(Y = sim1$Y, X = sim1$X, tune = tune, method = "spacemap", B = 10)#> Warning: executing %dopar% sequentially: no parallel backend registered#>#>#> #>#>#> #>