question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Feature: Time Step Prediction

See original GitHub issue

A GIF or MEME to give some spice of the internet

What is the feature?

Prediction of trends. Stock market, weather predictions, trends, etc. This would be very similar to the existing recurrent net that will be deprecated, but will serve as a baseline for 2.0 GPU push. This will be included in v1 somewhere, as it is a simplification of the existing recurrent network.

How important is this (1-5)?

5

Usage:

import brain from 'brain.js';

const net = brain.recurrent.RNNTimeStep(options);
// or
const net = brain.recurrent.LSTMTimeStep(options);
// or
const net = brain.recurrent.GRUTimeStep(options);

net.train([
  [1,2,3,4,5],
  [5,4,3,2,1],
]);

net.run([1,2,3,4]) -> 5
net.run([5,4,3,2]) -> 1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:13
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
robertleeplummerjrcommented, Apr 14, 2018

It should be noted that this network type does not work by represented data. This type of neural network will work directly with the data you send in.

1reaction
robertleeplummerjrcommented, Apr 14, 2018

The more context the net has, the better and I’m not sure that the net would know how to distinguish one from the other. I think it’d be best to train those nets separately. The up-side to that would be each net would be smart enough to tracks its progress, but it would not do well at adjusting based off context of other financials. Example: gold goes up, dollar goes down.

If some sort of non-generalized approach was needed I suppose a custom solution could be built.

The LSTM version (which would be my recommendation to use) uses simple math to achieve its equation: https://github.com/BrainJS/brain.js/blob/develop/src/recurrent/lstm.js#L48 so by modifying that, we may be able to achieve the context you are wishing for.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Timesteps in LSTM Networks for Time Series ...
The specified number of time steps defines the number of input variables (X) used to predict the next time step (y). As such,...
Read more >
Towards Time-Series Feature Engineering in Automated ...
A typical approach is to apply one model to predict the value for the next time step. Then the model uses this predicted...
Read more >
Introduction to feature engineering for time series forecasting
In this article, I walk you through the most important steps to prepare your time series data for forecasting models. In working with...
Read more >
Single-Step Time Series Forecasting - The Click Reader
Learn how to build a single-step time-series forecasting model using TensorFlow 2.0 where we will be predicting climate data one step into the...
Read more >
Rolling Multi-step Time Series Forecasting - relataly.com
Multi-step time series forecasting is about modeling the distribution of future values of a signal over a prediction horizon. This article will ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found