Skip to contents

This dataset (four_clusters) contains simulated data with four distinct clusters, each generated using different shapes and scales. It is ideal for demonstrating clustering algorithms and visualization techniques.

Usage

four_clusters

Format

A data frame with 2000 rows and 4 variables:

x1

Numeric. First feature coordinate.

x2

Numeric. Second feature coordinate.

x3

Numeric. Third feature coordinate.

x4

Numeric. Fourth feature coordinate.

cluster

Factor. The cluster label (1, 2, 3, or 4).

Source

Simulated using cardinalR package.

Details

Four Clusters Simulated Dataset

References

Gamage J, Cook D, Harrison P, Lydeamore M, Talagala T (2025).cardinalR: Collection of Data Structures. R package version 0.1.10, https://github.com/JayaniLakshika/cardinalR.

Examples

data(four_clusters)
head(four_clusters)
#> # A tibble: 6 × 5
#>       x1     x2      x3      x4 cluster 
#>    <dbl>  <dbl>   <dbl>   <dbl> <chr>   
#> 1 -0.705  0.761 -0.384  -0.0113 cluster3
#> 2 -0.590  0.671  0.281   0.344  cluster3
#> 3  0.958  0.362 -0.473  -0.827  cluster2
#> 4  0.484 -0.549 -0.0832  0.270  cluster1
#> 5  0.611  0.218 -1.18    1.09   cluster4
#> 6  1.11   0.281 -0.474  -1.04   cluster2
dim(four_clusters)
#> [1] 2000    5