Agent Skill
2/7/2026fairness-bias-auditor
Evaluates machine learning models for demographic bias using the fairlearn library. Use this skill immediately after training any predictive model.
A
awsometyper
0GitHub Stars
1Views
npx skills add AwsomeTyper/Hack-A-New-Year
SKILL.md
| Name | fairness-bias-auditor |
| Description | Evaluates machine learning models for demographic bias using the fairlearn library. Use this skill immediately after training any predictive model. |
name: fairness-bias-auditor description: Evaluates machine learning models for demographic bias using the fairlearn library. Use this skill immediately after training any predictive model.
Fairness & Bias Auditor
Automated decision systems in education can perpetuate inequality. Run this audit after training any predictive model.
Audit Protocol
1. Metric Calculation
Use fairlearn to calculate:
- Demographic Parity Difference: Selection rates across groups
- Equalized Odds: True positive/false positive rates across groups
2. Protected Attributes
For higher education analytics, use:
PCTPELL(Pell Grant rate) as socioeconomic proxy- Racial demographics where available
3. Four-Fifths Rule
If selection rate ratio between privileged and unprivileged groups < 0.8, flag as violation.
from fairlearn.metrics import demographic_parity_ratio
ratio = demographic_parity_ratio(
y_true,
y_pred,
sensitive_features=sensitive_group
)
if ratio < 0.8:
print("WARNING: Four-fifths rule violation detected")
Visualization Requirements
- Generate disparity plots using CGI color palette
- Always include the audit results visibly in deliverables
- Document any mitigations applied (e.g., sample reweighting)
Remediation Options
If bias detected:
- Adjust sample weights to achieve demographic parity
- Use
fairlearn.reductions.ExponentiatedGradientfor constrained optimization - Document the trade-off between accuracy and fairness
Skills Info
Original Name:fairness-bias-auditorAuthor:awsometyper
Download