OdysseasKr / online-nilm

Code for the experiments in "Sliding Window Approach for Online Energy Disaggregation Using Artificial Neural Networks"
60 stars 16 forks source link

Sliding windows can make any algorithms become Online disaggregate? #7

Open Hessen525 opened 4 years ago

Hessen525 commented 4 years ago

Hi, @OdysseasKr Thanks for your nice paper and reply, it make me learn a lot! I have some question as following:

  1. What is the meaning of online(real-time)application? As long as we use past time steps for now, we can call online? (ex.(x1,x2,x3…… xt) ----> yt ?)
  2. If Q1 is correct. Do you think sliding windows make any algorithms become online because we can reshape the data. (ex. Y_batch = meterchunk[w-1+offset:w-1+offset+batch_size] X_batch = np.reshape(X_batch, (len(X_batch), w ,1))

Thanks again, any reply and advice will be much appreciated!

OdysseasKr commented 4 years ago
  1. The meaning of online(real-time) is that we do not require the whole time-series in order to create predictions. The model is trained on past data and remains as it is. When it is time to disaggregate new data, a buffer of size w (window size) is required. This is where we store the last w values in order to create a new prediction. In that sense, the models can be used online as they only use the real-time feed of data.

  2. Reshaping the data essentially re-creates that scenario of having an input of size w and an output of size 1. In a real-life case, we wouldn't wait for all of the data to arrive and then reshape them. Instead, the disaggregation takes place as new data samples are measured.

Hessen525 commented 4 years ago

Thanks so much for your help, @OdysseasKr Is that means we can make any approaches to online approaches by sliding window based on past data ? like BiLSTM is not online because it use both past and future data, by reshape and using sliding windows based on past data, it can be an online approach.?