Skip to content

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

@gcox

Description

@gcox

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions