Code
res = whatif_algo(predictor = mod, n_cfactuals = 5L, x_interest = x_interest,
pred_column = "pred", desired_y_hat_range = c(5, 10), X_search = mod$data$X,
distance_function = NULL)
Warning <simpleWarning>
Could only find 0 counterfactual(s)
`distance_function` must return a `numeric` matrix with `nrow(x)` rows and `nrow(y)` columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.