powered by
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) )
A data.frame with n independent random variables and one class variable C computed as sign(sum(x * alpha) + runif(1, -eps, eps) + gamma).
n
C
sign(sum(x * alpha) + runif(1, -eps, eps) + gamma)
number of variables.
number of observations.
noise.
numeric.
numeric vector of length n.
DD <- generate_linear_dataset(p = 5, n = 1000)
Run the code above in your browser using DataLab