I have a dataset of the type:

enter image description here

Time_from_anchor is the time from when the diagnosis was made, if he had cancer. i.e patient 1 was diagnosed with cancer at 0. He had tests x and y at time -1 and tests x and z at time -3. OR it is the minimum time between last test and today if diagnosis was negative.

How would I create a new feature that accounts for both the time of different tests and the different types of events and their numeric values for each patient?

  • $\begingroup$ Your data is not clear. Could you post it in a better format, perhaps as a data frame? And also what exactly are you asking? You should clarify it as well. $\endgroup$ – serali Nov 16 '19 at 12:26
  • $\begingroup$ i have updated the question now. $\endgroup$ – testing1243 Nov 16 '19 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.