Created
October 5, 2021 16:35
-
-
Save samyumobi/d625e340e6f91a29abe5ccc3d35dee71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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