Recommendation system implementation for Dummies
- Imagine that you have recently gone bankrupt and 1 fine day you get a call from a bank agent requesting you to subscribe for a term deposit.

This is the reaction most of us will have.
- Banks too invest a lot, they invest in the agents that call you up and also the telephone bills are huge.
What if I tell you, both the end user and the bank can be profited by using a simple recommendation system.
I’ll describe the approach below.
For the demo purpose, I have used the bank dataset from the below link -
https://archive.ics.uci.edu/ml/datasets/bank+marketing
The bank already has data of 42000+ customers with the following details
- age, job, marital status, education, loan defaulter, balance, housing loan, personal loan.
- last contacted, day, month, duration, previous outcome
- Finally variable y whether you did subscribe for the term plan or not.
After doing a bit of preprocessing to the data
- Converting Yes and No to 0 and 1.
- Converting Categorical variables to Numeric variables using One Hot encoding.
- Dropping columns such as contact, day and month which typically don’t contribute much to the prediction of the target variable.
This is something that I get after doing a bit of preprocessing.

I split my data into train and test and predict the outcome based on logistic regression model.
I get an accuracy score of around 90%

My goal isn’t however solved. What is the use of a tool if I cannot use it in my data to data life.
Suppose a new customer comes in with the following details

I just call my recommendation engine and check the output and what do I observe?
Any guesses? Will I be telling my customer agent to call this guy up for a term deposit subscription?
The recommendation engine gives me the following output

It gives me an output 0 with a probability of 0.96!
So, I can clearly say that this person won’t be interested for a term deposit subscription based on the data he has provided.
- Its a 2 way benefit scheme, the banks can target users which they now feel can subscribe to a term deposit based on the data and this will also reduce the workforce and the budget required for the sales operation of such a term deposit subscription.
- The users who are genuinely in need of term deposit subscription will be contacted and the other can work hard to enroll themselves in the coming future for a term deposit subscription.
- For complete code visit : https://github.com/bhattbhavesh91/Term_Deposit_Recommendor_System/blob/master/Term_Deposite_Recommendor_System.ipynb
I know it was this simple

