Feb-21-2020, 08:36 PM
Good day,
I'm using the sklearn LogisticRegression class for some data analysis and am wondering how to output the coefficients for the predictors.
I'm using a Pipeline to standardize and power transform the data. Below is a snippit of the code. Not sure how to output the coefficients after this.
I'm using the sklearn LogisticRegression class for some data analysis and am wondering how to output the coefficients for the predictors.
I'm using a Pipeline to standardize and power transform the data. Below is a snippit of the code. Not sure how to output the coefficients after this.
# fit a model (Pipeline - Normalization, LR) steps = [('t1', StandardScaler()), ('t2', PowerTransformer()), ('m', LogisticRegression(solver='lbfgs', class_weight='balanced'))] model = Pipeline(steps=steps) model = model.fit(X, y)