Questions tagged [eli5]

ELI5 is a Python library which allows to visualize and debug various machine learning models using a unified API

From the documentation:

ELI5 is a Python library which allows to visualize and debug various machine learning models using unified API. It has built-in support for several ML frameworks and provides a way to explain black-box models.

It is not to be confused with Reddit's "Explain Like I'm Five" (ELI5) or the ELI programming_language.

29 questions
1
vote
1 answer

Using eli5.show_prediction() - NLP Logistic Regression (scikitlearn) - X has 1 features per sample; expecting 13791

I have a model pipeline with a Tfidf vectorizier as well as Logistic Regression in scikitlearn. I am trying to use the eli5.show_prediction function on my text (NLP). ## Rand is just a random integer , and feat_ns is the list of all of my…
amstergc20
  • 117
  • 1
  • 11
0
votes
0 answers

python eli5 show_weights() show nothing

In my program, from sklearn import linear_model from keras.wrappers.scikit_learn import KerasClassifier,KerasRegressor import eli5 from eli5.sklearn import PermutationImportance if __name__ == '__main__': (cnn_tube_par_X_train,…
bin
  • 1
  • 1
0
votes
0 answers

Pair RFECV with non-cv Permutation Importance

I'm trying to pair RFECV with permutation importance. I would like to use the non-cv version of the permutation importance computation. I tried several approaches but I get always a NotFittedError for the estimator_func while trying to fit the…
Enes
  • 33
  • 1
  • 4
0
votes
0 answers

eli5 output score explained using gain?

Trying to understand how eli5 and XGBoost can be used to interpret results. My question is how the score that eli5 returns can be calculated. From the documentation of eli5 (https://eli5.readthedocs.io/en/latest/autodocs/xgboost.htm): Feature…
Henri
  • 1,077
  • 10
  • 24
0
votes
1 answer

eli5 and SHAP for interpreting XGBoost results

I have used XGBoost algorithm tried both eli5 and SHAP to interpret the results of the regression. I got some contradictory results, screenshots below. and I do not entirely understand the difference between eli5 and SHAP and I would like to find…
Nata
  • 49
  • 6
0
votes
1 answer

Eli5: AttributeError: 'HTML' object has no attribute 'highlight_spaces'

Could anyone explain to me how to use eli5 to print to screen the importance of an estimator's weights with scikit-learn? I wrote this: import pandas as pd import numpy as np import sklearn import eli5 import…
Slowat_Kela
  • 1,377
  • 2
  • 22
  • 60
0
votes
1 answer

Eli5.Sklearn PermutationImportance() -- TypeError: check_cv() takes from 0 to 2 positional arguments but 3 were given

cv = RepeatedStratifiedKFold(n_splits=5, n_repeats=10, random_state=100) perm = PermutationImportance(clf.named_steps['classifier'], scoring='roc_auc', cv=cv) perm.fit(X=x_train_valid_proc, y=y_train_valid) I am running permutation importance from…
Blaine K
  • 3
  • 5
0
votes
1 answer

TypeError when trying to explain weights of XGBoost Classifier

I am working on implementing XGBoost on the Titanic dataset provided by Kaggle. I found the package ELI5 and the tutorial for implementing this package with XGBoost on the Titanic dataset at this link on the official documentation for ELI 5 (Jupyter…
TheFrator
  • 15
  • 3
0
votes
1 answer

How to correctly use model explainer with unseen data?

I trained my classifier using a pipeline: param_tuning = { 'classifier__learning_rate': [0.01, 0.1], 'classifier__max_depth': [3, 5, 7, 10], 'classifier__min_child_weight': [1, 3, 5], 'classifier__subsample': [0.5,…
Alex Nikitin
  • 841
  • 1
  • 10
  • 29
0
votes
0 answers

I cannot use "PermutationImportance"

I'm trying to use the permutation importance of eli5 to check the importance of the variables. But I get the following error. perm = PermutationImportance(model, random_state=1, scoring=mae_scorer) perm.fit([X_test, X_spec_test],…
shimokin
  • 3
  • 4
0
votes
0 answers

Why do ELI5 probabilities differ from predict_proba

I have an sklearn pipeline consisting of a TfidfVectorizer and a SGDClassifier(loss='log'), fitted on a multi-label training dataset. When I then use ELI5 explain_prediction on a sample (using the vectorizer and classifier from pipeline), I get…
0
votes
0 answers

How to fully show and validate the "show_prediction" results?

I'm trying to use eli5.show_prediction to explain feature importance at the record level. Below is part of the results I'm getting. The raw score value shown below is -0.329, which corresponds to probability value exp(-0.329)/(exp(-0.329) + 1) =…
0
votes
1 answer

Problem with XGboost Classification & eli5 package

When training an XGBoost classification model, I am using the eli5 function "explain_prediction()" to look at the feature contributions to invidividual predictions. However, the eli5 package seems to be treating my model as a regressor rather than a…
0
votes
1 answer

Is there any alternative to Eli5?

I was trying to calculate the Permutation Importance by using Eli5, however the command, eli5.show_weights does not fetch any image or anything. (tried in python 2.7, 3.7) can you please help. The code is as below: Code Snippet feature_names = [c…
1
2