Giter VIP home page Giter VIP logo

Comments (8)

kaykyr avatar kaykyr commented on May 27, 2024

Or may someone can recommend any content to study and understand it better? Thanks

from time-series-forecasting-tensorflowjs.

jinglescode avatar jinglescode commented on May 27, 2024

Hi, could you upload a more complete picture of the graph, with the legends and the axis. And also the parameters you have used.

from time-series-forecasting-tensorflowjs.

kaykyr avatar kaykyr commented on May 27, 2024

Hi, could you upload a more complete picture of the graph, with the legends and the axis. And also the parameters you have used.

Hello! In attach the JSON containing EURUSD (~6.000 5 minutes candles) data:
https://drive.google.com/file/d/1XXiUfSL9eBkPjUhAnu4mTkH1jdceieTz/view?usp=sharing

I am using the same algorithm with the following parameters:

Screen Shot 2021-04-09 at 00 40 09

Training Dataset Size: 98
Epochs: 25
Learning Rate: 0,01
Hidden LSTM Layers: 4
Simple Moving Average Period: 20

Screen Shot 2021-04-09 at 00 40 37

I also tried with different training dataset size, epochs and SMA periods... The result are always the same.

This is the training chart:
Screen Shot 2021-04-09 at 00 46 52

This is the validation chart:
Screen Shot 2021-04-09 at 00 47 23

And this is the predict chart:
Screen Shot 2021-04-09 at 00 47 51

This trained model download:
https://drive.google.com/file/d/1n7eMn-OTMK1ziSqI-2IOKOFR3jLrm_ZH/view?usp=sharing

from time-series-forecasting-tensorflowjs.

fgabrielbr avatar fgabrielbr commented on May 27, 2024

I am facing exactly the same problem

from time-series-forecasting-tensorflowjs.

clarklight avatar clarklight commented on May 27, 2024

I am seeing the same result as well, i forked a version and trained the code, i see the same result locally as well.
The only difference between your initial commit is this 2 lines.

let X = inputs.slice(0, Math.floor(trainingsize / 100 * inputs.length));
let Y = outputs.slice(0, Math.floor(trainingsize / 100 * outputs.length));

The current version doesnt have that, not sure if its anything to do with the issue. (I am still learning, so not sure if thats the issue).

Also on this link https://jinglescode.github.io/time-series-forecasting-tensorflowjs/
Followed all the settings you used on your readme, and i also got a flatline for validating the prediction.

from time-series-forecasting-tensorflowjs.

jinglescode avatar jinglescode commented on May 27, 2024

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.

Indeed, you can see that you are not the only one who faced this problem:

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

from time-series-forecasting-tensorflowjs.

jinglescode avatar jinglescode commented on May 27, 2024

@kaykyr, it's really strange you are getting a flat line on the training set too. I think have to debug (doing lots of console.log) and figure out what is the issue. At the minimum, you should get the model to overfit on the training set.

from time-series-forecasting-tensorflowjs.

kaykyr avatar kaykyr commented on May 27, 2024

@kaykyr, it's really strange you are getting a flat line on the training set too. I think have to debug (doing lots of console.log) and figure out what is the issue. At the minimum, you should get the model to overfit on the training set.

Hey, thank you!

It's very strange, but I built the same model with python with latest versions (Keras/Tensorflow) I got other result, but looks like it's predicting to the future the same thing of the past.

But, it's ok, now I know that this is a thing that needs too much effort to works great, I'll keep learning and improving my model.

from time-series-forecasting-tensorflowjs.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.