Plotting Feature Weight

Viewed 34

Trying to plot feature weights using the sklearn linear regression function. I have obtained the numeric value of the wieght, however I would like my data to look like the plots in this image:Plotting feature weight for PCA analysis Note that my data has more than 30 features. Logistic regression does not have a components_ feature. My models have already been trained.

from sklearn.linear_model
import LogisticRegression
clf = LogisticRegression(C=0.1, penalty='l1', tol=0.01, solver='liblinear')
clf.fit(x_train, y_train)
print(clf.coef_)
0 Answers
Related