0
$\begingroup$

I am working with data that requires classifying if a patient will develop cancer or not in the future, based on medical tests done over time. The tests have a sequential relationship. A, then B, then C, etc. For example:

| Patient ID | Test ID | RBC Count | WBC Count | Label


| 1 | A | 4.2 | 7000 | 0

| 1 | B | 5.3 | 12000 | 0

| 1 | C | 2.4 | 15000 | 1

| 2 | A | 7.6 | 8000 | 0

| 2 | A | 7.4 | 7500 | 0

Each point is not taken at a regular time interval, so this may not be considered a time-series data. I have tried to aggregate features and use ensemble methods like Random Forests. Can I apply RNN? If so, how? Or other methodologies?

$\endgroup$
  • $\begingroup$ Does the rows have sequential relationship? For example, for patient 1, was Test A done before test B? Or you do not know which one come first? $\endgroup$ – Munichong Aug 24 '18 at 19:44
  • $\begingroup$ Yes, they have a sequential relationship. In practice, they have dates. I edited the question to include that. $\endgroup$ – infinite-rotations Aug 24 '18 at 19:47
0
$\begingroup$

RNN is applicable. Each test is a time step. Each time step has an output, which is the label. The input of each time step is the features of the test and/or patient (You may also want to include the true label of the previous time step as the input of the current time step, since in test data you have some past test result of a patient). The RNN is fed patient by patient. You may wanna check many-to-many RNN (The last example in the first figure). I think your case is a common application in which RNN time series is used. So you may find a lot of papers and blogs about the design and implementation.

$\endgroup$
  • $\begingroup$ Are you able to share an example that is not behind a paywall? $\endgroup$ – infinite-rotations Aug 24 '18 at 20:01
  • $\begingroup$ check if this article is what you need: machinelearningmastery.com/… LSTM is a complicated version of RNN. Conceptually, they are similar. $\endgroup$ – Munichong Aug 24 '18 at 20:05
  • $\begingroup$ Do you have any insight on architecture? I have been using Sequential, LSTM, TimeDistributed. $\endgroup$ – infinite-rotations Aug 28 '18 at 4:29
  • $\begingroup$ You should use Sequential model. The specific model can be RNN, LSTM, or GRU... If all time steps have outputs, the last layer of the model should be TimeDistributed. If only the last time step has output (i.e., many-to-one), the last layer should not be TimeDistributed. $\endgroup$ – Munichong Aug 28 '18 at 15:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.