Learn R Programming

clusterv (version 1.1.1)

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

Description

A 2-dimensional 2-levels hierarchical cluster structure is generated. At a first level 4 distinct clusters are generated. At a second level two other clusters at the left and right of 2 of the 4 "primary" clusters are generated (6 clusters)

Usage

generate.sample.h3(n = 20, DeltaA = 1, DeltaB = 1, seed = 0)

Value

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

Arguments

n

number of examples for each cluster

DeltaA

vertical displacement of the the secondary clusters

DeltaB

horizontal displacement of the the secondary clusters

seed

seed for the random generator

Author

Giorgio Valentini valentini@di.unimi.it

Examples

Run this code
generate.sample.h3()
# Generation of a data set with 120 2-dimensional examples
# data have a two-level hierarchical structure with respectively 4 and 6 clusters. 
generate.sample.h3(n = 20, DeltaA = 1, DeltaB = 1, seed = 0)

Run the code above in your browser using DataLab