lime icon indicating copy to clipboard operation
lime copied to clipboard

Error: The class of model must have a model_type method

Open Nehagupta90 opened this issue 3 years ago • 0 comments

I have a randomForest model and when I run

explainer <- lime(text_train, # the input model = r, # the model preprocess = tokenize_text) # the preprocessing step

explanation <- explain(text_test[2:5], explainer = explainer, n_labels = 1, # show only 1 label (recommend or not recommend) n_features = 5, feature_select = "highest_weights", # use all terms to explain the model single_explanation = F)

it gives error

Error: The class of model must have a model_type method. See ?model_type to get an overview of models supported out of the box

How to have a model_type ()

Nehagupta90 avatar Apr 22 '22 19:04 Nehagupta90