Skip to contents

This function is wrapper to nearest, adding is_covered to the model. This function is explicit about inputs, and is useful in cross validation - evaluating how test data performs against suggested facilities in the training set. This might be added to nearest, and may become obsolete.

Usage

augment_user_tested(all_facilities, test_data, distance_threshold = 100)

Arguments

all_facilities

data.frame Facilities selected in maxcovr model

test_data

data.frame test data (but it could be any user-type data)

distance_threshold

numeric

Value

dataframe containing distances between each test data observation and the nearest facility.

Examples


if (FALSE) { # \dontrun{

mc_cv_relocate_n100_cut |>
  mutate(user_nearest_test = map2(
    .x = facilities_selected,
    .y = test,
    .f = augment_user_tested
    ))

} # }