Created
August 20, 2023 08:39
-
-
Save gmyrianthous/7c387b16ae8bd447e2c8cedaf6043dbd 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 import preprocessing | |
from sklearn.linear_model import LogisticRegression | |
# Label encoding | |
label_encoder = preprocessing.LabelEncoder() | |
train_Y = label_encoder.fit_transform(train_Y) | |
# Model training | |
clf = LogisticRegression() | |
clf.fit(train_X, train_Y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment