How njorogepaul-moghul/alternative_credit_scoring-app works
This Streamlit application collects demographic and alternative financial-behavior signals, derives encoded features, scales them with the fitted preprocessing artifact, and invokes an XGBoost model. A tuned 0.4 probability threshold produces the high/low-risk result, while model feature importances generate an approximate contribution chart. The sampled source fully supports the interactive prediction path; the underlying survey and training pipeline are documented but not present in this repository.
Components 12
User Interaction
- Input Interface
Alternative_app.py - Demographic Inputs
Alternative_app.py - Behavior Inputs
Alternative_app.py - Risk Result
Alternative_app.py
Feature Engineering
- Income Grouping
Alternative_app.py - Feature Assembly
Alternative_app.py
Risk Inference
- Standard Scaler
scaler.joblib - XGBoost Model
xgb_credit_model.joblib - Risk Threshold
Alternative_app.py
Result Explanation
- Contribution Analysis
Alternative_app.py - Contribution Chart
Alternative_app.py
Other components
- Applicant User
Connections 16
- Applicant User → Input Interface: enters inputs
- Input Interface → Demographic Inputs: captures demographics
- Input Interface → Behavior Inputs: captures behavior
- Behavior Inputs → Income Grouping: derives income group
- Demographic Inputs → Feature Assembly: supplies fields
- Behavior Inputs → Feature Assembly: supplies fields
- Income Grouping → Feature Assembly: supplies encoding
- Feature Assembly → Standard Scaler: scales features
- Standard Scaler → XGBoost Model: provides features
- XGBoost Model → Risk Threshold: returns probability
- Risk Threshold → Risk Result: classifies risk
- XGBoost Model → Contribution Analysis: provides importances
- Feature Assembly → Contribution Analysis: provides values
- Contribution Analysis → Contribution Chart: renders chart
- Risk Result → Applicant User: displays decision
- Contribution Chart → Applicant User: displays explanation