| cv.moml | R Documentation |
Tune the regularization parameter for MOML by cross-validation.
cv.moml(
x,
treatment,
reward,
propensity_score,
loss = c("logistic", "boost", "hinge.boost", "lum"),
penalty = c("glasso", "lasso"),
weights = NULL,
offset = NULL,
intercept = TRUE,
control = moml.control(),
nfolds = 5L,
stratified = TRUE,
alignment = c("fraction", "lambda"),
refit = FALSE,
...
)
x |
A numeric matrix representing the design matrix. No missing valus
are allowed. The coefficient estimates for constant columns will be
zero. Thus, one should set the argument |
treatment |
The assigned treatments represented by a character, integer, numeric, or factor vector. |
reward |
A numeric vector representing the rewards. It is assumed that a larger reward is more desirable. |
propensity_score |
A numeric vector taking values between 0 and 1 representing the propensity score. |
loss |
A character value specifying the loss function. The available
options are |
penalty |
A character vector specifying the name of the penalty. |
weights |
A numeric vector for nonnegative observation weights. Equal observation weights are used by default. |
offset |
An optional numeric matrix for offsets of the decision functions. |
intercept |
A logical value indicating if an intercept should be
considered in the model. The default value is |
control |
A list of control parameters. See |
nfolds |
A positive integer specifying the number of folds for
cross-validation. Five-folds cross-validation will be used by default.
An error will be thrown out if the |
stratified |
A logical value indicating if the cross-validation
procedure should be stratified by the response label. The default value
is |
alignment |
A character vector specifying how to align the lambda
sequence used in the main fit with the cross-validation fits. The
available options are |
refit |
A logical value indicating if a new classifier should be
trained using the selected predictors or a named list that will be
passed to |
... |
Other arguments passed to the control function, which calls the
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.