3
$\begingroup$

On a daily basis there is a sequence of events.

Each event may or may not occur on a given day.

Given the times of the preceding events for the current day I want to be able to say whether there is a high likelihood of an event occurring right now.

There are around 20 events that may occur in a day. I have captured only a small number of days worth of observations (say 20-40) to start but will be building up as time goes by.

What kind of model should I use to predict this?

Here is picture of the data to help clarify:

sample data

UPDATE/CLARIFICATION

As each day time passes during the day I always want to know if each event is likely to happen at that moment of time. By the nature of the data it is possible that on a given day only a single event happens, but when it does it will be likely to happen at around the same time it has happened in the past.

$\endgroup$
  • $\begingroup$ I think there are lots more features you can extract from your data here, which may help with your predictive performance. For example, total number of events so far that day. As for the prediction itself, you probably want a multiclass classifier, which would try to predict which of the event classes are likely to occur given the events that have occurred so far and any other predictors. The interesting part will be that you have a different list of classifiers you want to predict each day, because each day different events will/won't have occurred. $\endgroup$ – Dan Carter Jul 6 '17 at 10:36
  • $\begingroup$ @DanCarter Hi and thanks for the response. Could you expound on what you mean by having a different list of classifiers each day? As each day time passes during the day I always want to know if each event is likely to happen at that moment of time. By the nature of the data it is possible that on a given day only a single event happens, but when it does it will be likely to happen at around the same time it has happened in the past. $\endgroup$ – CoderBrien Jul 6 '17 at 14:34
  • $\begingroup$ My point was that you don't want to predict events that have already occurred, right? So when an event occurs, that event should no longer be considered for prediction for that day. Another thing to consider, is that if the time of the events is roughly random, but one event usually signals another, then it may be possible to predict the 2nd, 3rd etc event, but not the first. Based on your question it looks like you want real-time updates. I don't think that's possible, but you could update your predictions when a new event occurs. $\endgroup$ – Dan Carter Jul 6 '17 at 17:00
  • $\begingroup$ @DanCarter my code will be aware of the day's state so once an event occurs the code will just treat the probability=0 for the rest of the day. The time of the events is not really random. What is going on behind the scenes is approximately a batch process that runs sequentially and i'm trying to predict the completion time for each step (with the caveat of missing data points). There is some variance as to when the batch starts and the processing time for each step. Hope that helps. I'm still unclear as to what type of model to use. Thanks!!! $\endgroup$ – CoderBrien Jul 6 '17 at 20:29
  • $\begingroup$ I see, that does help. There's a few approaches you could take, but regardless of the approach I'd still suggest engineering more features from your data, for example if you know the start time of the batch process, you could add the time taken between start and event 1, then if event 6 occurs you would have the time between event 1 and event 6. I'd recommend looking into multi-label classifiers. en.wikipedia.org/wiki/Multi-label_classification scikit-learn.org/stable/modules/multiclass.html $\endgroup$ – Dan Carter Jul 6 '17 at 21:57

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.