I am currently working on a dataset to predict customer attrition based on past data and transactions of the customers.
There are 2,40,000 customers in total out of which around 1,77,000 customers are active(as of today) while the remaining ones are inactive (6300). This is how sample headers look like :
Overall, I have 40 predictors which include customer details, transaction details, item details etc.
The data obviously has more active customers than inactive customers i.e. inactive customers form only 2.6% of the entire customer base. Due to this, there are more transactions conducted by active customers(25million/32million) than by inactive (previously active) (6million/32million) ones.
Despite this, I created a logistic regression model using random data (
shuf -n 500000 data.csv). The model achieves 96.69% base accuracy in predicting when fed with random data.
The problem: How to make the model predict with greater accuracy on such a biased dataset? or How do I sample the data more appropriately?
Model prediction: With 99.7% probablity, it predicts that the customer will be active whereas the customer is inactive
PS: Changing threshold won't help much