Welcome to the Credit Risk Assessment repository! 🏦📊 Here, we're all about predicting whether customers are likely to churn using some fancy machine learning models. Get ready to dive into a world of data, predictions, and a sprinkle of fun! 🎉
Are you ready to predict customer churn with the power of Python and machine learning? This project provides a complete pipeline from data preprocessing to model training and evaluation. With this toolkit, you'll be able to assess customer credit risk and predict churn with confidence. Let's get started!
Here's a quick rundown of the magic you'll find in this repository:
The heart of our project. This script collects user input, loads the pre-trained model, and predicts customer churn. It's like a crystal ball but more tech-savvy! 🔮
Similar to churn_predictor.py, but with added awesomeness for deployment as a Streamlit app. Bring your predictions to life on the web! 🌐
Splits your dataset into training and testing sets with a sprinkle of randomness. Perfect for when you need a fresh split every time. 🎲
This script preprocesses data, trains an SVM model, and saves the pipeline. It's the engine room of our machine learning journey. 🚂
Another version of the training script for testing purposes. Because who doesn't love some extra validation? ✅
Our pre-trained model pipeline, ready to make predictions. It's the secret sauce! 🌟
Before you can start predicting churn, you need to set up your environment. Here's how:
-
Clone the repository:
git clone https://github.com/yourusername/credit-risk-assessment.git cd credit-risk-assessment -
Install the required libraries:
pip install -r requirements.txt
-
Ensure you have the necessary data: Make sure you have the
customer_churn.csvdataset in the root directory.
To predict customer churn using the command-line interface:
python churn_predictor.pyFollow the prompts to enter customer data and get instant predictions! 📈
To launch the web app:
streamlit run churn_predictor_app.pyOpen the provided URL in your browser and enjoy the interactive predictions. 🚀
To split the dataset into training and testing sets:
python dataset_splitter.pyTo preprocess the data and train the SVM model:
python svm_classifier_train.pyTo validate the model with additional testing:
python svm_test.pyHere's a peek into the project's structure:
credit-risk-assessment/
│
├── churn_predictor.py
├── churn_predictor_app.py
├── dataset_splitter.py
├── svm_classifier_train.py
├── svm_test.py
├── pipeline_model.pkl
├── customer_churn.csv
├── customer_churn_test.csv
├── customer_churn_train.csv
└── README.md
We welcome contributions with open arms! If you have ideas for improvements or new features, feel free to fork the repo, make your changes, and submit a pull request. Let's make this project even more awesome together! 💪
Happy predicting! May the churn odds be ever in your favor! 🍀