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

highd_data

The dataset containing high-dimensional coordinates and an unique identifier.

model_2d

Centroid coordinates of hexagonal bins in 2-D space.

model_highd

Centroid coordinates of hexagonal bins in high dimensions.

Value

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

Examples

augment(highd_data = scurve, model_highd = scurve_model_obj$model_highd,
model_2d = scurve_model_obj$model_2d)
#> # A tibble: 1,000 × 32
#>       ID      x1    x2       x3       x4       x5       x6        x7 pred_h
#>    <int>   <dbl> <dbl>    <dbl>    <dbl>    <dbl>    <dbl>     <dbl>  <int>
#>  1     1 -0.120  0.819 -1.99     0.0114   0.00351  0.0334   0.00638     200
#>  2     2 -0.0492 0.166  0.00121  0.0115  -0.0166  -0.0297   0.00509     131
#>  3     3 -0.774  0.651  0.367   -0.0172   0.00600  0.0211   0.00303     131
#>  4     4 -0.606  0.952 -1.80     0.0157  -0.00978 -0.0590  -0.00754     227
#>  5     5 -0.478  1.10  -1.88    -0.00423  0.00495 -0.0482  -0.00982     259
#>  6     6  0.818  1.78  -1.58     0.0124   0.0198   0.0560  -0.000730    232
#>  7     7  0.910  0.975  1.42    -0.0111   0.0132   0.0299   0.00401      94
#>  8     8 -0.0691 1.90   0.00239  0.0125  -0.00463  0.0260   0.00590     177
#>  9     9  0.859  1.34  -0.488   -0.00195 -0.0145  -0.00950  0.00593     222
#> 10    10 -0.727  1.56   0.314    0.0189   0.0147  -0.0659   0.00617     103
#> # ℹ 990 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>, …