Project Overview
The AI-Enhanced Banking Analytics Dashboard is an interactive tool designed to provide predictive insights into customer behavior in the banking sector. Leveraging advanced machine learning models, natural language processing, and dynamic D3.js visualizations, this dashboard aids financial institutions in making data-driven decisions.
Project Structure
enhanced_banking_analytics_dashboard/
├── app.py # Main Flask application
├── data/ # Dataset directory
│ ├── bank-full.csv
│ └── bank-names.txt
├── default_values.pkl # Default feature values
├── model.pkl # Trained ML model
├── optimal_threshold.pkl # Model threshold
├── original_classifier.pkl # Base classifier
├── static/ # Static assets
│ ├── css/
│ └── js/
└── templates/ # HTML templates
System Architecture
Core Components
- NLP Processor: Processes natural language queries using spaCy for feature extraction
- ML Pipeline: XGBoost classifier with custom feature engineering and SHAP explanations
- D3.js Visualization: Real-time interactive data visualization
Model Performance
Metric | Value |
---|---|
Accuracy | 78.5% |
Precision | 66.7% |
Recall | 54.2% |
F1 Score | 59.8% |
Natural Language Processing
The NLP engine uses spaCy for entity recognition and pattern matching to extract relevant features from user queries. It handles various input patterns including:
- Age expressions (e.g., "35 years old", "aged 40")
- Balance amounts (e.g., "$50k", "negative $3000")
- Job titles and education levels
- Marital status and loan information
Example Query Processing
Input: "35 year old single teacher with $50000 balance"
Output: {
'age': 35,
'job': 'teacher',
'marital': 'single',
'balance': 50000,
'education': 'secondary', # default
'housing': 'no', # default
'loan': 'no' # default
}
Machine Learning Model
The prediction system uses an XGBoost classifier with custom feature engineering and risk assessment. Key features include:
- Automated feature engineering (age groups, balance transformations)
- Risk-adjusted predictions using customer profiles
- SHAP-based feature importance explanations
- Calibrated probability estimates
Feature Engineering
Engineered Features:
- Age Groups (18-25, 26-35, 36-45, 46-55, 55+)
- Balance Log Transform
- Risk Factors (loan status + job stability)
- Customer Value Indicators
Interactive Visualization
The dashboard uses D3.js to create interactive visualizations of predictions and feature contributions:
- Radial Progress Bar: Shows subscription probability
- Feature Tables: Displays parsed features and their impact
- SHAP Values: Visualizes feature importance
Impact & Results
- 30% improvement in marketing campaign efficiency
- 78.5% prediction accuracy on test data
- Real-time processing of natural language queries
- Explainable AI through SHAP values