make_shape_para | R Documentation |
This function generates synthetic high-dimensional data consisting of
k
clusters of a specified shape (e.g., crescents), arranged in
parallel along alternating dimensions. The first cluster is shifted
along the first dimension, the second along the third dimension,
the third along the first dimension again, and so on.
make_shape_para(n = c(500, 300), k = 2, p = 4, shift = 0.4, shape = "crescent")
n |
A numeric vector of length |
k |
Integer. Number of clusters to generate. Must be greater than 1. |
p |
Integer. Number of dimensions. Must be at least 3. |
shift |
Numeric. The distance between cluster centers along the alternating dimensions (default is '0.4'). |
shape |
Character string. Shape of the clusters to generate (e.g., '"crescent"', '"gridcube"', etc.). Must be a single value. |
A tibble containing \sum n
rows and p
columns, with
the generated features ('x1, x2, ..., xp') and a 'cluster' label.
# Generate 2 crescent-shaped clusters in 4D
twocrescent <- make_shape_para(n = c(500, 300), k = 2, p = 4, shape = "crescent")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.