My goal is to predict the value of Y based on multiple values of X1 and X2 for each observation of Y.
In my example, I want to predict whether a customer will file for bankruptcy (table 1) based on limits and balances of their credit cards (table 2). The challenge is that customer 1 has two credit cards, whereas customer 2 has one credit card.
How do I map table 2 to table 1 in this scenario?
(Of course I can create summary statistics, but I do not want to bias the model.)
Table 1: Bankruptcy filing
customerId | Customer filed for bankruptcy (Y) 1 1 2 0
Table 2: Customer credit cards
customerId | creditCardId | Credit limit (X1) | Credit used (X2) 1 1 5 5 1 2 9 8 2 1 10 1