Skip to content

Commit

Permalink
use logistic regression with a fixed random state
Browse files Browse the repository at this point in the history
  • Loading branch information
lokeshmohanty committed Mar 20, 2024
1 parent 66a163a commit 1b66854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 1b66854

Please sign in to comment.