LinCDE.boost | R Documentation |
This function implements LinCDE boosting: a boosting algorithm of conditional density estimation with shallow LinCDE trees as base-learners.
LinCDE.boost( y, X = NULL, splitPoint = 20, basis = "nsTransform", splineDf = 10, minY = NULL, maxY = NULL, numberBin = 40, df = 4, penalty = NULL, prior = "Gaussian", depth = 1, n.trees = 100, shrinkage = 0.1, terminalSize = 20, alpha = 0.2, subsample = 1, centering = FALSE, centeringMethod = "randomForest", verbose = TRUE, ... )
y |
response vector, of length nobs. |
X |
input matrix, of dimension nobs x nvars; each row represents an observation vector. |
splitPoint |
a list of candidate splits of length nvars or a scalar/vector of candidate split numbers. If |
basis |
a character or a function specifying sufficient statistics, i.e., spline basis. For |
splineDf |
the number of sufficient statistics/spline basis. If |
minY |
the user-provided left end of the response range. If |
maxY |
the user-provided right end of the response range. If |
numberBin |
the number of bins for response discretization. Default is 40. The response range is divided into |
df |
approximate degrees of freedom. |
penalty |
vector of penalties applied to each sufficient statistics' coefficient. |
prior |
a character or a function specifying initial carrier density. For |
depth |
the number of splits of each LinCDE tree. The number of terminal nodes is |
n.trees |
the number of trees to fit. Default is 100. |
shrinkage |
the shrinkage parameter applied to each tree in the expansion, value in (0,1]. Default is 0.1. |
terminalSize |
the minimum number of observations in a terminal node. Default is 20. |
alpha |
a hyperparameter in (0,1] to early stop the boosting. A smaller |
subsample |
subsample ratio of the training samples in (0,1]. Default is 1. |
centering |
a logical value. If |
centeringMethod |
a character or a function specifying the conditional mean estimator. If |
verbose |
a logical value. If |
... |
other parameters, such as hyperparameters to be passed to the conditional mean estimator. |
This function returns a LinCDE object consisting of a list of values.
trees: a list of LinCDE trees.
importanceScore: a named vector measuring the contribution of each covariate to the objective.
splitMidPointY: the vector of discretized bins' mid-points.
z: the spline basis matrix.
zTransformMatrix: the transformation matrix (of dimension splineDf x splineDf) multiplied by the standard natural cubic spline basis if basis = "nsTransform"
.
prior: the prior function. The call prior(X, Y)
should return a vector of prior conditional densities f(yi | Xi).
basis/depth/shrinkage/centering/centeringMethod: values inherited from the input arguments. If centering
is FALSE
, no centeringMethod
is returned.
centeringModel: a centering model with a predict function. If centering
is FALSE
, no centeringModel
is returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.