Spaces:
No application file
No application file
File size: 434 Bytes
dd756d0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
import joblib
from data_loader import load_data
df = load_data()
features = ['PA', 'WICOPE', 'backlog', 'cuaca_bin', 'resign', 'bad_ethic', 'incompetent']
target = 'PTY'
X = df[features]
y = df[target]
model = RandomForestRegressor()
model.fit(X, y)
joblib.dump(model, "model_pty.pkl")
print("✅ Model trained and saved as model_pty.pkl")
|