gen_mease | R Documentation |
Generate binary classification data from the Mease model Mease et al. (2007).
gen_mease(n = 1000, nsim = 1)
n |
Integer specifying the number of observations. Default is
|
nsim |
Integer specifying the number of binary repsonses to generate.
Default is |
A data frame with 3 + nsim
columns. The first two columns
give the values of the numeric features x1
and x2
. The third
column (yprob
) gives the true probabilities (i.e., PrY = 1 | X = x).
The remaining nsim
columns (yclass<i>
,
i = 1, 2, ..., nsim
) give the simulated binary outcomes corresponding
to yprob
.
Mease D, Wyner AJ, Buja A. Boosted classification trees and class probability quantile estimation. Journal of Machine Learning Research. 2007; 8:409–439.
# Generate N = 1000 observations from the Mease model set.seed(2254) # for reproducibility mease <- gen_mease(1000, nsim = 1) # Plot predictor values colored by binary outcome cols <- palette.colors(2, palette = "Okabe-Ito", alpha = 0.3) plot(x2 ~ x1, data = mease, col = cols[mease$yclass1 + 1], pch = 19)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.