Created
April 27, 2020 05:54
-
-
Save lakshay-arora/74c5ff3176c77e873df0fcc69dc47605 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
# create the object of LinearRegression Model | |
model_LR = LogisticRegression() | |
# fit the model with the training data | |
model_LR.fit(train_idf, train.label) | |
# predict the label on the traning data | |
predict_train = model_LR.predict(train_idf) | |
# predict the model on the test data | |
predict_test = model_LR.predict(test_idf) | |
# f1 score on train data | |
f1_score(y_true= train.label, y_pred= predict_train) | |
## >> 0.4888178913738019 | |
f1_score(y_true= test.label, y_pred= predict_test) | |
## >> 0.45751633986928114 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment