Hi all,
Any one who managed to create a loan status predictor as one of the recomended (important) predictor required by this competition.
The statement of creating this variable is: "Did the company receive a payment after the term date + (window * term) days) and (total amount paid so far grater that 60% of contract value) ? " the predictor should be a categorical varible based on the threshold of 60% of contract values which classify a customer as Good/ Bad player.
Based on my understsnding, I tryed the following:
Taking the sum of (PaymentsHistory divide by TotalContractValue)X 100), and from this results I used the threshold 60% to create a loan predictor by comparing my result (if result > 60% = 1/good player or result < 60% = 0/Bad Player).
Thank you.
Good afternoon. Pls, I need your help. My pred shape is not the same as test shape. What can I do?
y_pred.shape[0] == test.shape[0]
I'm Good...
I do know what the actual different you are getting.
But let have a little calculation, the test set have 9336 number of records with 6 tergets for each recored while the submission file have 56016 records with one predicted values. To get the actual test shape with respect to Submission file you need to transform your test data into long format using the six terget (create a one colum that will contain both terget, each ID wil have six targets of a new created column), by transforming you test data set it will be 9336X 6 = 56016 submission file records. In R we use pivot_long() function, in python I have limited knowledge
ID new_colum/Terget
ID1 m1
D1 m2
D1 m3
D1 m4
D1 m5
D1 m6
D2 m1
D2 m2 and so on
in python he can use the method .flatten()
so it should be for that case
y_pred.flatten()
what if result == 60%
anyway I want ask about the window, from what you posted above you only took one part of the condition which is if total payments is greater than 60% of contract value. How can one deal with the first condition of 'did the company receive a payment after `term date + (window * term)`
from the starter notebook the function creat_target was defined with a default window argument of 2 but 4 was passed when the function was called. How are we suppose to choose the value of window as this will determine the value of the loan status