abess icon indicating copy to clipboard operation
abess copied to clipboard

How to set test data

Open cfkstat opened this issue 2 years ago • 1 comments

how to set a fixed test data, to eval model?

cfkstat avatar Jul 01 '23 03:07 cfkstat

Hello, if I haven't misunderstood your question, you require code to generate simulated data and ensure that the data generated by this code is always consistent. In that case, the seed parameter of the generate.data function should meet your requirements. Here's a simple example:

library(abess)
n <- 100
p <- 20
support.size <- 3
seed <- 2023

dataset <- generate.data(n, p, support.size, family = "gaussian",  seed=seed)

If my understanding is incorrect, or if you have any further questions, please continue the discussion.

bbayukari avatar Oct 12 '23 16:10 bbayukari