clustersim: clustersim: A cluster simulator for testing clustering...

Description Usage Arguments Value Examples

View source: R/clustersim.R

Description

clustersim: A cluster simulator for testing clustering algorithms

Usage

1
2
clustersim(n, n2, r, K, alpha, wobble, redp = NULL, print = FALSE,
  seed = NULL)

Arguments

n

Numerical value: The number of samples, it must be square rootable

n2

Numerical value: The number of features

r

Numerical value: The radius to define the initial circle (use approx n/100)

K

Numerical value: How many clusters to simulate

alpha

Numerical value: How far to pull apart the clusters

wobble

Numerical value: The degree of noise to add to the sample co ordinates

redp

Numerical value: The fraction of samples to remove from one cluster

print

Logical flag: whether to print the PCA into current directory

seed

Numerical value: fixes the seed if you want to repeat results

Value

A list: containing 1) matrix with simulated data in it

Examples

1
res <- clustersim(225, 900, 8, 4, 0.75, 0.025, redp = NULL, seed=123)

Example output

***clustersim***
computing simulated data using linear combination...
calculating PCs of data and performing kmeans...
computing centroids of clusters and pulling apart...
transforming pulled apart PC co ordinates back to dataset...
finished.

M3C documentation built on Nov. 8, 2020, 6:50 p.m.