Editing
AI Governance and Policy
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Conducting a bias audit with Fairlearn:''' <syntaxhighlight lang="python"> from fairlearn.metrics import MetricFrame, demographic_parity_difference, equalized_odds_difference from sklearn.metrics import accuracy_score, precision_score, recall_score import pandas as pd # Predictions and sensitive feature (e.g., race, gender) y_true = test_labels y_pred = model.predict(X_test) sensitive_feature = test_df['race'] # or 'gender', 'age_group' # Comprehensive fairness audit metrics = { 'accuracy': accuracy_score, 'precision': precision_score, 'recall': recall_score, } mf = MetricFrame( metrics=metrics, y_true=y_true, y_pred=y_pred, sensitive_features=sensitive_feature ) print("Overall metrics:") print(mf.overall) print("\nMetrics by group:") print(mf.by_group) print(f"\nDemographic parity difference (approval rate gap): {demographic_parity_difference(y_true, y_pred, sensitive_features=sensitive_feature):.3f}") print(f"Equalized odds difference (FPR + FNR gap): {equalized_odds_difference(y_true, y_pred, sensitive_features=sensitive_feature):.3f}") # Target: |demographic parity difference| < 0.05 for most applications # Report and document all results for compliance records </syntaxhighlight> ; AI governance by jurisdiction : '''EU (comprehensive)''' β EU AI Act (binding); GDPR Art. 22 (automated decisions) : '''US (sector-specific)''' β FTC Act, ECOA, FCRA, FDA guidance, NIST AI RMF : '''UK''' β AI Safety Institute, sector-by-sector approach; AI Act alignment pending : '''China''' β Algorithmic recommendation rules, generative AI regulations, PIPL : '''International''' β OECD AI Principles, UNESCO Recommendation on AI, G7 Hiroshima AI Code </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information