Error when running step_bsmote
with a single predictor
#151
Labels
bug
an unexpected problem or unintended behavior
step_bsmote
with a single predictor
#151
The problem
When running
step_bsmote()
with only a single predictor, the function throws an error that a matrix cannot be created. This is due tothemis:::bsmote_impl()
at line 19: thedata
argument forsmote_data()
is given by subsettingdata_mat
with the values ofmin_class_in
, but due to how the pesky subset[
works, the matrix is simplified to a vector in the case of only a single column. Thus, runningstep_bsmote()
with a single predictor always throws this error.The fix is by specifying
drop = FALSE
when subsettingdata_mat
, so that line 19 becomes:Reproducible example
Created on 2024-08-14 with reprex v2.1.1
Session info
The text was updated successfully, but these errors were encountered: