Learn R Programming

tclust (version 2.0-5)

simula.tclust: Simulate contaminated data set for applying TCLUST

Description

Simulate 10% contaminated data set for applying TCLUST

Usage

simula.tclust(n, p = 4, k = 3, type = 2, balanced = 1)

Value

a list with the following items

  • x - The generated dataset

  • true - The true classification

Arguments

n

number of observations

p

dimension (p>=2 and p>q)

k

number of clusters (only k=3 and k=6 are allowed!!!)

type

1 (spherical for rest.fact=1) or 2 (elliptical for rest.fact=9^2)

balanced

1 (all clusters equal size) or 2 [proportions (25,30,35)% if k=3 and (12.5,15,17.5,12.5,15,17.5)% if k=6]

Examples

Run this code
res <- simula.tclust(n=400,k=3,p=8,type=2,balanced=1)
plot(res$x,col=res$true+1)

Run the code above in your browser using DataLab