View source: R/0-util-functions.R
generate_linear_dataset | R Documentation |
Randomly generate a simple classification problem.
generate_linear_dataset( n = 2, N = 10000, eps = 1.2, gamma = runif(1, min = -n, max = n), alpha = runif(n, min = -n, max = n) )
n |
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(n = 5, 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.