1
$\begingroup$

I have a set of timeseries binary (boolean) data, with intervals of 1 day. Each day can either be 1 or 0 (true/false). What is the best way to forecast the next day/week's data based on the data I already have?

$\endgroup$
  • $\begingroup$ Do you just have the historic 1s and 0s? Or is there other information available? $\endgroup$ – Jan van der Vegt Apr 11 '16 at 7:26
  • $\begingroup$ I have the historic 1s and 0s yes. $\endgroup$ – mkelley82 Apr 11 '16 at 18:09
  • $\begingroup$ I also have their associated dates. $\endgroup$ – mkelley82 Apr 11 '16 at 19:35
  • $\begingroup$ @Jan van der Vegt Any insight? $\endgroup$ – mkelley82 Apr 12 '16 at 2:53
  • $\begingroup$ Are these things more/less likely to happen on weekend days? Or when the weather is hot? Are they getting more frequent or rarer? Do they happen in clusters or independent? These are all questions you need to ask of the data and of experts who know about the data before you can think about formulating a predictive model. $\endgroup$ – Spacedman Apr 12 '16 at 7:21
0
$\begingroup$
  1. Do some feature engineering. As they told you in the comments, try to see if the event is more likely to happen during weekends or weekdays, during certain months, during a certain season or quarter, etc. To read some more on this topic.

    https://machinelearningmastery.com/discover-feature-engineering-how-to-engineer-features-and-how-to-get-good-at-it/

  2. Explore different machine learning models. I suggest to start with a Random Forest.

  3. Check your model accuracy (confusion matrix).

  4. Iterate. Try other features, other models...

Just to get you up and running, you can take a look at the Titanic dataset in Kaggle. It will help you understand a bit more of the problem you are trying to solve.

$\endgroup$
0
$\begingroup$

I would seriously consider using the bsts package (in R), with 'logistic' as the model family. That will give you a forecast of the probability of 1's and 0's, based on past trends or periodicities (depending on how you construct the model). You can also add covariates, i.e. other things that change in a way related to your 1/0 observations, to act as predictors.

See Figures 9 and 10 on this page:

http://www.unofficialgoogledatascience.com/2017/07/fitting-bayesian-structural-time-series.html

$\endgroup$
0
$\begingroup$

I suggest that you use categorical HMM (Hidden Markov Model) or LSTM (Long Short Term Memory) networks to predict the next values of time series.

$\endgroup$

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