# Loan Prediction, Reveal Your Approach

#1

Kindly reveal your approach in Loan Prediction Competition.

#2

Buddy, it got extended till Feb 9. Keep trying!!!

#3

Hi,
As the time is extended i recommend you to try yourself first and once the deadline is passed i would try to explain my approach to the problem.

Thanks,
Divye

#4

Hi,

I am new to these competitions and I am stuck at the very basic .77 score. I tried Ensemble, bagging etc. I used mice to fill in missing data.
I think my problem is that I lack creativity in Feature Engg. Can someone help?

In the case of this loan data, I could not identify any specific patterns. The most significant columns Credit_History and Property_Area are resulting in a lot of False Positives.
For instance why would the Loan_Status be N for the following loan IDâ€™s --LP001003,LP001038,LP001259

What is the hypothesis definition for this case study?
#5

Its not about tools its more about technique in this competition. I scored 0.78472 just by doing Y/N based on my understanding and findings in excel. Work towards adding new features, think about the business problem. Also, you need to prevent models from over-fitting as the data set is having only ~700 rows.

Good luck and try hard.

Regards,
Aayush

#6

Thank you @aayushmnit,

Your Ideas were helpful.I used Pivots on Excel and arrived at a vector, based on my analysis.
From .7777 I improved to 0.78472. Now I am stuck hereâ€¦

Let me reveal some of my analysis. I hope it is treated as ethicalâ€¦ and anyways I seem to be miles away from the leaderboard:

1. Added a column to sum up the Applicant and coapplicant Income
2. Created a Ratio column for loan_amount/sum_income
3. Added a rank vector based on the following findings:
Positives:
++ Being a graduate,not self employed, married and less dependents
Negatives
â€“ Ratio more than 6, being unmarried, having blank gender
â€“ being male, income less than 6000 and not graduate
â€“ female and self_employed
Nextâ€¦Iâ€™ll try to simplify my ranking vectorâ€¦ i guess it might be causing some overfitting, because my model does not seem to improve any further

#7

Let me tell you first you have done an awesome job here! You might want to include loan tenure also into your analysis as in the end the applicant is paying an EMI per month not the whole loan amount at once Well try to enjoy the problem solving phase by business context.

Once you are done with it. Use these features in advanced modelling techniques like Decision trees, Randomforest, Xgboost , GBM techiques and work on not to overfit by regularizing. Also remember, the public LB is a bit deceptive its only using 50% of the data not all , so you might overfit here but final ranking is on the remaining 50%.

Good luck!

#8

Hi,
Can anyone share the data set with me for the problem. I have not registered but would love to try

#9

I think you can register for the Contest and download the dataset from Contestâ€™s Page, if they are allowing to Register now.

#10

hi
I am new to data science cn you please help me out with the loan prediction problem I mean how you create the rank predicator

it would be a great help

#11

Hiâ€¦

Lets focus on finding Golden Features. Understanding the pattern of data improves accuracy. LB scores fall in place once we understand pattern and generalize thisâ€¦
Thanks

#12

Hi @shan4224 ,
could you please let me know how (only method) to identify the Golden Features.

Thank youâ€¦

#13

Hiâ€¦

Its little difficult to find any only method.We can start by exploring descriptive statistics, plottings. The idea is to find out specific patterns which better explain target variable. We can try out polynomials, transformations etc. After that we can analyze by plotting the same. A visual inspection can confirm .
Hope it helpsâ€¦
Thanks and Regards,
Shan

#14

@aayushminit â€¦Loan tenure might be very significant for prediction purpose But then for calculating you require

• Loan Amount --[Available in data set]
• EMI --[Not Available monthly data]
• Interest rate --[Not Available in data set]
• start and end date of Loan started --[Not Available in data set]

We have Only Loan Amount available with us .rest of the parameter we donâ€™t have

What features did you engineer in the loan prediction data set?
#15

@Nabi
First of all you have not tagged me properly. Anyways, at the time I answered the question the competition was still running, so I just dropped some hints there and not the whole methodology Coming to how you can use the loan tenure in the model building process , hereâ€™s my approach for it -

1. Checked that the problem is about home loan and in India the home loan Interest rate is generally in 9-10% range . So I assumed that its 9.5% for all the customers
2. Calculated EMI using this formula `EMI = [P x R x (1+R)^N]/[(1+R)^N-1]`, Where P is principle amount(available), R is rate of Interest(assumed) and N is Loan tenure(avaiable)
3. Created a ratio of EMI to total income

The idea behind this approach is that greater the EMI/Income ratio lesser will be the chances of the person to get a loan approved from bank. Then you can use this new feature in any kind of model you are building.

How I like to solve a problem is to first understand the business we are dealing with and then think of factors without looking at the dataset available.Even if the fields you want are not available, I think of ways of capturing that information with some trade off in accuracy. Hope you get what I am talking about.

Regards,
Aayush Agrawal

#17

My approach as of now

1. Did data exploration using pivots and found credit history seems to be having maximum predicting power. I do believe income and loan amount has a role to play as well but kept them aside for a while.

2. Used rpart in R to train my model and applied on test data set - my score was around 0.77

3. Looked into missing values and found big chunk of missing values for credit history in test data set so again did analysis to fill up credit history missing values. This approach gave me score of 0.7986 (quite a big jump)

4. Now will look up into applicant income and loan term variables.

Will keep posted my findingâ€¦ happy predicting !!

#18

Hi, everyone
i want to download the data set of Loan Prediction problem, but i failed to get it
Could you send me the dataset to my email, thanks in advance!
my email address: kyo4321#outlook.com (#changed to @)

#19

hey @rajeevpareek1
I am new to data analysis .
I am not able to understand what is good way to fill up the missing values. Credit History had a lot of missing values .

#20

@Avior, havenâ€™t had too much experience in statistical analysis myself. Having said that, hereâ€™s one of the approaches. Not relating to this specific example, however, if I had a continuous numeric variable, I would use a mean value for that variable to populate missing values. Alternatively, if there was a nominal categorical variable like location, I would use the modal value (most frequently occurring value) as a value to populate missing values.

More than happy for other participants to add to my knowledge on this.

Cheers,

Sandesh.

#21

@Avior - I am also new to R and data science and found the AV blog on missing value imputation and outlier detection really helpful - https://www.analyticsvidhya.com/blog/2016/01/guide-data-exploration/ . I am not sure if you are working on any specific language(R or python), however you can also google for R-bloggers article on missing value treatment. Its really good.