Many samples of the same identity for machine learning This seems to be a simple question, yet I couldn't find a clear answer on the net.
I'm using machine learning to classify ill/healthy patients based on their medical record (probably using a Random Forest algorithm)
I'm new to ML and so far, all my data contained one row for one record/person/patient.
Now, however, in my training data (labeled) each patient has about 11 records from the same medical test from different dates, and I wonder - should I aggregate then all into a one row for each patient, summing and averaging the different variables?
Should I use more sophisticated techniques than simple average? or should I leave the data as is and let the machine figure it out?
 A: Good question. There are multiple possible solutions here:
(1) The simplest one would be to only take the most recent measurement into account.
(2) Alternatively you could compute features (mean, max, min, etc.) per medical test not taking the number of records into account. 
(3) Finally you could use all possible data for each patient. Here the tricky question is how you deal with "missing" data. (E.g. one patient has five records, the other has two --> three are missing for the second patient).
I recommend you to build a simple-as-possible baseline model with the approach in (1) and in the meantime you read throughout the tag of "missing-data" and start here:
Handling NaN values by replacing them with -999 
A: I think, you should test both and compare the results as for instance with cross-validation. Intuitively, the point in time when the test was made should play a role. If they were ill two years ago, but had been healthy since then, the records from two years ago should play a smaller role in whether they are ill today.
