Skip to content

Instantly share code, notes, and snippets.

@Blaizzy
Last active February 3, 2019 09:49
Show Gist options
  • Select an option

  • Save Blaizzy/e8e166fd7e68a5d487ebd60aa8abc026 to your computer and use it in GitHub Desktop.

Select an option

Save Blaizzy/e8e166fd7e68a5d487ebd60aa8abc026 to your computer and use it in GitHub Desktop.
from sklearn.linear_model import LogisticRegression
#Creating a classifier
clf = LogisticRegression()
# Traning a testing Accuracy
model = clf.fit(X_train, y_train.values.ravel())
acc = clf.score(X_train, y_train.values.ravel())
print('Model Accuracy: ', round(acc*100,3),'%')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment