OdysseasKr / neural-disaggregator

Code for NILM experiments using Neural Networks. Uses Keras/Tensorflow and the NILMTK.
MIT License
138 stars 57 forks source link

Question: Basic Parameters #28

Closed anujsinha28 closed 4 years ago

anujsinha28 commented 4 years ago

Hello,

I am confused with Batch Size and Window Size. Can you please explain with an example along with how do choose these numbers?

OdysseasKr commented 4 years ago

Hi @anujsinha28

The batch size refers to the training of the neural network. Essentially, it means how many training samples are fed to the network each time. Read more about the batch size here: https://stats.stackexchange.com/questions/153531/what-is-batch-size-in-neural-network

The window size refers to the size of the part of the timeseries the network looks at, in order to make a single prediction. In other words, to predict the consumption of an appliance at the n-th timestep, it uses the [(n-w): n] samples of the mains timeseries (w is the window size). Therefore the input is of size w and the output of size 1.

The window size depends on the appliance characteristics. Devices with longer operation cycles (e.g washing machine) tend to require bigger window sizes than simpler appliances (e.g. light bulb).