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.

Given a sequence of numbers t(0) thru t(n), predict t(n+1)

See original GitHub issue

Obviously

I’m trying to take a sequence of dates (represented as numbers) and predict the next date, which is unknown at the time of prediction.

I expected to do this:

net.train([
  [date0, date1, ... dateN]
]);
net.run([date0, date1, ... dateN]); // -> Something near dateN + 1

Sadly, that throws an exception (TypeError: Cannot read property 'runInput' of undefined at LSTMTimeStep.run...)

Of course, all the examples I see here look like this:

net.train([
  [1, 2, 3]
]);
net.run([1, 2]); // -> 3

I don’t understand why the last line isn’t net.run([1, 2, 3]); // -> Something close to 4. I assume I’m missing the point of the TimeStep networks, but they are documented as being able to predict future values…which doesn’t seem to be demonstrated by the examples IMO.

Actual question Is what I’m trying to do possible with this library?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gcoxcommented, Aug 28, 2018

Ah, I see. I definitely misinterpreted that 2nd argument. Postponing my lobotomy for now.

Thanks for the quick attention!

0reactions
robertleeplummerjrcommented, Aug 28, 2018

Ty for the interest! Wait till we get GPU architecture released!

Read more comments on GitHub >

github_iconTop Results From Across the Web

21-110: Finding a formula for a sequence of numbers
We can test more values of n , drawing more and more squares, counting the number of vertices, and comparing this with the...
Read more >
Use Machine Learning/Artificial Intelligence to predict next ...
Use Machine Learning/Artificial Intelligence to predict next number (n+1) in a given sequence of random increasing integers · Ask Question.
Read more >
The Simple Math Problem We Still Can't Solve
1. Show that there are infinitely many numbers whose Collatz orbits pass through 1. 2. The “stopping time” of a number n is...
Read more >
What is the best way to get prediction of n+1th element starting ...
If n is large enough relative to the number of possible unique symbols in your sequence, you can generate a Markov model on...
Read more >
Video: Arithmetic Sequences - Nagwa
If n is two, we're talking about the second number, and so on. And I'm gonna use this notation, t, and then in...
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