Instructions to use dev91205/employee-growth-score-predictor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use dev91205/employee-growth-score-predictor with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("dev91205/employee-growth-score-predictor", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
| """ | |
| Employee Growth Score Prediction - Inference Script | |
| ===================================================== | |
| Load the trained model and predict growth scores for new employees. | |
| """ | |
| import joblib | |
| import numpy as np | |
| # Load model | |
| model = joblib.load("employee_growth_model.joblib") | |
| # Feature columns (in order): | |
| # Age, BusinessTravel_Num, DailyRate, Department_Num, DistanceFromHome, | |
| # EnvironmentSatisfaction, JobInvolvement, JobLevel, JobRole_Num, | |
| # JobSatisfaction, MaritalStatus_Num, MonthlyIncome, TotalWorkingYears, | |
| # YearsAtCompany, YearsInCurrentRole, YearsSinceLastPromotion, YearsWithCurrManager | |
| # Example: Predict for a new employee | |
| new_employee = np.array([[ | |
| 30, # Age | |
| 2, # BusinessTravel_Num (1=No, 2=Travel_Rarely, 3=Travel_Frequently) | |
| 800, # DailyRate | |
| 2, # Department_Num | |
| 5, # DistanceFromHome | |
| 3, # EnvironmentSatisfaction (1-4) | |
| 3, # JobInvolvement (1-4) | |
| 2, # JobLevel (1-5) | |
| 5, # JobRole_Num | |
| 3, # JobSatisfaction (1-4) | |
| 1, # MaritalStatus_Num | |
| 5000, # MonthlyIncome | |
| 8, # TotalWorkingYears | |
| 5, # YearsAtCompany | |
| 3, # YearsInCurrentRole | |
| 1, # YearsSinceLastPromotion | |
| 3, # YearsWithCurrManager | |
| ]]) | |
| growth_score = model.predict(new_employee) | |
| print(f"Predicted Growth Score: {growth_score[0]:.2f} / 100") | |
| if growth_score[0] >= 75: | |
| print("Category: HIGH GROWTH potential") | |
| elif growth_score[0] >= 50: | |
| print("Category: MODERATE GROWTH potential") | |
| elif growth_score[0] >= 25: | |
| print("Category: LOW GROWTH potential") | |
| else: | |
| print("Category: AT RISK - needs development support") | |