I need to do a classification of binary labels. The dataset represents a loan procedure. So one row is a certain moment of a process for a certain case.
The dataset consists of several cases more than 9000 (attribute CaseID)
Example:
CaseID 1: consists of a process of 8 rows (each row represents a moment) and in the end the loan is accepted or refused.
CaseID 2: consists of 20 rows
etc etc
I was already able to combine these rows in one row per case and then predict. But I would also like to keep the order of these processes as maybe it might increase the performance of the models (random forest and XGboost).
My question is: How can I say to the model use the first 8 rows of this case to tell me for this case what its label is and use the first 20 rows for the next case and predict its label etc etc?
I hope the question is clear?