How eshwariwasankar/fairlens-data-science works
FairLens is an interactive framework for auditing tabular classifiers for demographic bias, comparing mitigation strategies, and producing explanations and compliance reports. Its main workflow takes a bundled or uploaded dataset through cleaning and leakage-conscious preprocessing, trains and evaluates a baseline, measures subgroup fairness and proxy leakage, compares mitigations with statistical validation, then presents and exports results. The graph includes README-documented capabilities whose implementation was not sampled; their detailed internal call paths are therefore not inferred.
Main entry points: pipeline.py Audit pipeline · app.py Streamlit dashboard · db_manager.py Experiment logging · config.py Dataset configuration
Components 22
Audit interface
- Streamlit dashboard
app.py - Audit pipeline
src/pipeline.py
Data preparation
- Dataset configuration
src/config.py - Dataset definitions
dataset_config.yaml - Dataset ingestion
src/data/loader.py - Benchmark downloader
src/data/downloader.py - Data cleaning
src/data/cleaner.py - Split and preprocessing
src/data/preprocessor.py
Audit and mitigation
- Exploratory analysis
src/analysis/eda.py - Proxy leakage analysis
src/analysis/proxy.py - Baseline training
src/models/trainer.py - Predictive evaluation
src/models/evaluator.py - Fairness metrics
src/fairness/metrics.py - Mitigation methods
src/fairness/mitigators.py - Statistical validation
src/fairness/bootstrap.py
Explanation and reporting
- SHAP explanations
src/explainability/shap_explainer.py - DiCE recourse
src/explainability/dice_explainer.py - Audit narrative
src/explainability/insights.py - Report export
src/reporting/pdf_generator.py
Experiment records
- Experiment logging
src/db/db_manager.py - SQLite database
data/fairlens.db
Other components
- Analyst
Connections 28
- Analyst → Streamlit dashboard: uses
README.md - Streamlit dashboard → Audit pipeline: runs audit
app.py - Streamlit dashboard → SHAP explanations: requests explanations
app.py - Streamlit dashboard → DiCE recourse: requests recourse
app.py - Streamlit dashboard → Report export: exports report
app.py - Streamlit dashboard → Experiment logging: loads records
app.py - Dataset configuration → Dataset definitions: loads settings
src/config.py - Audit pipeline → Dataset configuration: uses configuration
src/pipeline.py - Audit pipeline → Dataset ingestion: loads dataset
src/pipeline.py - Dataset ingestion → Benchmark downloader: downloads missing data
src/data/loader.py - Audit pipeline → Data cleaning: cleans data
src/pipeline.py - Audit pipeline → Split and preprocessing: prepares splits
src/pipeline.py - Audit pipeline → Exploratory analysis: computes EDA
src/pipeline.py - Audit pipeline → Proxy leakage analysis: ranks proxies
src/pipeline.py - Audit pipeline → Baseline training: trains baseline
src/pipeline.py - Audit pipeline → Predictive evaluation: evaluates predictions
src/pipeline.py - Audit pipeline → Fairness metrics: measures fairness
src/pipeline.py - Audit pipeline → Mitigation methods: compares mitigations
src/pipeline.py - Audit pipeline → Statistical validation: bootstraps results
src/pipeline.py - Audit pipeline → SHAP explanations: computes importance
src/pipeline.py - Audit pipeline → DiCE recourse: generates recourse
src/pipeline.py - Audit pipeline → Audit narrative: generates insights
src/pipeline.py - Statistical validation → Fairness metrics: resamples metrics
src/fairness/bootstrap.py - Mitigation methods → Split and preprocessing: uses prepared data
src/fairness/mitigators.py - Audit pipeline → Experiment logging: logs metadata
src/pipeline.py - Experiment logging → SQLite database: reads and writes
src/db/db_manager.py - Audit pipeline → Report export: exports results
- Audit pipeline → Experiment logging: logs audit results
src/pipeline.py