Generation of data set containing two clusters with untypical ring shapes. For each point first random radius r
from given interval is generated then random angle alpha
and finally the coordinates of point are calculated as (r*cos(alpha)
,r*sin(alpha)
). For bull's eye data set second shape is filled circle (r
starts from 0)
shapes.circles2(numObjects=180, shape1rFrom=0.75,shape1rTo=0.9,shape2rFrom=0.35,
shape2rTo=0.5,outputCsv="", outputCsv2="", outputColNames=TRUE, outputRowNames=TRUE)
shapes.bulls.eye(numObjects=180, shape1rFrom=0.75,shape1rTo=0.95,shape2rTo=0.45,
outputCsv="", outputCsv2="", outputColNames=TRUE, outputRowNames=TRUE)
cluster number for each object
generated data - matrix with objects in rows and variables in columns
number of objects in each cluster - positive integer value or vector with length=2
,
minimal value of radius for first ring
maximal value of radius for first ring
minimal value of radius for second ring
maximal value of radius for second ring
optional, name of csv file with generated data (first column contains id, second - number of cluster and others - data)
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=TRUE
indicates that output file (given by outputCsv
and outputCsv2
parameters) contains first row with column names
outputRowNames=TRUE
indicates that output file (given by outputCsv
and outputCsv2
parameters) contains a vector of row names
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.circles3
,shapes.bulls.eye
,shapes.two.moon
,shapes.blocks3d
#Example1
library(clusterSim)
sc2<-shapes.circles2(180)
plot(sc2$data,col=rainbow(2)[sc2$clusters])
#Example2
library(clusterSim)
sbe<-shapes.bulls.eye(numObjects=c(120,60))
plot(sbe$data,col=rainbow(2)[sbe$clusters])
Run the code above in your browser using DataLab