| idrbag | R Documentation |
Computes IDR predictions with bootstrap aggregating (bagging) or subsample aggregation (subagging).
idrbag(y, X, y_observed = NULL, weights = NULL, decreasing = FALSE,
groups = setNames(rep(1, ncol(X)), colnames(X)), orders = c("comp" = 1),
stoch = "sd", pars = list(verbose = FALSE, eps_abs = 1e-5,
eps_rel = 1e-5, max_iter = 10000L), n_jobs = 1, progress = TRUE, newdata,
digits = NULL, interpolation = "linear", b, p, replace = FALSE,
grid = NULL, seed = NULL)
y |
numeric vector (the response variable). |
X |
data frame of numeric or ordered factor variables (the regression covariates). |
y_observed |
vector of indicators (TRUE or 1 for observed, FALSE or 0
for right-censored). At least one observation must be uncensored. Default
is all observed ( |
weights |
vector of finite, non-negative weights (same length as y), at least one of which must be positive; observations with zero weight are dropped from the fit. Default is all weights equal to one. Weights are processed in single precision; it is up to the caller to avoid extreme imbalance (as a rule of thumb, no weight below ~1e-7 of the total weight). |
decreasing |
boolean indicating whether |
groups |
named vector of length |
orders |
named vector giving for each group in |
stoch |
stochastic order constraint used for estimation. Default is
|
pars |
parameters for quadratic programming optimization (only relevant
if |
n_jobs |
number of worker threads used to fit the individual subsamples
in parallel. Only relevant when (su)bagging is active. Default is |
progress |
display a progress bar while fitting ( |
newdata |
|
digits |
removed functionality, parameter kept for backwards compatibility but ignored with warning: number of decimal places for the predictive CDF, useful to keep the solution small across covariates. |
interpolation |
interpolation method for univariate data, ignored at
this time (a warning is issued once per session if a value other than
|
b |
number of (su)bagging samples. |
p |
size of (su)bagging samples relative to training data. |
replace |
draw samples with ( |
grid |
grid on which the predictive CDFs are evaluated. Default are
the unique values of |
seed |
integer seed for the random number generator. Only relevant when (su)bagging is active. |
This function draws b times a random subsample of size
ceiling(nrow(X)*p)) from the training data, fits IDR to each
subsample, computes predictions for the new data supplied in newdata,
and averages the predictions derived from the b subsamples. There are
no default values for b and p.
A list of predictions, see predict.idrfit.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.