Creates a smiley-face data in \(\mathbf{R}^2\). This function is a modification
of mlbench's mlbench.smiley
function.
genSMILEY(n = 496, sd = 0.1)
n | number of samples to be generated. |
---|---|
sd | additive Gaussian noise level. |
a list containing
an \((n\times 2)\) data matrix.
a length-\(n\) vector(factor) for class labels.
# \donttest{ ## Generate SMILEY Data with Difference Noise Levels s10 = genSMILEY(200, sd=0.1) s25 = genSMILEY(200, sd=0.25) s50 = genSMILEY(200, sd=0.5) ## Visualize opar <- par(no.readonly=TRUE) par(mfrow=c(1,3), pty="s") plot(s10$data, col=s10$label, pch=19, main="sd=0.10") plot(s25$data, col=s25$label, pch=19, main="sd=0.25") plot(s50$data, col=s50$label, pch=19, main="sd=0.50")