Tabular Classification
Scikit-learn
hr-analytics
fairness
logistic-regression
ai-governance
model-card
Instructions to use drdavidprivacy/RetainIQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use drdavidprivacy/RetainIQ with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("drdavidprivacy/RetainIQ", "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
Upload 3 files
Browse filesv2.0 age-only mitigated champion
- README.md +39 -41
- RetainIQ_Champion_AgeOnly.pkl +3 -0
- RetainIQ_Champion_AgeOnly_Inside.csv +51 -0
README.md
CHANGED
|
@@ -3,20 +3,20 @@ license: mit
|
|
| 3 |
library_name: sklearn
|
| 4 |
pipeline_tag: tabular-classification
|
| 5 |
tags:
|
| 6 |
-
- tabular-classification
|
| 7 |
-
- hr-analytics
|
| 8 |
-
- fairness
|
| 9 |
-
- logistic-regression
|
| 10 |
-
- ai-governance
|
| 11 |
-
- model-card
|
| 12 |
datasets:
|
| 13 |
-
-
|
| 14 |
---
|
| 15 |
|
| 16 |
-
# Model Card — RetainIQ
|
| 17 |
|
| 18 |
*Employee-attrition risk model · Hireloom, Inc. · Structured per Mitchell et al. (2019),
|
| 19 |
-
"Model Cards for Model Reporting." Worked example for **The AI Governance Lab**
|
| 20 |
Educational use only — not for real employment decisions.*
|
| 21 |
|
| 22 |
## 1. Model Details
|
|
@@ -25,59 +25,57 @@ Educational use only — not for real employment decisions.*
|
|
| 25 |
|---|---|
|
| 26 |
| Model name | RetainIQ — Employee Attrition Risk Model |
|
| 27 |
| Owner | Hireloom, Inc. (provider **and** deployer — self-oversight / dogfooding) |
|
| 28 |
-
| Version / date |
|
| 29 |
-
| Model type | Binary classification — logistic regression (`
|
| 30 |
-
|
|
| 31 |
-
|
|
|
|
|
|
|
|
| 32 |
| Contact | [Hireloom AI Governance lead — placeholder] |
|
| 33 |
|
| 34 |
## 2. Intended Use
|
| 35 |
-
- **Primary use:** flag employees at elevated attrition risk so HR can prioritize retention outreach. **Decision-SUPPORT only**;
|
| 36 |
- **Intended users:** Hireloom HR / People team and people-managers.
|
| 37 |
-
- **Out of scope:** NOT for termination, discipline, compensation denial, or any adverse
|
| 38 |
|
| 39 |
## 3. Factors
|
| 40 |
-
|
| 41 |
-
- **Operating context:** tabular HR data; the model outputs a probability, converted to a flag via a chosen decision threshold.
|
| 42 |
|
| 43 |
## 4. Metrics
|
| 44 |
-
|
| 45 |
|
| 46 |
## 5. Evaluation Data
|
| 47 |
-
Sealed test set:
|
| 48 |
|
| 49 |
## 6. Training Data
|
| 50 |
-
|
| 51 |
|
| 52 |
## 7. Quantitative Analyses
|
| 53 |
-
|
| 54 |
|
| 55 |
-
| Metric |
|
| 56 |
|---|---|---|
|
| 57 |
-
| ROC-AUC | 0.
|
| 58 |
-
| PR-AUC | 0.
|
| 59 |
-
| Recall | 0.
|
| 60 |
-
| Precision | 0.
|
| 61 |
-
| F1 | 0.
|
| 62 |
|
| 63 |
-
|
| 64 |
|
| 65 |
-
**
|
| 66 |
-
|
| 67 |
-
**Bias-mitigated variant** (Fairlearn `CorrelationRemover` on Age/Gender/MaritalStatus): the age equalized-odds gap collapses from 0.369 to 0.052 (40+ recall 0.44→0.63) and demographic-parity from 0.209 to ~0.00, at a modest accuracy cost (ROC-AUC −0.04, PR-AUC −0.04). Marital-status flag-rate fairness improves; gender is unchanged. *Caveat:* per-group fairness on 294 rows is noisy (e.g., Divorced n=4) — trust direction on well-populated groups.
|
| 68 |
|
| 69 |
## 8. Ethical Considerations
|
| 70 |
-
- **
|
| 71 |
-
- **
|
| 72 |
-
- **Self-oversight / dogfooding:** Hireloom is both
|
| 73 |
-
- **Misuse risk:** flags are decision-support, not verdicts;
|
| 74 |
-
- **Measurement limits:** small per-group samples make some fairness numbers noisy — requires ongoing monitoring rather than one-time sign-off.
|
| 75 |
|
| 76 |
## 9. Caveats & Recommendations
|
| 77 |
-
-
|
| 78 |
-
-
|
| 79 |
-
-
|
| 80 |
-
-
|
| 81 |
|
| 82 |
## Reference
|
| 83 |
-
Mitchell, M.,
|
|
|
|
| 3 |
library_name: sklearn
|
| 4 |
pipeline_tag: tabular-classification
|
| 5 |
tags:
|
| 6 |
+
- tabular-classification
|
| 7 |
+
- hr-analytics
|
| 8 |
+
- fairness
|
| 9 |
+
- logistic-regression
|
| 10 |
+
- ai-governance
|
| 11 |
+
- model-card
|
| 12 |
datasets:
|
| 13 |
+
- REPLACE-WITH-YOUR-ORG/retainiq-data
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# Model Card — RetainIQ (v2.0, bias-mitigated)
|
| 17 |
|
| 18 |
*Employee-attrition risk model · Hireloom, Inc. · Structured per Mitchell et al. (2019),
|
| 19 |
+
"Model Cards for Model Reporting." Worked example for **The AI Governance Lab**.
|
| 20 |
Educational use only — not for real employment decisions.*
|
| 21 |
|
| 22 |
## 1. Model Details
|
|
|
|
| 25 |
|---|---|
|
| 26 |
| Model name | RetainIQ — Employee Attrition Risk Model |
|
| 27 |
| Owner | Hireloom, Inc. (provider **and** deployer — self-oversight / dogfooding) |
|
| 28 |
+
| Version / date | **v2.0 · June 2026** (supersedes v1.0 biased champion; see §8) |
|
| 29 |
+
| Model type | Binary classification — logistic regression (`C=0.1`, `class_weight=balanced`) |
|
| 30 |
+
| Bias mitigation | Fairlearn **CorrelationRemover on Age only** (the ADEA-protected attribute) |
|
| 31 |
+
| Pipeline | One-Hot + CorrelationRemover(Age) + StandardScaler → LogReg; 50 features; scikit-learn 1.7.2; seed 42 |
|
| 32 |
+
| Artifact | `RetainIQ_Champion_AgeOnly.pkl` (8,969 B) + readable coefficients (`_Inside.csv`) |
|
| 33 |
+
| Integrity (SHA-256) | `32a1a21bf9b4984eb5466f955bbef9a729a5535ca81ea279fb48a23513d74057` |
|
| 34 |
| Contact | [Hireloom AI Governance lead — placeholder] |
|
| 35 |
|
| 36 |
## 2. Intended Use
|
| 37 |
+
- **Primary use:** flag employees at elevated attrition risk so HR can prioritize retention outreach. **Decision-SUPPORT only**; monthly batch-scored, capacity-ranked list.
|
| 38 |
- **Intended users:** Hireloom HR / People team and people-managers.
|
| 39 |
+
- **Out of scope:** NOT for termination, discipline, compensation denial, or any adverse action; not autonomous; not validated outside Hireloom's workforce.
|
| 40 |
|
| 41 |
## 3. Factors
|
| 42 |
+
Protected groups assessed: Age (ADEA-protected 40 line), Gender, Marital Status. Outputs a probability converted to a flag via a chosen threshold.
|
|
|
|
| 43 |
|
| 44 |
## 4. Metrics
|
| 45 |
+
ROC-AUC and PR-AUC (threshold-independent), plus recall, precision, F1 at 0.50. Because leavers are ~16%, PR-AUC and recall are prioritized over plain accuracy. The production operating threshold is a separate, capacity-driven choice set by HR.
|
| 46 |
|
| 47 |
## 5. Evaluation Data
|
| 48 |
+
Sealed test set: 294 employees (20% stratified hold-out, seed 42), 47 real leavers (16.0%). Quarantined from Module 5; opened once for the final grade.
|
| 49 |
|
| 50 |
## 6. Training Data
|
| 51 |
+
1,176 employees (80% stratified split), 16.2% leavers. Protected attributes retained through preprocessing so fairness could be measured; the deployed pipeline then applies **age-only CorrelationRemover** (removes the Age signal; retains Gender/Marital Status).
|
| 52 |
|
| 53 |
## 7. Quantitative Analyses
|
| 54 |
+
Sealed-test performance of the deployed v2.0 (age-only) champion, with the biased v1.0 for comparison:
|
| 55 |
|
| 56 |
+
| Metric | Deployed v2.0 (age-only) | Biased v1.0 (rejected) |
|
| 57 |
|---|---|---|
|
| 58 |
+
| ROC-AUC | 0.811 | 0.812 |
|
| 59 |
+
| PR-AUC | 0.534 | 0.588 |
|
| 60 |
+
| Recall | 0.702 | 0.681 |
|
| 61 |
+
| Precision | 0.407 | 0.381 |
|
| 62 |
+
| F1 | 0.516 | 0.489 |
|
| 63 |
|
| 64 |
+
**Held-out fairness (equalized-odds difference; lower = fairer):** Age 40+ **0.045** (was 0.369 — gap closed; 40+ recall 0.44→0.69); Marital Status 0.281 (improved); Gender 0.026 (held fair). *Caveat:* PR-AUC is marginally lower (0.534), so the gain is clearest at the chosen operating point; per-group counts are small (40+ n=16, Divorced n=4).
|
| 65 |
|
| 66 |
+
**Why age-only:** a three-way bake-off showed all-attribute CorrelationRemover *worsened* gender (EOD 0.033→0.137) and cost more accuracy, while age-only closed the ADEA gap with no gender regression and no accuracy cost.
|
|
|
|
|
|
|
| 67 |
|
| 68 |
## 8. Ethical Considerations
|
| 69 |
+
- **Deployment decision (R-16) — RESOLVED:** deploy the **age-only bias-mitigated champion (v2.0)**, prioritizing the ADEA-protected age group (largest gap + greatest legal exposure). The biased v1.0 and the all-3-attribute variant are documented as considered-and-rejected alternatives.
|
| 70 |
+
- **Residual / monitoring targets:** the marital-status spread persists, and gender balance must be watched to confirm the untargeted groups don't drift — both are named monitoring targets (Module 9).
|
| 71 |
+
- **Self-oversight / dogfooding:** Hireloom is both provider and deployer; independent fairness review recommended.
|
| 72 |
+
- **Misuse risk:** flags are decision-support, not verdicts; adverse use would be inappropriate and likely unlawful.
|
|
|
|
| 73 |
|
| 74 |
## 9. Caveats & Recommendations
|
| 75 |
+
- Synthetic data stand-in: revalidate on real Hireloom data before any deployment.
|
| 76 |
+
- Threshold: set/document the production operating point by HR capacity; re-run the fairness audit AT that threshold per protected group.
|
| 77 |
+
- Monitoring: watch drift, the gender EOD, and the marital spread; define retrain/retire triggers.
|
| 78 |
+
- Legal/compliance (not legal advice): obtain review of ADEA, Title VII, NYC Local Law 144, EEOC guidance, EU AI Act (high-risk employment) and GDPR special-category obligations before real deployment.
|
| 79 |
|
| 80 |
## Reference
|
| 81 |
+
Mitchell, M., et al. (2019). *Model Cards for Model Reporting.* FAT* '19. arXiv:1810.03993.
|
RetainIQ_Champion_AgeOnly.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32a1a21bf9b4984eb5466f955bbef9a729a5535ca81ea279fb48a23513d74057
|
| 3 |
+
size 8969
|
RetainIQ_Champion_AgeOnly_Inside.csv
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
feature,coefficient,pushes_toward
|
| 2 |
+
JobRole_Laboratory Technician,0.4051,LEAVING
|
| 3 |
+
YearsSinceLastPromotion,0.3823,LEAVING
|
| 4 |
+
EnvironmentSatisfaction,-0.3822,staying
|
| 5 |
+
NumCompaniesWorked,0.3606,LEAVING
|
| 6 |
+
OverTime_Yes,0.3581,LEAVING
|
| 7 |
+
OverTime_No,-0.3581,staying
|
| 8 |
+
YearsWithCurrManager,-0.3437,staying
|
| 9 |
+
JobSatisfaction,-0.3369,staying
|
| 10 |
+
JobRole_Research Director,-0.3343,staying
|
| 11 |
+
JobLevel,0.3156,LEAVING
|
| 12 |
+
BusinessTravel_Non-Travel,-0.3132,staying
|
| 13 |
+
JobRole_Sales Representative,0.2934,LEAVING
|
| 14 |
+
DistanceFromHome,0.2897,LEAVING
|
| 15 |
+
TotalWorkingYears,-0.2826,staying
|
| 16 |
+
JobInvolvement,-0.2826,staying
|
| 17 |
+
RelationshipSatisfaction,-0.2558,staying
|
| 18 |
+
BusinessTravel_Travel_Frequently,0.2501,LEAVING
|
| 19 |
+
YearsInCurrentRole,-0.2421,staying
|
| 20 |
+
MaritalStatus_Single,0.2159,LEAVING
|
| 21 |
+
StockOptionLevel,-0.2024,staying
|
| 22 |
+
JobRole_Healthcare Representative,-0.2016,staying
|
| 23 |
+
WorkLifeBalance,-0.1953,staying
|
| 24 |
+
PercentSalaryHike,-0.1953,staying
|
| 25 |
+
DailyRate,-0.193,staying
|
| 26 |
+
MaritalStatus_Divorced,-0.183,staying
|
| 27 |
+
EducationField_Other,-0.1722,staying
|
| 28 |
+
JobRole_Manufacturing Director,-0.1533,staying
|
| 29 |
+
EducationField_Human Resources,0.1504,LEAVING
|
| 30 |
+
TrainingTimesLastYear,-0.1458,staying
|
| 31 |
+
EducationField_Technical Degree,0.1447,LEAVING
|
| 32 |
+
JobRole_Human Resources,0.1354,LEAVING
|
| 33 |
+
PerformanceRating,0.1285,LEAVING
|
| 34 |
+
YearsAtCompany,0.1124,LEAVING
|
| 35 |
+
JobRole_Manager,-0.1091,staying
|
| 36 |
+
Department_Human Resources,-0.1074,staying
|
| 37 |
+
Department_Sales,0.0922,LEAVING
|
| 38 |
+
JobRole_Research Scientist,-0.0898,staying
|
| 39 |
+
HourlyRate,-0.0618,staying
|
| 40 |
+
Gender_Male,0.0574,LEAVING
|
| 41 |
+
Gender_Female,-0.0574,staying
|
| 42 |
+
EducationField_Life Sciences,-0.0573,staying
|
| 43 |
+
MaritalStatus_Married,-0.0476,staying
|
| 44 |
+
Department_Research & Development,-0.0448,staying
|
| 45 |
+
Education,0.0435,LEAVING
|
| 46 |
+
MonthlyRate,0.0403,LEAVING
|
| 47 |
+
EducationField_Marketing,0.0337,LEAVING
|
| 48 |
+
MonthlyIncome,-0.0257,staying
|
| 49 |
+
EducationField_Medical,-0.0161,staying
|
| 50 |
+
JobRole_Sales Executive,-0.0108,staying
|
| 51 |
+
BusinessTravel_Travel_Rarely,-0.0054,staying
|