Answers.Body: <p>Assuming your data is <strong>not</strong> purely random (otherwise it will be difficult to make useful predictions), you can try the following:</p>
  
  <ul>
  <li><a href="https://en.wikipedia.org/wiki/Markov_model" rel="nofollow noreferrer">Hidden Markov Models</a>: Treating your discrete numbers as states, you can use HMMs to predict the next state (next number) by looking at the last or the <span class="math-container">$n$</span> last states.</li>
  <li>Recurrent Neural Networks: Assuming you have a lot of number sequences, you can treat your numbers as time series. Train a model and predict the next number(s). <a href="https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/" rel="nofollow noreferrer">Here</a> is a nice tutorial which uses LSTM cells.</li>
  <li><a href="https://en.wikipedia.org/wiki/Autoregressive_model" rel="nofollow noreferrer">Autoregressive models</a>: AR models are quite powerful as well and have already been successfully used in finance and signal processing before the rise of deep learning.</li>
  </ul>
  
  <p>Further this post (<a href="https://stats.stackexchange.com/q/24521/264183">Problem in discrete valued time series forecasting</a>) on Cross Validated might answer your question as well.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-14T09:16:41.107Z
Answers.LastActivityDate: 2020-06-14T09:16:41.107Z
Answers.UserDisplayName: Tinu
Body: <p>I have a stream of data coming in like below (random numbers 0-9) </p>
  
  <blockquote>
    <p>7, 7, 0, 0, 8, 9, 2, 7, 3, 8, 2, 8, 5, 7, 0, 8, 7, 8, 5, 3, 2, 6, 1, 9, 5, 7, 5, 3, 4, 9, 1, 3, 5, 5, 0, 7, 7, 5, 2, 8, 8, 7, 5, 5, 5, 2, 9, 7, 2, 1, 0, 0, 5, 7, 1, 4, 2, 7, 8, 8, 5, 2, 7, 5, 7, 1, 7, 2, 0, 5, 7, 5, 2, 6, 3, 6, 3, 6, 1, 9, 1, 9, 7, 2, 3, 9, 8, 8, 4, 9, 8, 2, 5, 3, 4, 0, 3, 1, 0, 7, 2, 3, 8, 7, 5, 7, 3, 6, 0, 3, 3, 3, 6, 3, 1, 3, 0, 6, 9, 8, 0, 1, 4, 4, 9, 9, 3, 7, 4, 1, 0, 5, 0, 6, 8, 8, 8, 1, 7, 6</p>
  </blockquote>
  
  <p>Ask: is to Predict the next numbers(at least 3-10). </p>
  
  <p>Which approach would be helpful in getting through this problem? </p>
  
Tags: <prediction>
Title: Which machine learning approach can be used to predict a univariate value?
UserDisplayName: NKA
ThreadText: # Which machine learning approach can be used to predict a univariate value?
  
  (Asked by: username_0 on 2020-06-14)
  
  I have a stream of data coming in like below (random numbers 0-9)
  
  > 7, 7, 0, 0, 8, 9, 2, 7, 3, 8, 2, 8, 5, 7, 0, 8, 7, 8, 5, 3, 2, 6, 1, 9, 5, 7, 5, 3, 4, 9, 1, 3, 5, 5, 0, 7, 7, 5, 2, 8, 8, 7, 5, 5, 5, 2, 9, 7, 2, 1, 0, 0, 5, 7, 1, 4, 2, 7, 8, 8, 5, 2, 7, 5, 7, 1, 7, 2, 0, 5, 7, 5, 2, 6, 3, 6, 3, 6, 1, 9, 1, 9, 7, 2, 3, 9, 8, 8, 4, 9, 8, 2, 5, 3, 4, 0, 3, 1, 0, 7, 2, 3, 8, 7, 5, 7, 3, 6, 0, 3, 3, 3, 6, 3, 1, 3, 0, 6, 9, 8, 0, 1, 4, 4, 9, 9, 3, 7, 4, 1, 0, 5, 0, 6, 8, 8, 8, 1, 7, 6
  
  Ask: is to Predict the next numbers(at least 3-10).
  
  Which approach would be helpful in getting through this problem?
  
  **Tags:** prediction
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-06-14. Score: 2
  
  Assuming your data is **not** purely random (otherwise it will be difficult to make useful predictions), you can try the following:
  
  * [Hidden Markov Models](https://en.wikipedia.org/wiki/Markov_model): Treating your discrete numbers as states, you can use HMMs to predict the next state (next number) by looking at the last or the $n$ last states.
  * Recurrent Neural Networks: Assuming you have a lot of number sequences, you can treat your numbers as time series. Train a model and predict the next number(s). [Here](https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/) is a nice tutorial which uses LSTM cells.
  * [Autoregressive models](https://en.wikipedia.org/wiki/Autoregressive_model): AR models are quite powerful as well and have already been successfully used in finance and signal processing before the rise of deep learning.
  
  Further this post ([Problem in discrete valued time series forecasting](https://stats.stackexchange.com/q/24521/264183)) on Cross Validated might answer your question as well.
  
  
  ---
  
  