You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code is an example of prep_data not working for knnimpute:
test <- prep_data(d,
outcome=atherosclerosis,
impute=list(numeric_method="knnimpute"))
Here is the error:
Error in gower_work(x = x, y = y, pair_x = pair_x, pair_y = pair_y, n = n, :
STRING_ELT() can only be applied to a 'character vector', not a 'integer'
numeric_method="bagimpute" or "mean" work properly.
The text was updated successfully, but these errors were encountered:
I filed this issue for recipes. The problem lies in their library. I have found that recipes::step_knnimpute fails when character columns are provided instead of factor columns. As a short term solution, please convert your columns to factor columns. We will be issuing this as a warning until recipes fixes this issue.
The following code is an example of prep_data not working for knnimpute:
test <- prep_data(d,
outcome=atherosclerosis,
impute=list(numeric_method="knnimpute"))
Here is the error:
Error in gower_work(x = x, y = y, pair_x = pair_x, pair_y = pair_y, n = n, :
STRING_ELT() can only be applied to a 'character vector', not a 'integer'
numeric_method="bagimpute" or "mean" work properly.
The text was updated successfully, but these errors were encountered: