Generate simulation data for benchmarking sparse Poisson regression models.
msaenet.sim.poisson(
n = 300,
p = 500,
rho = 0.5,
coef = rep(0.2, 50),
snr = 1,
p.train = 0.7,
seed = 1001
)
List of x.tr
, x.te
, y.tr
, and y.te
.
Number of observations.
Number of variables.
Correlation base for generating correlated variables.
Vector of non-zero coefficients.
Signal-to-noise ratio (SNR).
Percentage of training set.
Random seed for reproducibility.
Nan Xiao <https://nanx.me>
dat <- msaenet.sim.poisson(
n = 300, p = 500, rho = 0.6,
coef = rep(1, 10), snr = 3, p.train = 0.7,
seed = 1001
)
dim(dat$x.tr)
dim(dat$x.te)
Run the code above in your browser using DataLab