Fair and Explainable AI Credit Scoring Terminal Application
Project description
FairScore
AI-Powered Credit Scoring System with Bloomberg Terminal-Style TUI
FairScore is a fair, explainable, and inclusive credit scoring system that uses behavioral financial data instead of traditional credit bureau metrics. It features a Terminal User Interface (TUI) inspired by Bloomberg Terminal aesthetics.
Features
- 4 Specialized ML Models: Income Stability (LightGBM), Expense Discipline (Random Forest), Liquidity Buffer (Logistic Regression), Risk Detection (Isolation Forest)
- FAIR-SCORE Formula: Weighted ensemble producing 300-900 score range
- Explainability: SHAP-based explanations with waterfall visualizations
- Dual Input Modes: PDF parsing (Gemini AI) or manual data entry
- Bloomberg Terminal UI: Phosphor green on matte black aesthetic
Installation
# Clone or download, then:
pip install -e .
Quick Start
# Launch TUI
fairscore
# Train models (generates synthetic data first)
python -m fairscore.models.trainer
# Generate synthetic data only
python -c "from fairscore.data import DataGenerator; DataGenerator().generate_all()"
Keyboard Shortcuts
| Key | Action |
|---|---|
| F1 | Help screen |
| F5 | Refresh display |
| Ctrl+O | Upload PDF |
| Ctrl+M | Manual entry |
| Tab | Navigate fields |
| Q | Quit |
Score Categories
| Range | Category | Description |
|---|---|---|
| 750-900 | EXCELLENT | Best creditworthiness |
| 650-749 | GOOD | Above average |
| 500-649 | FAIR | Average |
| 300-499 | POOR | Below average |
Project Structure
fairscore/
__init__.py # Package initialization
app.py # Main TUI application
cli.py # CLI entry points
config.py # Configuration management
theme.py # Bloomberg Terminal theme
data/
generator.py # Synthetic data generation
features.py # Feature engineering
models/
income_stability.py # LightGBM model
expense_discipline.py # Random Forest model
liquidity_buffer.py # Logistic Regression model
risk_anomaly.py # Isolation Forest model
ensemble.py # FAIR-SCORE computation
trainer.py # Training pipeline
explainability/
shap_explainer.py # SHAP explanations
parser/
pdf_parser.py # Gemini AI PDF parsing
ui/
dashboard.py # Main dashboard
model_matrix.py # 4-panel model display
score_gauge.py # ASCII score gauge
input_mode.py # Input selection/forms
Configuration
Set environment variable for PDF parsing:
set GOOGLE_API_KEY=your_gemini_api_key
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fairscore_ai-1.0.0.tar.gz.
File metadata
- Download URL: fairscore_ai-1.0.0.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d54b310e0c138fcb2b731dd048242b9bb9b90f43cc9def4c07bcb03f62cde25d
|
|
| MD5 |
09bf07b2fc4db221d67fbcabed08f563
|
|
| BLAKE2b-256 |
0a93bf34afd58b6c5222c387478feb92cfdb4f933c887180a34bec60dfe784c0
|
File details
Details for the file fairscore_ai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fairscore_ai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2bb769b653a6b1ed622593af41f6f907418e9c9235ef698ce2deea1af8ba5b8
|
|
| MD5 |
ead91723d116b82f071f5b9883b90535
|
|
| BLAKE2b-256 |
716c5273938dca850a7e8f6ec35061ecf3bc2d80b387417389a212b9c69af7a2
|