Created
November 28, 2021 15:17
-
-
Save keitazoumana/bd3b6e2be0336690f37cb991c90d040f to your computer and use it in GitHub Desktop.
This file contains 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
""" | |
Content of train_model.py | |
""" | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.metrics import classification_report | |
import pickle | |
def run_model_training(X_train, X_test, y_train, y_test): | |
clf = LogisticRegression() | |
clf.fit(X_train,y_train) | |
clf.score(X_test,y_test) | |
y_pred = clf.predict(X_test) | |
print("\n3. Model Performance: \n") | |
print(classification_report(y_test, y_pred)) | |
return clf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment