Comments (3)
Hi @feuerstarta,
Do check out Why isn't my Model Performing?.
Because the market dipped and recovered within a month or two, this has never happened in history. Since you are using 80/20, the model does not have the chance to learn that pattern.
Also, this is a very simple model, feel free to tweak the model, for better performance. Try building more features on the data as well, possibly adding "difference from previous day".
from time-series-forecasting-tensorflowjs.
See that still makes no sense to be a flat line. the flat line means it is not taking any of the input of the unseen_x into the account. If you do a full predict on the 0-100% of the 80/20 learn, it predicts value till the 80% mark then just flatlines from the last predicted number. If you keep that 100% prediction and do 90/10 split it will go to the 90% mark then flatlines at the 90% mark with the last predicted value. This is showing that the model works only for the section it trains and can not do a prediction period as the model only reports the last recorded train.
from time-series-forecasting-tensorflowjs.
This is the challenge of machine learning, that a model, out of the box, doesn't work for all kinds of data. There is a lot of parameter tuning involve. There may need to do more feature engineering. Or there is a need to change the model architecture.
Doing a quick search, you can see that you are not the only one who faced this problem:
- LSTM always predict same values for all inputs in the batch
- Outputs of LSTM Model all Very Similar or the Same
- Pytorch RNN always gives the same output for multivariate time series
I do not have an answer for you, unfortunately. Some suggestions would be:
- try tweaking the normalize the data portion (
.div(tf.scalar(10)
might be causing problems line 19 and 20) - include more data features, maybe can include volume as well
- include more data features, maybe trading indicators such as MACD, RSI, Bollinger bands
- build another model architecture
I'm working on a Python version.
from time-series-forecasting-tensorflowjs.
Related Issues (11)
- Ошибочный шаг HOT 1
- Sample Data format
- Feature - Save and Load model
- Predicting 51st day of stock's close price HOT 1
- Extending the forecast window HOT 1
- Data source, SMA calculation and Y outputs offsets HOT 7
- We are Integrating your "Experiment" into Superalgos HOT 2
- Strange results HOT 8
- Using Covid-19 dataset HOT 1
- Strange result - continue on last thread HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from time-series-forecasting-tensorflowjs.