Learn practical skills, build real-world projects, and advance your career

Churn Modelling

Churn rate, in its broadest sense, is a measure of the number of individuals or items moving out of a collective group over a specific period. It is one of two primary factors that determine the steady-state level of customers a business will support. (Source -> Wikipedia)

image.png

In this notebook the data set contains details of a bank's customers and the target variable is a binary variable reflecting the fact whether the customer left the bank (closed his account) or he continues to be a customer.

In this notebook you will see
  • Data Preprocessing

    1. Importing the libraries

    2. Loading the data.

    3. Encoding categorical data

    4. Splitting the data into training and test set

  • Building the ANN(Artificial Neural Network)

    1. Inititalizing the ANN

    2. Adding the input layer and hidden layers

    3. Compiling the model

    4. Fitting the ANN to the training data

    5. Making the predictions and evaluating the model

  • Evaluating, Improving and Tuning the ANN

    1. Evaluating the model(Using Keras Classifier and K-fold cross validation)
    2. Improving the ANN(Tuning model hyperparameters using Grid Search CV)

Data Preprocessing

Importing the libraries

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os