I'm new to Scikit learn and I'm trying to interpret the coefficients of my logistic regression model.
model = make_pipeline(StandardScaler(), LogisticRegression())
model.fit(X_train, y_train)
df_coefs = pd.DataFrame(model[1].coef_.T, index = X_train.columns, columns=['Coefficients']).sort_values(by=['Coefficients'])
df_coefs_comp = df_coefs.head(5).append(df_coefs.tail(5)) #only use top and bottom 5 values for plotting, since df_coefs contains all one hot encoded features
df_coefs_comp.plot(kind='barh', figsize=(9, 7), legend=None)
plt.title('Learned Regression Coefficients')
plt.axvline(x=0, color='.5')
plt.subplots_adjust(left=.3)
When I correct the coefficients using the standard scaler, I get coefficient values greater than 1. Can this be correct? All examples I see, coefficients are in range [-1,1].
Using this guide: https://scikit-learn.org/stable/auto_examples/inspection/plot_linear_model_coefficient_interpretation.html
Logistic Regression coefficients
followed this guide on my dataset: https://scikit-learn.org/stable/auto_examples/inspection/plot_linear_model_coefficient_interpretation.html