This is probably a simple question. Assume I'm interested in modelling a binary variable, with various covariates, including ones that are time series observations. In the usual modelling approach, one can try searching for various features from the timeseries data, such as standard deviations, averages, max and etc, to make a flat model matrix.

My question: what are the tools/approaches that allow for a (relatively) simple inclusion of time series data to a classification problem?

I don't think panel regression would work since the time series data is very different among the rows, sometimes is very sparse and asynchronous. Melting the data, due to the structure, obviously wouldn't work too. Descriptive statistics is the easy way, but there should be something else?

I'm not experienced in working with neural networks, but maybe there's a NN approach that could find meaningful structures in the time series data?

I'm also thinking about clustering different time series based on their similarities and check for significance, but again, is there something robust to different length/sparseness of the time series?

  • $\begingroup$ Logistic regression done in a mixed models framework would seem to be one possibility. I suspect (as do you) that a NN approach would also be possible, since NN's are generally going to give you a logistic response model. $\endgroup$
    – 42-
    Commented Nov 20, 2018 at 17:45
  • $\begingroup$ @42- thanks. Would you by any chance know any good sources/examples of similar cases? Wouldn't want to reinvent the wheel, if there are good implementations available $\endgroup$
    – runr
    Commented Nov 20, 2018 at 19:29

1 Answer 1


I think one of your statements is simply a misunderstanding of the relationship of data structure and analysis. When you say "Melting the data, due to the structure, obviously wouldn't work too." you seem to failing to understand that melting the data properly would require construction of a supplemental covariate that would encode the "column location" of the values. In longitudinal data this location (in the "wide" version of the data) would become the "time" variable in the "long" format. Regression and neural network methods can handle such a format.

I intended that my comment only be a suggestion for improving a search strategy, since you had not described the task or the inputs in any great detail. So I'm "answering" with some links resulting from several variations on a search strategy along the lines of ("binary outcome" OR "signal detection" OR classification) AND ("logistic regression" OR "neural networks") AND longitudinal AND missing:









  • $\begingroup$ Thanks, I will look into it. My idea behind "melting wouldn't work" was due to the mentioned occasional sparseness, asynchronicity and different time frames - that is, long and dense series for some outcomes (or, say, "rows"), and sparse or very short for others. Therefore, model would be biased (and possibly unbalanced) towards those outcomes, that featured long and dense series. But I agree, without detailed description of inputs $\endgroup$
    – runr
    Commented Nov 21, 2018 at 8:39
  • $\begingroup$ The sparseness or missing-ness can be a problem, but that is not a barrier to "melting" your data. It's a reason to consider imputation and to otherwise handle the consequences of the sparsity. $\endgroup$
    – 42-
    Commented Nov 21, 2018 at 17:04
  • $\begingroup$ I think you're right in the general case. In my case, one timeseries corresponds to a lifetime of an account. There may be many, there may be one, short or long. So non-existence of an account is also information, same as popping up of a new account and instant close. Wouldn't want to lose this info, but I agree, this could be encoded in another variable. I will think about it more and try some experimenting. NB: I still think NN's should be effective of handling such info, I would imagine the various time series stacked as an image, with "black" points as missing data. $\endgroup$
    – runr
    Commented Nov 22, 2018 at 10:28
  • $\begingroup$ The problem though is that some have only one series, while the other have multiple, so it wouldn't exactly be "squared" as an image would. Plus, I have no experience with NN's, so that too.. :) Thanks again for your input, though! $\endgroup$
    – runr
    Commented Nov 22, 2018 at 10:33
  • $\begingroup$ There are statistical frameworks where either description and inference are done in two stages. First stage could handle the data available for all accounts and the second stage then deals with the longitudinal aspects. The third citation above is an example of this framework. $\endgroup$
    – 42-
    Commented Nov 22, 2018 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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