In here, we use fit_highd_model()
function to construct
the model in 2D and high-dimensional space using the provided training
data (s_curve_noise_training
) and the precomputed scaled
UMAP embeddings (s_curve_noise_umap_scaled
). The function
takes various parameters to configure the model construction process,
such as hexagonal binning parameters (bin1
,
s1
, s2
, `r2``), and options for binning and
hexagon visualization.
r2 <- diff(range(s_curve_noise_umap$UMAP2))/diff(range(s_curve_noise_umap$UMAP1))
model <- fit_highd_model(training_data = s_curve_noise_training,
emb_df = s_curve_noise_umap_scaled, bin1 = 6,
r2 = r2, is_bin_centroid = TRUE,
is_rm_lwd_hex = FALSE, col_start_highd = "x")
## 2D model
glimpse(model$df_bin)
#> Rows: 21
#> Columns: 8
#> $ hb_id <int> 7, 8, 14, 15, 19, 20, 21, 28, 33, 34, 41, 46, 47, 53, 59, 64, 65…
#> $ x1 <dbl> -0.986556623, -0.455487558, -0.314644339, 0.491088106, -0.297173…
#> $ x2 <dbl> 1.3783243, 1.7036821, 0.6629215, 1.5087063, 0.1869788, 0.3461379…
#> $ x3 <dbl> -1.161042886, -1.838857386, -1.884649967, -1.860243610, -1.92898…
#> $ x4 <dbl> 0.0015608344, 0.0079065593, 0.0013630680, 0.0114082140, 0.001158…
#> $ x5 <dbl> 0.0111715792, -0.0010972664, 0.0023070022, -0.0106486637, -0.002…
#> $ x6 <dbl> -0.0293085021, 0.0003311267, -0.0669478072, -0.0291072085, -0.02…
#> $ x7 <dbl> 0.0013513495, -0.0025716567, -0.0011313813, -0.0003666036, -0.00…
## high-D model
glimpse(model$df_bin_centroids)
#> Rows: 21
#> Columns: 5
#> $ hexID <int> 7, 8, 14, 15, 19, 20, 21, 28, 33, 34, 41, 46, 47, 53, 59, 6…
#> $ c_x <dbl> 0.01168629, 0.23505886, 0.12337257, 0.34674515, 0.01168629,…
#> $ c_y <dbl> -0.00849512, -0.00849512, 0.18495120, 0.18495120, 0.3783975…
#> $ std_counts <dbl> 0.2857143, 0.8571429, 0.4285714, 0.4285714, 0.8571429, 0.42…
#> $ drop_empty <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FAL…