zhiyongc / gru-d Goto Github PK
View Code? Open in Web Editor NEWGated Recurrent Unit with a Decay mechanism for Multivariate Time Series with Missing Values
Gated Recurrent Unit with a Decay mechanism for Multivariate Time Series with Missing Values
Hi,
GRUD.py initializes the gamma_h_l
by setting out_features = delta_size
(line 108). It's ok in this code since the hidden_size is equal to input_size. However, should it be better to set out_features = hidden_size
for other cases? In other words, I think it's better to use:
self.gamma_h_l = nn.Linear(self.delta_size, self.hidden_size)
Hello,
first of all, thanks for this repository.
in the main function, what is the reason for assigning grid input size as:
input_dim = fea_size
hidden_dim = fea_size
output_dim = fea_size
shouldn't it be like this??
input_dim = fea_size
hidden_dim = seq_len
output_dim = pred_len
Hi, thanks for your contributions. Could you tell where the data comes from? (speed_matrix_2015 and inrix_seattle_speed_matrix_2012)
Line 281 of main.py is
loss_L1 = torch.nn.MSELoss()
but I think it should be
loss_L1 = torch.nn.L1Loss()
I think one update function is wrong.. on line 123 in GRUD.py your update equation is:
h_tilde = F.tanh(self.hl(combined))
h = (1 - z) * h + z * h_tilde
according to the paper, they should be
new_combined = torch.cat((x, torch.mul(r, h), m), dim=2)
h_tilde = F.tanh(self.hl(new_combined))
h = (1 - z)*h + z*h_tilde
When computing h_tilde in the GRU cell, you have to first multiply the hidden state with the reset gate.
Based on my understanding of the paper, the computing of time interval at time step t is based on the mask value of the previous time step t-1 [eq(2) in the paper].
It is looks like you compute time interval at time step t based on mask value at time step t
for idx in range(missing_index[0].shape[0]):
i = missing_index[0][idx] # for 1st dim
j = missing_index[1][idx] # for 2nd dim
k = missing_index[2][idx] # for 3rd dim
if j != 0:
Delta[i,j,k] = Delta[i,j,k] + Delta[i,j-1,k]
But, I think it suppose to be as follows:
for idx in range(missing_index[0].shape[0]):
i = missing_index[0][idx] # for 1st dim
j = missing_index[1][idx] # for 2nd dim
k = missing_index[2][idx] # for 3rd dim
if j != 0 and j!=9 :
Delta[i,j+1,k] = Delta[i,j+1,k] + Delta[i,j,k]
Just pointing out that hidden is appended to the left of the outputs variable, which reverses the order (on the time dimension) of the hidden states of the GRU.
Line 120 in 9f877f8
Hi,
My understanding of Equation 11 in the GRU-D paper is that the two x values on the right side of this equation are supposed to be different values. I believe mask * x to be correct, as that is multiplying x of the current time step. However, I believe delta_x * x is incorrect, as this x should be the value of x most recently observed prior to the current time step t.
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.