Here, we’ll walk through the process of preprocessing 2D embedding data to obtain regular hexagons.
First, you’ll need 2D embedding data generated for your training data. For our example, we’ll use a 3-\(d\) S-curve dataset with four additional noise dimensions. We’ve used UMAP as our non-linear dimension reduction technique to generate embeddings for the S-curve data.
scaled_umap <- gen_scaled_data(data = s_curve_noise_umap, x = "UMAP1", y = "UMAP2",
hex_ratio = NA)
glimpse(scaled_umap)
#> List of 2
#> $ scaled_UMAP1: num [1:75] 0.0804 0.7386 0.8399 0.1672 0.2629 ...
#> $ scaled_UMAP2: num [1:75] 0.366 1.1464 1.2392 0.0494 0.4556 ...
gen_scaled_data
function preprocesses the 2D embedding
data to obtain regular hexagons. The hex_ratio
parameter
determines the aspect ratio of the hexagons. By default, it’s set up to
obtain regular hexagons, but you can adjust it to customize the height
and width of the hexagons as needed.