Skip to content

Instantly share code, notes, and snippets.

@terrah27
Created February 3, 2019 21:02
Show Gist options
  • Save terrah27/e726d17a9fad0dfa12424a04567c1539 to your computer and use it in GitHub Desktop.
Save terrah27/e726d17a9fad0dfa12424a04567c1539 to your computer and use it in GitHub Desktop.
# Modeling the data as is
# Train model
lr = LogisticRegression(solver='liblinear').fit(X_train, y_train)
# Predict on training set
lr_pred = lr.predict(X_test)
# Checking accuracy
accuracy_score(y_test, lr_pred)
0.9992
# Checking unique values
predictions = pd.DataFrame(lr_pred)
predictions[0].value_counts()
0 71108
1 94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment