eli5
eli5 copied to clipboard
show_weights() shows weights for only one class
I have trained a Logistic Regression classifier (from sklearn) for a binary classifier. However, when I use eli5 to examine my weights, I see the top coefs for only one class (y=1).
Here is my code:
from sklearn.linear_model import LogisticRegression
lr_0 = LogisticRegression(random_state = 42)
lr_0.fit(xtrain_tfidf_ngram,Ytr)
import eli5
eli5.show_weights(lr_0, vec=tfidf_vect_ngram, top=10,target_names=lr_0.classes_,)
Can anyone help me? Why am I seeing only one class?
Same here. Did you find any solution? @rvoak
I guess this might be the normal usage, according to https://stackoverflow.com/questions/51659523/eli5-show-weights-with-two-labels.