Created
October 5, 2021 15:46
-
-
Save samyumobi/297396db172dd9e6c1c1219b72811ed0 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
| from sklearn.model_selection import train_test_split | |
| # Creating the training and testing data | |
| X_train, X_test, Y_train, Y_test = train_test_split(X, y, test_size=0.33) | |
| # Initializing an logistic regression object | |
| clf = LogisticRegression() | |
| # Fit the model to training and test sets | |
| clf.fit(X_train,Y_train) | |
| # Accuracy score of the logistic regression model | |
| clf.score(X_test, Y_test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment