Fairness Analysis Report

{{ report_subtitle }}

Overall Fairness Score

{{ "%.3f"|format(overall_fairness_score) }}

{{ assessment }}

Overall Score {{ "%.3f"|format(overall_fairness_score) }}
Protected Attributes {{ total_attributes }}
Warnings {{ total_warnings }}
Critical Issues {{ total_critical }}
{% if total_critical > 0 or total_warnings > 0 %}

Issues Found

{% if critical_issues %}

Critical Issues ({{ total_critical }})

    {% for issue in critical_issues %}
  • {{ issue }}
  • {% endfor %}
{% endif %} {% if warnings %}

Warnings ({{ total_warnings }})

    {% for warning in warnings %}
  • {{ warning }}
  • {% endfor %}
{% endif %}
{% endif %}

πŸ“Š Dataset Overview

Sample Size

{{ dataset_info.total_samples|default(0)|int|format_number }}

total observations

Target Distribution

{% if dataset_info.target_distribution %} {% for class_label, class_data in dataset_info.target_distribution.items() %}

Class {{ class_label }}: {{ class_data.count|format_number }} ({{ "%.1f"|format(class_data.percentage) }}%)

{% endfor %} {% else %}

No target distribution available

{% endif %}
{% if dataset_info.target_distribution %}
{% endif %}

Protected Attributes Distribution

{% if dataset_info.protected_attributes_distribution %} {% for attr_name, attr_data in dataset_info.protected_attributes_distribution.items() %}

{{ attr_name|capitalize|replace('_', ' ')|title }}

Unique Values: {{ attr_data.unique_values }}

{% for value, value_data in attr_data.distribution.items() %}
{{ value }}
{{ value_data.count|format_number }} ({{ "%.1f"|format(value_data.percentage) }}%)
{% endfor %}
{% endfor %} {% else %}

No protected attributes distribution available

{% endif %}

βš™οΈ Test Configuration

Configuration Profile

{{ test_config.config_name|upper|default('CUSTOM') }}

Metrics Tested

{{ test_config.metrics_tested|length|default(0) }}

metrics

Features Enabled

{{ 'βœ“' if test_config.pretrain_enabled else 'βœ—' }} Pre-training Metrics

{{ 'βœ“' if test_config.confusion_matrix_enabled else 'βœ—' }} Confusion Matrix

{{ 'βœ“' if test_config.threshold_analysis_enabled else 'βœ—' }} Threshold Analysis

{% if test_config.age_grouping_enabled %}

πŸ“… Age Grouping Configuration

Strategy: {{ test_config.age_grouping_strategy|upper }}

{% if test_config.age_grouping_details %} {% for detail in test_config.age_grouping_details %}

Attribute: {{ detail.attribute }}

Original Range: {{ detail.original_range }}

Groups Created:

    {% for group in detail.groups %}
  • β–Έ {{ group }}
  • {% endfor %}
{% endfor %} {% endif %}
{% endif %}

πŸ“‹ Metrics Breakdown

{% for metric in test_config.metrics_tested %}

β€’ {{ metric|replace('_', ' ')|title }}

{% endfor %}

Pre-Training Metrics (Model-Independent)

These metrics evaluate bias in the data before training. They don't depend on the model, only on data and protected attributes.

4 Implemented Metrics:

  • Class Balance (BCL) - Sample imbalance between groups
  • Concept Balance (BCO) - Difference in positive class rate
  • KL Divergence - Difference in label distributions
  • JS Divergence - Symmetric version of KL Divergence

πŸ“‹ Detailed Metrics by Protected Attribute

{% for attr in protected_attributes %}

πŸ“Š {{ attr.name|capitalize }}

{% if attr.pretrain_metrics %}
{% for metric in attr.pretrain_metrics %}
{{ metric.name }}
{{ "%.4f"|format(metric.value) }}
{{ metric.interpretation }}
{% if metric.groups %}
Groups: {% for group_name, group_info in metric.groups.items() %}
{{ group_name }}: {{ group_info.count }} ({{ "%.1f"|format(group_info.percentage) }}%)
{% endfor %}
{% endif %}
{% endfor %}
{% else %}

Nenhuma mΓ©trica prΓ©-processamento disponΓ­vel para este atributo.

{% endif %}
{% endfor %}

Main Post-Training Metrics (Compliance-Critical)

The 5 most critical metrics for legal and regulatory compliance. All include minimum representativity filter (MIN_REPRESENTATION_PCT = 2.0%).

βš–οΈ 5 Critical Compliance Metrics:

  1. Statistical Parity - Equal positive prediction rate (EEOC 80% rule)
  2. Equal Opportunity - Equal TPR between groups (fair benefit)
  3. Equalized Odds - Equal TPR and FPR (more restrictive)
  4. Disparate Impact βš–οΈ - LEGAL CRITICAL - Ratio β‰₯ 0.8 (EEOC)
  5. False Negative Rate Difference - Miss rate between groups

πŸ“‹ Detailed Metrics by Protected Attribute

{% for attr in protected_attributes %}

πŸ“Š {{ attr.name|capitalize }}

{% if attr.posttrain_main %}
{% for metric in attr.posttrain_main %}
{{ metric.name }} {% if 'disparate_impact' in metric.name.lower() %} βš–οΈ LEGAL {% endif %}
{% if metric.disparity is defined and metric.disparity is not none %} Disparity: {{ "%.4f"|format(metric.disparity) }}
{% endif %} {% if metric.ratio is defined and metric.ratio is not none %} Ratio: {{ "%.4f"|format(metric.ratio) }} {% endif %} {% if metric.value is defined and metric.value is not none and metric.disparity is not defined %} Value: {{ "%.4f"|format(metric.value) }} {% endif %}
{{ metric.interpretation }}
{% if metric.testable_groups %}
Testable Groups (β‰₯ {{ metric.min_representation_pct }}%): {{ metric.testable_groups|length }} {% if metric.excluded_groups %}
Excluded Groups (< {{ metric.min_representation_pct }}%): {{ metric.excluded_groups|length }} {% endif %}
{% endif %}
{% endfor %}
{% else %}

No main post-training metrics available for this attribute.

{% endif %}
{% endfor %}

Complementary Metrics

6 additional metrics for in-depth fairness analysis. Complement the main metrics.

6 Complementary Metrics:

  • Conditional Acceptance - Precision/PPV by group
  • Conditional Rejection - NPV by group
  • Precision Difference - Precision difference between groups
  • Accuracy Difference - Accuracy difference between groups
  • Treatment Equality - Balance FN/FP ratio
  • Entropy Index - Individual fairness (doesn't use sensitive attributes)

πŸ“‹ Detailed Metrics by Protected Attribute

{% for attr in protected_attributes %}

πŸ“Š {{ attr.name|capitalize }}

{% if attr.posttrain_complementary %}
{% for metric in attr.posttrain_complementary %}
{{ metric.name }}
{% if metric.value is defined and metric.value is not none %} {{ "%.4f"|format(metric.value) }} {% elif metric.disparity is defined and metric.disparity is not none %} Disparity: {{ "%.4f"|format(metric.disparity) }} {% elif metric.ratio is defined and metric.ratio is not none %} Ratio: {{ "%.4f"|format(metric.ratio) }} {% endif %}
{{ metric.interpretation }}
{% if metric.testable_groups %}
Testable Groups: {{ metric.testable_groups|length }} {% if metric.excluded_groups %}
Excluded: {{ metric.excluded_groups|length }} {% endif %}
{% endif %}
{% endfor %}
{% else %}

No complementary metrics available for this attribute.

{% endif %}
{% endfor %} {% if has_confusion_matrix %}

Confusion Matrices by Group

Detailed breakdown of prediction outcomes for each demographic group.

{% endif %}