File size: 337 Bytes
bc38de8
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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")