Which UI and API Tools Should You Choose for Testing?

A crash course on testing tools for those of you who are looking to automate their testing.

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Customer churn prediction

I published the story on an Exploratory Data Analysis to identify less and more loyal customers to an international bank 3 months ago. https://medium.com/@ezginazman/which-customers-are-less-or-more-loyal-to-an-international-bank-8318d1827ee0. Now, I would like to predict the churn decision of the customers using supervised machine learning algorithms.

This project consists of 3 main steps: Feature engineering, comparison of supervised machine learning algorithms, and Flask&Heroku Web Application.

As it can be seen that churn decision is unbalanced. The customers who churned is about 20% of the total number of our customers.

Group label distribution

It is seen that it is quite hard to classify features using a linear classifier according to the distributions.

Which algorithm should I prefer?

-Binary Logistic Regression, Support Vector Machine, Gradient Boosting, Bagging Decision Tree, Random Forest, Extra Tree, AdaBoost, Stochastic Gradient Boosting, Voting Ensemble, or XGBoost?

Ensemble methods such as Bagging and boosting algorithms are learning algorithms that construct a set of classifiers and then classify new data points by taking a weighted of their predictions.

According to the results, Gradient Boosting and Random Forest classifiers have the highest AUC rates. Let’s compare the confusion matrix results of the Gradient Boosting and Ada Boost classifiers.

Confusion matrices results of the best classifiers

Gradient Boosting classifier predicts more truly than Random Forest according to the true and predicted churn labels. We can also check the 10-fold CV and F1 results of the models. Gradient Boosting still has the highest accuracy and F1 rates.

As we consider the churn prediction, it is clear that the Gradient Boosting model should be preferred for the Web Application model. Thus, I saved this model using the pickle library and design a predictor using the flask library. Then, I deployed this app on Heroku. You can see the prediction percentages of the various feature values.

Add a comment

Related posts:

Locked in Apple Ecosystem

Apple launched iMessage, its instant messaging service, in 2011. Immediately afterwards, of course, there was an internal debate about whether to let it out of its platforms. Ultimately, they didn’t…

One reason to go for it as a Solo Female Traveler

Side effects of solo travel include increased trust, not the opposite.

How to Stop Your Novel From Sagging.

I always found it challenging to come up with the middle to any of my stories. I would know the beginning, and I would see the ending, but getting characters from A-B was tricky. I knew everything…