Two features are measured at different times but belong to the same target. In which conditions or form these features can be modeled together? Or they shouldn't be used in the same model but modeled separately? E.g. I am trying to identify users by looking at their mouse dynamics data and keyboard dynamics data, however, these two are measured independently but they belong to the same person (I have this scenario for many users). To explain it better, imagine it like I gave a text to users to repeatedly write them using the keyboard (and I recorded their keyboard usage) and similarly I gave them a different task to use mouse repeatedly (and I recorded that too). The sample size is also different for each feature.

  • $\begingroup$ How do you wind up with a different sample size for each feature? $\endgroup$ – Dave Oct 29 '20 at 10:50
  • $\begingroup$ The sample size for each user is simply formed by the repetition of a task. So if user 1 repeated the keyboard task 14 times sample size is 14 (for keyboard dynamics of that user), and the mouse task 27 times then the sample size is 27 (for mouse dynamics of that user). $\endgroup$ – Shahriyar Mammadli Oct 29 '20 at 10:55
  • $\begingroup$ If we imagine that sample sizes were the same, even in that case I am suspicious about combining or joining these two because they did not record parallelly. I am kind of confused on the theoretical side of the problem. $\endgroup$ – Shahriyar Mammadli Oct 29 '20 at 10:57

From the example I assume that an instance corresponds to a user, and you have both full sequences of the mouse and keyboard as features for predicting the user. I can think of two options for using these features in the same model:

  • With feature engineering, find a way to represent both sequences as a fixed array of features. For example you might have features such as average typing speed average mouse speed, number of mouse movements, number of times each key is pressed, etc.
  • Similar idea but in a more DL approach: find a way to represent both sequences as embeddings (there are methods for word embeddings, sentence embeddings, graph embeddings...)

In my opinion the main issue is the variable length of the sequences, not the fact that they are not aligned (the alignment would matter if the target variable was for one element in the sequence).

  • $\begingroup$ Thanks, Erwan. Actually, I am able to handle the variable length of the sequences problem, but I am stuck about whether it is right to align these two independently recorded features in the same model or I should perform the separate modeling approach. Even though the target variable is the same in both, aligning the samples is another challenge. I mean, which sample from MD should be aligned with another sample from KD. Let's think that there are 5 samples, m1, m2, m3, m4, m5 from MD, and 5 from KD, k1, k2, k3, k4, k5. Can I discard the order while aligning or I should follow some steps? $\endgroup$ – Shahriyar Mammadli Oct 30 '20 at 11:18
  • $\begingroup$ Oh ok I think I understand now: you're talking about matching a particular keyboard sequence with another mouse sequence, in order to use the two kinds of information in the same model. Sorry I didn't understand this before. I'm not really sure about this scenario, but given that the sequences all represent the same task by the same user and have no direct relation with each other, it looks to me like you could randomly pair any sample from KD with any sample from MD. You could even try to do the full cartesian product KD x MD, i.e. consider all the possible pairs. But I don't have a clear .. $\endgroup$ – Erwan Oct 30 '20 at 15:45
  • $\begingroup$ ... idea of how this kind of data works and how to manipulate it, so I might be wrong. $\endgroup$ – Erwan Oct 30 '20 at 15:46
  • $\begingroup$ That is the case with me too. I have been searching for papers or articles about the issue, but seems like no one has faced the issue or put that on paper. I accept it is kind of weird situation, but from mathematical side I think there is a something problematic with that because different combinations of the pairs may affect the model coefficients (or other outputs) differently. I think, I will follow this approach to see whether different pairings affect the result of the model drastically (i.e. outputs vary). Thank you very much again. $\endgroup$ – Shahriyar Mammadli Oct 31 '20 at 18:09

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