Kanuri29/Bank_Risk_analysis
0
Customer Churn Prediction App
This is a Streamlit-based web application for predicting customer churn using XGBoost machine learning model.
Features
- Upload CSV dataset for churn modeling
- Automatic data preprocessing with OneHotEncoding for categorical features
- Train XGBoost classifier on the dataset
- Display model evaluation metrics: accuracy, confusion matrix, cross-validation scores
- Interactive sidebar for inputting new customer data to predict churn probability
Dataset
The app expects a CSV file with the following columns:
- CreditScore
- Geography
- Gender
- Age
- Tenure
- Balance
- NumOfProducts
- HasCrCard
- IsActiveMember
- EstimatedSalary
- Exited (target variable)
A sample dataset Churn_Modelling.csv is included in the repository.
Installation
- Clone the repository:
git clone <repository-url>
cd <project-directory>- Install dependencies:
pip install -r requirements.txtUsage
Run the Streamlit app:
streamlit run app.pyOpen the provided URL in your browser, upload the CSV file, and interact with the app.
Requirements
- Python 3.7+
- Streamlit
- XGBoost
- Scikit-learn
- Pandas
- Matplotlib
- Seaborn
License
[Add license information if applicable]
