From 1b6685465f950f14a2107f46d990e60d2ab6cac8 Mon Sep 17 00:00:00 2001 From: Lokesh Mohanty Date: Wed, 20 Mar 2024 12:17:14 +0530 Subject: [PATCH] use logistic regression with a fixed random state --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 43450128..4a2dccab 100644 --- a/train.py +++ b/train.py @@ -9,7 +9,7 @@ labels = np.sort(np.unique(y)) y = np.array([np.where(labels == x) for x in y]).flatten() -model = LogisticRegression().fit(X, y) +model = LogisticRegression(random_state=42).fit(X, y) with open("model.pkl", 'wb') as f: pickle.dump(model, f)