View source: R/OptHoldoutSize_simulation.R
gen_resp | R Documentation |
Generate random outcome (response) according to a ground-truth logistic model
gen_resp(X, coefs = NA, coefs_sd = 1, retprobs = FALSE)
X |
Matrix of observations |
coefs |
Vector of coefficients for logistic model. If NA, random coefficients are generated. Defaults to NA |
coefs_sd |
If random coefficients are generated, use this SD (mean 0) |
retprobs |
If TRUE, return class probability; otherwise, return classes. Defaults to FALSE |
Vector of length as first dimension of dim(X) with outcome classes (if retprobs==FALSE) or outcome probabilities (if retprobs==TRUE)
# See examples for model_predict
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.