CoolFace
Apppublic

Kanuri29/Bank_Risk_analysis

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

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

  1. 1.Clone the repository:
   git clone <repository-url>
   cd <project-directory>
  1. 1.Install dependencies:
   pip install -r requirements.txt

Usage

Run the Streamlit app:

streamlit run app.py

Open 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]