<jupyter_start><jupyter_text>Time Series Anomaly Detecion: Detection of Anomalous Drops with Limited Features and Sparse Examples in Noisy Highly Periodic DataPaper is [here](https://static.googleusercontent.com/media/research.google.com/ru//pubs/archive/dfd834facc9460163438b94d53b36f51bb5ea952.pdf), additional information is [here](https://nau-datascience.github.io/Time-Series-Anomaly-Detection).  Anomaly detection in network traffic. Only two attributes - time stamp and bytes per second sampled at 5 minute interval. In total - 14 different data streams. Each data stream gets its own model.  Three models are considered - DNN, RNN and LSTM. Not clear how many input features they used, I will use 50 because this is what is used in examples on the page with additional info.  **Models**  1. DNN model - DNN Regressor - fully-connected model. In total, 10 layers of 200 neurons each, batch size 200, trained for 1200 steps, single linear output layer2. RNN model - 10 layer RNN with 75 units in hidden size, batch size 200 at 2500 steps.3. LSTM - 10 layer model with 70 neurons, single lienar output layer.Authors report that RNN/LSTM did not perform much better compared to DNN. Summary*:1. DNN regressor: 3.702000e-04 gFLOPs (forward)2. RNN mode: 5.347575e-03 gFLOPs (forward)3. LSTM model: 1.863407e-02 gFLOPs (forward)*FLOPs - Approximate number of multiply-add operations to perform a task.<jupyter_code>from nns.nns import (estimate, printable_dataframe)
from nns.models.net_traffic_anomaly_detection import (DNNModel, RNNModel, LSTMModel)
inference = []
training = []<jupyter_output><empty_output><jupyter_text>DNN Regressor<jupyter_code>estimate(DNNModel(), inference, training)<jupyter_output><empty_output><jupyter_text>RNN model<jupyter_code>estimate(RNNModel(), inference, training)<jupyter_output><empty_output><jupyter_text>LSTM model<jupyter_code>estimate(LSTMModel(), inference, training)<jupyter_output><empty_output><jupyter_text>Summary: inference<jupyter_code>printable_dataframe(inference)<jupyter_output><empty_output><jupyter_text>Summary: training<jupyter_code>printable_dataframe(training)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08554160855416086, 'fraction_numerical': 0.04184100418410042, 'mean_word_length': 6.631205673758865, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '250856', 'license': 'Apache-2.0', 'n_tokens_mistral': 755, 'n_tokens_neox': 670, 'n_words': 206, 'path': 'notebooks/net_traffic_anom_detect_google.ipynb', 'repo_name': 'sergey-serebryakov/nns', 'size': '2151'}