shapes.worms {clusterSim} R Documentation

Generation of data set containing two clusters with untypical parabolic shapes (worms)

Description

Generation of data set containing two clusters with untypical parabolic shapes (first is given by y=x^2, second by y=-(x-a)^2+b with distortion from <-tol,+tol>)

Usage

shapes.worms(numObjects=180,shape1x1=-2,shape1x2=2,shape2x1=-0.5,
shape2x2=2.5,shape2a=1.5,shape2b=5.5,tol=0.1,outputCsv="", outputCsv2="",
outputColNames=TRUE, outputRowNames=TRUE)

Arguments

 numObjects number of objects in each cluster - positive integer value or vector with length=2 shape1x1 starting value on abscissa axis for shape 1 shape1x2 end value on abscissa axis for shape 1 shape2x1 starting value on abscissa axis for shape 2 shape2x2 end value on abscissa axis for shape 2 shape2a parameter a of shape 2 shape2b parameter b of shape 2 tol tolerance - each generated point is randomized by adding runif(1,0,tol) outputCsv optional, name of csv file with generated data (first column contains id, second - number of cluster and others - data) outputCsv2 optional, name of csv (a comma as decimal point and a semicolon as field separator) file with generated data (first column contains id, second - number of cluster and others - data) outputColNames outputColNames=TRUE indicates that output file (given by outputCsv and outputCsv2 parameters) contains first row with column names outputRowNames outputRowNames=TRUE indicates that output file (given by outputCsv and outputCsv2 parameters) contains a vector of row names

Value

 clusters cluster number for each object data generated data - matrix with objects in rows and variables in columns

Author(s)

Marek Walesiak marek.walesiak@ue.wroc.pl, Andrzej Dudek andrzej.dudek@ue.wroc.pl

Department of Econometrics and Computer Science, University of Economics, Wroclaw, Poland http://keii.ue.wroc.pl/clusterSim/

shapes.worms,shapes.circles2,shapes.circles3,shapes.bulls.eye,shapes.two.moon,shapes.blocks3d
library(clusterSim)
plot(sw$data,col=rainbow(2)[sw$clusters])