Giter Club home page Giter Club logo

churn-prediction-using-ml-and-flash-deployment's Introduction

Problem Setting

To develop a model that helps them retain customers of a telecom provider as customers are quick to switch to different providers based on the benefits offered by many other providers

Methodology

Data cleaning and exploratory analysis Feature selection using data exploration and visualization Model building to predict churning of customers Model deployment using Flask API

Dataset details

Churn.- Customers who left within the last month Details of services used by customers — phone, multiple lines, internet, online security, online backup, device protection, tech support, and streaming TV Customer account information - contract, payment method, paperless billing, monthly charges, and total charges. Demographics information about customers — gender, age range, and if they have partners and dependents.

Feature Selection of attributes for model building

We use sampling technique called SMOTE(Synthetic Minority Oversampling Technique) to create synthetic data points for minority class (Yes) which is also used for feature selection We use one-hot encoding for our feature selection because the models don’t interpret categorical data. Hence, we need to convert them into non-categorical data and we assign numbers using the function: replaceStruct = {"Churn":     {"No": 0, "Yes": 1 }  } oneHotCols = ["gender","SeniorCitizen","Partner","Dependents","PhoneService","MultipleLines","InternetService","OnlineSecurity","OnlineBackup","DeviceProtection","TechSupport","StreamingTV","StreamingMovies","Contract","PaperlessBilling","PaymentMethod"] replaced_data=df.replace(replaceStruct, inplace=True) replaced_data=pd.get_dummies(df, columns=oneHotCols) replaced_data.head()

Model Building

We have built models on the SMOTE and standardized data We are using the 30 features from the 47 features We will build 4 different models – Decision Trees, Logistic Regression , Adaboost and Logistic Regression

Model Insights

Decision Tree Model model has a fairly low accuracy in determining churning rate of the customer Logistic regression model, which is overall slightly better performer in terms of predicting churners but it's miss-classification rate is too high. Random Forest Model whose miss-classification rate for predicting churners is 3rd lowest and also overall mis-classification rate is also low. Ada Boost Model whose miss-classification rate for predicting churners is 2nd lowest is the best model

churn-prediction-using-ml-and-flash-deployment's People

Contributors

shubhamc18 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.