Skip to contents

This function augments a dataset with predictions and error metrics obtained from a nonlinear dimension reduction (NLDR) model.

Usage

augment(highd_data, model_2d, model_highd)

Arguments

df_bin_centroids

Centroid coordinates of hexagonal bins in 2D space.

df_bin

Centroid coordinates of hexagonal bins in high dimensions.

training_data

Training data used to fit the model. If NULL, the training data is used (default is NULL).

type_NLDR

The type of non-linear dimensionality reduction (NLDR) used.

col_start

The text that begin the column name of the high-dimensional data.

Value

A tibble containing the augmented data with predictions, error metrics, and absolute error metrics.

Examples

df_bin_centroids <- s_curve_obj$s_curve_umap_model_obj$df_bin_centroids
df_bin <- s_curve_obj$s_curve_umap_model_obj$df_bin
augment(highd_data = s_curve_noise_training, model_2d = df_bin_centroids,
model_highd = df_bin)
#> # A tibble: 3,750 × 32
#>       ID      x1     x2        x3       x4       x5       x6       x7 pred_hb_id
#>    <int>   <dbl>  <dbl>     <dbl>    <dbl>    <dbl>    <dbl>    <dbl>      <int>
#>  1     1 -0.120  1.64   -1.99      0.0104   0.0125   0.0923  -1.28e-3        200
#>  2     2 -0.0492 1.51    0.00121  -0.0177   0.00726 -0.0362  -5.35e-3        132
#>  3     3 -0.774  1.30    0.367    -0.00173  0.0156  -0.0962   3.35e-3        102
#>  4     5 -0.478  0.0177 -1.88      0.00848  0.00533  0.0998   6.77e-4        140
#>  5     6  0.818  0.927  -1.58     -0.00318 -0.00980  0.0989   6.96e-3        189
#>  6     7  0.910  1.40    1.42      0.00699 -0.0182  -0.0710   9.66e-3         79
#>  7     9  0.859  1.59   -0.488    -0.0119   0.00421 -0.00440 -5.95e-3        145
#>  8    10 -0.727  1.62    0.314     0.00251  0.0177  -0.0755  -3.69e-3        101
#>  9    11 -0.0400 1.23    0.000801 -0.00489  0.00570  0.0722  -7.89e-3        132
#> 10    12  0.765  0.510   1.64     -0.00641 -0.00941 -0.0708   9.89e-3         35
#> # ℹ 3,740 more rows
#> # ℹ 23 more variables: model_high_d_x1 <dbl>, model_high_d_x2 <dbl>,
#> #   model_high_d_x3 <dbl>, model_high_d_x4 <dbl>, model_high_d_x5 <dbl>,
#> #   model_high_d_x6 <dbl>, model_high_d_x7 <dbl>, error_square_x1 <dbl>,
#> #   error_square_x2 <dbl>, error_square_x3 <dbl>, error_square_x4 <dbl>,
#> #   error_square_x5 <dbl>, error_square_x6 <dbl>, error_square_x7 <dbl>,
#> #   row_wise_total_error <dbl>, abs_error_x1 <dbl>, abs_error_x2 <dbl>, …