Issue
nearmiss_impl() in R/nearmiss_impl.R produces a confusing error message that borrows terminology from the BSMOTE algorithm:
cli::cli_abort(
"Not enough danger observations of {.val {names(classes)[i]}} to perform NEARMISS."
)
"Danger observations" is specific to BSMOTE, where points are classified into "danger" and "safe" zones. It has no meaning in the context of NearMiss, which is a distance-based undersampling algorithm. A user hitting this error would find the message confusing and potentially misleading.
Fix
Replace with a message appropriate to NearMiss, e.g.:
cli::cli_abort(
"Not enough observations in the other classes to compute {k} nearest neighbors \\
for {.val {names(classes)[i]}}."
)
Issue
nearmiss_impl()inR/nearmiss_impl.Rproduces a confusing error message that borrows terminology from the BSMOTE algorithm:"Danger observations" is specific to BSMOTE, where points are classified into "danger" and "safe" zones. It has no meaning in the context of NearMiss, which is a distance-based undersampling algorithm. A user hitting this error would find the message confusing and potentially misleading.
Fix
Replace with a message appropriate to NearMiss, e.g.: