ScalewayTest / train.py
HoriaPiv's picture
test
7223d1a verified
import joblib
from sklearn.linear_model import LogisticRegression
import numpy as np
# Training data (toy example)
X = np.array([[0], [1], [2], [3], [4], [5]])
y = np.array([0, 1, 0, 1, 0, 1]) # 0 = even, 1 = odd
model = LogisticRegression()
model.fit(X, y)
# Save model
joblib.dump(model, "model.joblib")
print("Model trained and saved as model.joblib")