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)

Arguments

n

number of samples to be generated.

sd

additive Gaussian noise level.

Value

a list containing

data

an \((n\times 2)\) data matrix.

label

a length-\(n\) vector(factor) for class labels.

Examples

# \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")
par(opar) # }