View source: R/generate_toy_data.R
generate_linear_dataset | R Documentation |
Randomly generate a simple classification problem.
generate_linear_dataset(
p,
n,
eps = 1.2,
gamma = runif(1, min = -p, max = p),
alpha = runif(p, min = -p, max = p)
)
p |
number of variables. |
n |
number of observations. |
eps |
noise. |
gamma |
numeric. |
alpha |
numeric vector of length |
A data.frame with n
independent random variables and
one class variable C
computed as
sign(sum(x * alpha) + runif(1, -eps, eps) + gamma)
.
DD <- generate_linear_dataset(p = 5, n = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.