Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uperror in ceteris_paribus.default with a response with several labels #27
Comments
|
Thanks, fixed |
When you have a response variable with several labels and provide a data.frame with several rows in
ceteris_paribus, it returns an error like this:This can be corrected with the following change:
In the file ceteris.paribus.R, line 146 is:
new_observation_ext$`_ids_` <- rep(1:nrow(new_observation), each = nrow(new_observation))it should be:
new_observation_ext$`_ids_` <- rep(1:nrow(new_observation), each = length(col_yhat))Toy example: