Given a test dataset, the centroid coordinates of hexagonal bins in 2D and high-dimensional space, predict the 2D embeddings for each data point in the test dataset.
Arguments
- test_data
The test dataset containing high-dimensional coordinates and an unique identifier.
- df_bin_centroids
Centroid coordinates of hexagonal bins in 2D space.
- df_bin
Centroid coordinates of hexagonal bins in high dimensions.
- type_NLDR
The type of non-linear dimensionality reduction (NLDR) used.
Examples
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 = 4, r2 = r2, col_start_highd = "x")
df_bin_centroids <- model$df_bin_centroids
df_bin <- model$df_bin
predict_emb(test_data = s_curve_noise_training, df_bin_centroids = df_bin_centroids,
df_bin = df_bin, type_NLDR = "UMAP")
#> # A tibble: 75 × 4
#> pred_UMAP_1 pred_UMAP_2 ID pred_hb_id
#> <dbl> <dbl> <int> <int>
#> 1 -0.1 0.461 1 9
#> 2 0.666 1.12 2 19
#> 3 0.666 1.12 3 19
#> 4 0.0915 0.130 4 5
#> 5 0.283 0.461 6 10
#> 6 0.857 2.12 7 31
#> 7 0.666 1.12 8 19
#> 8 0.474 0.793 9 14
#> 9 0.666 1.12 11 19
#> 10 1.05 1.79 12 28
#> # ℹ 65 more rows