Input and Output Data Construction
The City Of Knowledge
In the last session, we discussed how to compute the training set size based on the batch size. Now, we're going to construct our input and output data for the LSTM. But first, we're going to do some pre-processing. First of all, we are increasing the upper boundary of our training set size. We are adding here timesteps multiplied by two. Why it's required, we're going to see in the next steps. So, now we just execute the cell. And we see our training set data goes up to 6,996, so we have increased by 20. The next step is very important for every neural network. We do feature scaling. So, this means we scale down every value which should be in the range between zero and one. To do this, we import a MinMaxScaler from sklearn processing package. We initialize this class MinMaxScaler and give the range from zero to one. And then we call the fit transform method from sklearn. This method takes our training set. And here we also cast to float 64 because otherwise, it will show warnings. So we do this. And now our data is scaled. The initial lectures series on this topic can find in the below links: Introduction to Anomaly Detection https://www.youtube.com/watch?v=IFHX4HUAo1w&list=PLpW3QouFxOnM6YWVOrcUBaQiy8EWi05pi&index=37
How to implement an anomaly detector (1/2) https://www.youtube.com/watch?v=DN0H2Qz3Rxg How to implement an anomaly detector (2/2) https://www.youtube.com/watch?v=nYZuQg5K22Y How to deploy a real-time anomaly detector https://www.youtube.com/watch?v=LnPrT-IkzNw Introduction to Time Series Forecasting https://www.youtube.com/watch?v=G7_uNCOFEzE Stateful vs. Stateless LSTMs https://www.youtube.com/watch?v=R7CwkhZYJdU Batch Size! which batch size is to choose? https://www.youtube.com/watch?v=wfyErdPsZPI Number of Time Steps, Epochs, Training and Validation https://www.youtube.com/watch?v=tsprdX9RkRg Batch size and Trainin Set Size https://www.youtube.com/watch?v=5kLLKhNJlEYThe initial lectures series on this topic can find in the below links: Introduction to Anomaly Detection https://www.youtube.com/watch?v=IFHX4HUAo1w&list=PLpW3QouFxOnM6YWVOrcUBaQiy8EWi05pi&index=37
How to implement an anomaly detector (1/2) https://www.youtube.com/watch?v=DN0H2Qz3Rxg How to implement an anomaly detector (2/2) https://www.youtube.com/watch?v=nYZuQg5K22Y How to deploy a real-time anomaly detector https://www.youtube.com/watch?v=LnPrT-IkzNw Introduction to Time Series Forecasting https://www.youtube.com/watch?v=G7_uNCOFEzE Stateful vs. Stateless LSTMs https://www.youtube.com/watch?v=R7CwkhZYJdU Batch Size! which batch size is to choose? https://www.youtube.com/watch?v=wfyErdPsZPI Number of Time Steps, Epochs, Training and Validation https://www.youtube.com/watch?v=tsprdX9RkRg Batch size and Trainin Set Size https://www.youtube.com/watch?v=5kLLKhNJlEY ... https://www.youtube.com/watch?v=zCHrQRlu688
21328645 Bytes