dannyneil / public_plstm Goto Github PK
View Code? Open in Web Editor NEWPhased LSTM
License: Apache License 2.0
Phased LSTM
License: Apache License 2.0
Hey Danny,
I could send you a mail directly but I guess it's better to keep track here so that other people can have a look.
In the Phased LSTM paper, you discussed mostly about classification problems.
Do you have any ideas how Phased LSTM could be used for a regression problem with asynchronous data?
Let's say, I have a sensor that sends data asynchronously. I would like to be able to predict the next data point. But its value depends on the time of arrival. It's not the same if it comes 1 second after or 10 minutes after.
When it's synchronous data, it's quite easy because you can assume that data points are spanned every minute. In this case, it would just be forecasting at t+1. But when it comes to asynchronous data, I guess it's more tricky as the next point could come 15 seconds or 25 seconds later. So if we give the next data point to predict, the model will not have the information of when this data point actually arrived.
Toy example is:
data_point_1 {value = 0.02, timestamp = 0010}
data_point_2 {value = 0.04, timestamp = 0023}
data_point_3 {value = 0.01, timestamp = 0035}
data_point_4 {value = -0.02, timestamp = 0060}
data_point_5 {value = 0.04, timestamp = 0076}
data_point_6 {value = 0.09, timestamp = 0078}
data_point_7 {value = 0.03, timestamp = 0090}
data_point_8 {value = 0.01, timestamp = 00101}
data_point_9 {value = 0.02, timestamp = 00102}
Let's predict:
data_point_10 {value = 0.05, timestamp = 00106}
We can give data_point_1 up to data_point_9 to the network, along with their timestamps, as inputs. The network can figure out the frequencies and phases of the signals (strength of Phased LSTM!).
But how do we give the target? If we just give data_point_10.value, 0.05, it does not mean much since the timestamp is omitted. I guess we want to give the timestamp too.
For inference we would just query the model with {data_point_1 to data_point_9} and data_point_10.query_timestamp = 00106 (or possibly data_point_9.timestamp + forecasting_time_ahead in the general case), and hope to match data_point_10.value.
Am I correct? How could I improve my thinking?
Thanks!
Hey Daniel,
I wrote to your email address, but you stopped responding to me after my question about derivatives
Several months later I understand such a question might have been impolite, so I might have ended up banned.
I am sorry for that, I was just 23 :)
A few months ago I've successfully implemented Phased LSTM, and it works great with no bugs
Thanks once again for inventing it, and again sorry if I appeared tactless
I just try to run two .ipynb files, but just got the error, ImportError: cannot import name nonlinearities
, what is wrong with that? How can I fix this and run it successfully?
I am trying to understand the intuition behind your paper and I might be wrong since I am not so much experienced in the area. Am I wrong to conclude that I can DIRECTLY use PLSTM for a prediction task on unevenly spaced time-series data where the event doesn't happen at regular intervals of time but happens at irregular time steps.
If yes, as shown in your example of N-MNIST, I can use these irregular time steps to be fed to this PLSTM right?
Hey Danny,
Was trying to run your script a_freq_task.sh
and hit the following error and found out that downsample
is no longer supported by Theano which is still called by the latest Lasagne verion 0.1
. However, you can solve the problem by installing the following package. Just FYI.
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
Reference
aigamedev/scikit-neuralnetwork#235 (comment)
Error
(plstm) nicole@polarsnow:~/git/public_plstm(master)$ a_freq_task.sh
Traceback (most recent call last):
File "freq_task.py", line 3, in <module>
import lasagne
File "/home/nicole/anaconda3/envs/plstm/lib/python2.7/site-packages/lasagne/__init__.py", line 19, in <module>
from . import layers
File "/home/nicole/anaconda3/envs/plstm/lib/python2.7/site-packages/lasagne/layers/__init__.py", line 7, in <module>
from .pool import *
File "/home/nicole/anaconda3/envs/plstm/lib/python2.7/site-packages/lasagne/layers/pool.py", line 6, in <module>
from theano.tensor.signal import downsample
ImportError: cannot import name downsample
As the title says, the link to the official TF implementation in README.md is broken
Thanks for sharing your work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.