Description Usage Arguments Value Examples
View source: R/data_genSMILEY.R
Creates a smiley-face data in \mathbf{R}^2. This function is a modification
of mlbench's mlbench.smiley
function.
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.
1 2 3 4 5 6 7 8 9 10 11 12 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.