Learn R Programming

clusterv (version 1.1.1)

generate.sample.h1: Two-levels hierarchical cluster generator.

Description

A 2-dimensional two-level hierarchical cluster structure is generated. At a first level 3 distinct clusters at the vertices of an equilater triangle are generated. At a second level two other clusters at the left and right of the three "primary" clusters are generated.

Usage

generate.sample.h1(n = 20, l = 5, Delta.h = 1, sd = 0.1, with.I.level.examples = FALSE)

Value

a matrix with dim rows (variables) and n*6 columns (examples)

Arguments

n

number of examples for each cluster

l

half length of the edge of the equilater triangle

Delta.h

half of the "abscissa" distance between each pair of clusters inside the three major clusters

sd

standard deviation

with.I.level.examples

if TRUE data centered at the vertices of the triangle are generated, otherwise only the secondary clusters are generated.

Author

Giorgio Valentini valentini@di.unimi.it

Examples

Run this code
generate.sample.h1()
# Generation of a data set with 120 2-dimensional examples
# data have a two-level hierarchical structure with respectively 3 and 6 clusters. 
generate.sample.h1(n = 20, l = 5, Delta.h = 1, sd = 0.1, with.I.level.examples = TRUE)

Run the code above in your browser using DataLab