This application predicts credit scores and loan approvals using AI models. It includes a detailed credit score calculation formula and various parameters contributing to the prediction.
This app aims to improve credit scoring and loan prediction accuracy using AI models, enabling lenders to make more informed decisions about loan approvals and interest rates.
To run the application locally, follow these steps:
- Clone this repository:
git clone https://github.com/altf4-games/CreditPredict.git- Navigate to the api directory:
cd api- Install dependencies:
pip install -r requirements.txt- Create a .env file in the root directory and configure environment variable API_KEY for the Gemini API.
API_KEY=- Start the FastAPI server using uvicorn:
python -m uvicorn index:app --reload- Access the application at:
http://127.0.0.1:8000/static/index.htmlThe credit score is calculated using the following formula:
Credit Score = (0.25 × Normalized PCS) + (0.15 × Normalized BAS) + (0.15 × Normalized EPS) + (0.15 × Normalized LFRS) + (0.15 × Normalized IAMS) + (0.15 × Normalized HWS)
Parameters:
- Monthly Inhand Salary
- Number of Bank Accounts
- Number of Credit Cards
- Interest Rate
- Delay from Due Date
- Number of Credit Inquiries
- Credit Utilization Ratio
- Total EMI per Month
Parameters:
- Monthly Savings Rate
- Frequency of Overdrafts
- Spending Categories (essentials vs. non-essentials)
- Consistency in Spending and Saving Habits
Parameters:
- Highest Level of Education
- Field of Study and Relevance to Current Job Market
- Job Stability (duration in current job, frequency of job changes)
- Professional Certifications and Skills
Parameters:
- Homeownership Status (own vs. rent)
- Car Ownership and Related Expenses
- Dependents and Family Obligations
- Participation in Retirement Savings Plans
Parameters:
- Diversity of Investment Portfolio
- Value of Owned Assets (real estate, stocks, bonds)
- Frequency of Investment Activities
- Growth Rate of Investments
Parameters:
- Health Insurance Coverage
- Frequency of Medical Expenses
- Participation in Wellness Programs
- Disability Status