pty-agentic-hf / train_model.py
SHELLAPANDIANGANHUNGING's picture
Upload 3 files
dd756d0 verified
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")