huseinzol05 / Stock-Prediction-Models

Gathers machine learning and deep learning models for Stock forecasting including trading bots and simulations
Apache License 2.0
7.96k stars 2.81k forks source link

Can't choose prediction AI #78

Open yeah-me opened 4 years ago

yeah-me commented 4 years ago

Hello, i am trying to build an AI model, or use any type of AI to predict not random numbers.

So i have the algorithm that generates what is seemed to be random numbers from 100 (the lowest and the worst) to 1000 is the best (the closer you can predict the number the better). I know how this algorithm works, but i wanted to know if it's possible to use an AI to learn patterns of this algorithm and predict the next outcome based on all previous ones.

My currant data is just a 1 column with 500 rows of these numbers in CSV. Like the simple table: Number 343 784 100 185 167 164 912 102 194 250 340 197 176 108 124 ... and so on

Can you please help me with choosing the right model, lib and approach to it. Tried TensorFlow, but it seemed to me was predicting mean of this values Tried to use Support Vector Machine, but couldn't make it work, it wasn't guessing accurately. Thanks in advance.

If you want to build this project together (for educational purposes), would be glad to do so. (i am new to all of this)

IISuperluminaLII commented 4 years ago

well you probably have to normalize your data so that you dont have gradient explosions on certain near "out of bounds" data. And any basic vanilla recurrent NN will work (stacked LSTM) or even for your case (single LSTM). BUT make sure you are normalizing your data first before feeding it into the neural network. And this also goes that you will have "un normalize" your data for each prediction your nn makes.

IISuperluminaLII commented 4 years ago

If this is a univariate time-series forecasting, then the order in which you feed your data into the NN will matter. So what I would also suggest is to stagger your inputs such it the series are represented as such {[a_0.....a_n], [a_1....a_n+1], ....., [a_n......a_n+1]} for-all a elm of your dataset and rage from 0->n. Look into "Tensorflow univariate timeseries prediction" example on goog, should give you a good stride on how to approach your problem.