Skip to content

Instantly share code, notes, and snippets.

@samyumobi
Created October 5, 2021 16:35
Show Gist options
  • Select an option

  • Save samyumobi/d625e340e6f91a29abe5ccc3d35dee71 to your computer and use it in GitHub Desktop.

Select an option

Save samyumobi/d625e340e6f91a29abe5ccc3d35dee71 to your computer and use it in GitHub Desktop.
# Scaling the data
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
po = [('scaler',StandardScaler()),('logistic_reg',LogisticRegression(C=10))]
p = Pipeline(po)
lr4 = p.fit(X_train, Y_train)
print("Scaled Accuracy score : ",100*lr4.score(X_test,Y_test),"% \n")
# Logistic Regression coefficients
print("Logistic Regression coefficients",lr3.coef_,"\n")
# Intercept of the model
print("Logistic Regression intercept ",lr3.intercept_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment