Learn R Programming

evclust (version 2.0.3)

bananas: Generation of "bananas" datasets

Description

bananas generates a dataset with two classes separated by a nonlinear boundary.

Usage

bananas(n, r = 5, s = 1)

Value

A list with two attributes:

x

The (n,2) matrix of attributes.

y

The vector of class labels.

Arguments

n

Number of observations.

r

Radius of the two half circles (default: 5).

s

Standard deviation of noise (default 1).

Author

Feng Li.

Details

This function generates a dataset with two complex-shaped classes, useful to test some nonlinear or constrained clustering algorithms.

References

F. Li, S. Li and T. Denoeux. k-CEVCLUS: Constrained evidential clustering of large dissimilarity data. Knowledge-Based Systems (142):29-44, 2018.

See Also

kcevclus

Examples

Run this code
data<-bananas(1000)
plot(data$x,pch=data$y,col=data$y)

Run the code above in your browser using DataLab