AMCENGINESPACE / train_model.py
Abhi10000's picture
Create train_model.py
bc38de8 verified
raw
history blame contribute delete
337 Bytes
import pandas as pd
from sklearn.linear_model import LinearRegression
from joblib import dump
# Load historical AMC data
data = pd.read_csv("training_data.csv")
X = data[["last_service_days"]]
y = data["next_service_days"]
# Train the model
model = LinearRegression().fit(X, y)
# Save the model to a file
dump(model, "amc_model.pkl")