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
library(mlr3oml)
library(counterfactuals)
oml_data=OMLData$new(50)
tic_tac_toe<-oml_data$datarf=randomForest::randomForest(Class~., data=tic_tac_toe)
predictor=iml::Predictor$new(rf)
whatif_classif=WhatIfClassif$new(predictor, n_counterfactuals=10L)
cfactuals=whatif_classif$find_counterfactuals(
x_interest=tic_tac_toe[1L, ], desired_class="negative", desired_prob= c(0.5, 1)
)
cfactuals$plot_parallel()
#> Warning in cfactuals$plot_parallel(): Can only consider numeric features for#> parallel plot. Non-numeric features have been removed.#> Error in `$<-.data.frame`(`*tmp*`, ".ID", value = structure(2:1, .Label = c("0", : Ersetzung hat 2 Zeilen, Daten haben 0
TODO: Add check, if there are any numeric features and exit early if not.
The text was updated successfully, but these errors were encountered:
Reprex:
TODO: Add check, if there are any numeric features and exit early if not.
The text was updated successfully, but these errors were encountered: