Skip to content

VishnuTejaDumpala/Customer-Churn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Customer Churn

Problem Statement:

You are the data scientist at a telecom company named “Neo” whose customers are churning out to its competitors. You have to analyze the data of your company and find insights and stop your customers from churning out to other telecom companies. Customer_churn Dataset: The details regarding this ‘customer_churn’ dataset are present in the data dictionary

Tasks Performed:

  1. Data Manipulation: ● Extract the 5th column and store it in ‘customer_5’

● Extract the 15th column and store it in ‘customer_15’

● Extract all the male senior citizens whose payment method is electronic

check and store the result in ‘senior_male_electronic’

● Extract all those customers whose tenure is greater than 70 months or their monthly charges is more than $100 and store the result in customer_total_tenure’

● Extract all the customers whose contract is of two years, payment method is mailed check and the value of churn is ‘Yes’ and store the result in ‘two_mail_yes’

● Extract 333 random records from the customer_churndataframe and store the result in ‘customer_333’

● Get the count of different levels from the ‘Churn’ column 2. Data Visualization:

● Build a bar-plot for the ’InternetService’ column:

a. Set x-axis label to ‘Categories of Internet Service’

b. Set y-axis label to ‘Count of Categories’

c. Set the title of plot to be ‘Distribution of Internet Service’

d. Set the color of the bars to be ‘orange’

● Build a histogram for the ‘tenure’ column:

a. Set the number of bins to be 30

b. Set the color of the bins to be ‘green’

c. Assign the title ‘Distribution of tenure’

● Build a scatter-plot between ‘MonthlyCharges’ and ‘tenure’. Map

‘MonthlyCharges’ to the y-axis and ‘tenure’ to the ‘x-axis’:

a. Assign the points a color of ‘brown’

b. Set the x-axis label to ‘Tenure of customer’

c. Set the y-axis label to ‘Monthly Charges of customer’

d. Set the title to ‘Tenure vs Monthly Charges’

e. Build a box-plot between ‘tenure’ & ‘Contract’. Map ‘tenure’ on the

y-axis &

f. ‘Contract’ on the x-axis.

  1. Linear Regression:

● Build a simple linear model where dependent variable is ‘MonthlyCharges’

and independent variable is ‘tenure’:

a. Divide the dataset into train and test sets in 70:30 ratio.

b. Build the model on train set and predict the values on test set

c. After predicting the values, find the root mean square error

d. Find out the error in prediction & store the result in ‘error’

e. Find the root mean square error

  1. Logistic Regression:

● Build a simple logistic regression model where dependent variable is ‘Churn’ and independent variable is ‘MonthlyCharges’:

a. Divide the dataset in 65:35 ratio

b. Build the model on train set and predict the values on test set

c. Build the confusion matrix and get the accuracy score

d. Build a multiple logistic regression model where dependent variable

is ‘Churn’ and independent variables are ‘tenure’ and ‘MonthlyCharges’

e. Divide the dataset in 80:20 ratio

f. Build the model on train set and predict the values on test set

g. Build the confusion matrix and get the accuracy score

  1. Decision Tree:

● Build a decision tree model where dependent variable is ‘Churn’ and independent variable is ‘tenure’:

a. Divide the dataset in 80:20 ratio

b. Build the model on train set and predict the values on test set

c. Build the confusion matrix and calculate the accuracy

  1. Random Forest:

● Build a Random Forest model where dependent variable is ‘Churn’ and independent variables are ‘tenure’ and ‘MonthlyCharges’:

a. Divide the dataset in 70:30 ratio

b. Build the model on train set and predict the values on test set

c. Build the confusion matrix and calculate the accuracy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published