This FastAPI-based web application is designed to predict credit scores using machine learning. The project follows a systematic data preprocessing and feature selection approach to ensure the model's accuracy and efficiency.
The project began with comprehensive data preprocessing. The dataset initially contained numerous unnecessary columns, making it crucial to streamline the information for efficient model training. To achieve this, the following steps were taken:
-
Data Cleaning: The dataset was cleaned to remove any missing or erroneous values, ensuring that the data used for training and predictions was of high quality.
-
Feature Selection: To identify the most relevant features for credit score prediction, a heatmap was employed to visualize the correlation between variables. Only the columns that demonstrated a significant impact on credit scores were retained for further analysis.
With the refined dataset, a machine learning model was developed to predict credit scores based on user-input financial parameters. The model was trained on the carefully selected features, leveraging historical data to make accurate predictions.
FastAPI, a modern web framework for building APIs with Python, was employed to create a user-friendly interface for credit score prediction. Users can input their financial information through a user-friendly form, and the FastAPI application processes these inputs to provide a credit score prediction.
-
Data Cleaning and Transformation: The project incorporates robust data preprocessing techniques to ensure the quality of the dataset used for credit score prediction.
-
Feature Selection: Only the most relevant features are retained for model training, enhancing prediction accuracy.
-
Machine Learning Model: A trained machine learning model leverages historical data to predict credit scores based on user inputs.
-
FastAPI Integration: FastAPI provides a seamless and user-friendly interface for users to input their financial data and receive credit score predictions.
-
Clone the repository:
https://github.com/Prem07a/Credit-Score-Classification.git cd credit-score-predictor
-
Make Vitrual Env
python -m venv venv
-
Activate vitrual env
- (Windows/Linux)
.\venv\Scripts\activate
- (Mac)
source venv/bin/activate
-
Install Requirements
pip install -r requirements.txt
-
Run the FastAPI application:
uvicorn python.backend.main:app --reload
To use this credit score predictor, follow these steps:
- Ensure you have the required dependencies installed (see Dependencies section).
- Clone the repository as mentioned in the installation steps.
- Run the FastAPI application.
-
Main Form Page
- URL:
/
- HTTP Method: GET
- Description: Renders the main form page where users can input their financial data.
- URL:
-
Credit Score Prediction
- URL:
/predict
- HTTP Method: POST
- Description: Predicts the user's credit score based on the input data and returns a credit grade.
- Request Parameters: (List of parameters...)
- URL:
-
Resume Page
- URL:
/resume
- HTTP Method: GET
- Description: Renders a resume page.
- URL:
-
Hire Me Page
- URL:
/hire
- HTTP Method: GET
- Description: Renders a "Hire Me" page.
- URL:
-
Thank You Page
- URL:
/thankyou
- HTTP Method: POST
- Description: Saves user's contact information and message to a file and displays a "Thank You" page.
- Request Parameters: (List of parameters...)
- URL:
You can find HTML templates in the project's templates
directory.
Make sure to have the following dependencies installed: