This function generates a LangeviTour visualization based on different conditions and input parameters.
Usage
show_langevitour(
df,
df_b,
df_b_with_center_data,
benchmark_value = NA,
distance_df,
distance_col,
use_default_benchmark_val = FALSE
)
Arguments
- df
A data frame containing the high-dimensional data.
- df_b
A data frame containing the high-dimensional coordinates of bin centroids/ means.
- df_b_with_center_data
The dataset with hexbin centroids/ means.
- benchmark_value
The benchmark value used to remove long edges (optional).
- distance_df
The distance dataframe.
- distance_col
The name of the distance column.
- use_default_benchmark_val
Logical, indicating whether to use default benchmark value to remove long edges(default is FALSE).
Examples
training_data <- s_curve_noise_training
num_bins_x <- 4
shape_value <- 1.833091
hexbin_data_object <- extract_hexbin_centroids(nldr_df = s_curve_noise_umap,
num_bins = num_bins_x, shape_val = shape_value)
df_bin_centroids <- hexbin_data_object$hexdf_data
UMAP_data_with_hb_id <- s_curve_noise_umap |> dplyr::mutate(hb_id = hexbin_data_object$hb_data@cID)
df_all <- dplyr::bind_cols(training_data |> dplyr::select(-ID), UMAP_data_with_hb_id)
df_bin <- avg_highD_data(df_all)
tr1_object <- triangulate_bin_centroids(df_bin_centroids, x, y)
tr_from_to_df <- generate_edge_info(triangular_object = tr1_object)
distance_df <- cal_2d_dist(.data = tr_from_to_df)
show_langevitour(df_all, df_bin, df_bin_centroids, benchmark_value = 5.44,
distance = distance_df, distance_col = "distance")