jeffheaton / t81_558_deep_learning

T81-558: Keras - Applications of Deep Neural Networks @Washington University in St. Louis
https://sites.wustl.edu/jeffheaton/t81-558/
Other
5.72k stars 3.03k forks source link

Predict from Single Row of Dataset for Anomaly #50

Closed abhilashkrishnan closed 4 years ago

abhilashkrishnan commented 4 years ago

May I know how can we predict from a single row of dataset for anomaly?

For e.g. 0,tcp,private,S0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,20,1.00,1.00,0.00,0.00,0.16,0.07,0.00,255,20,0.08,0.06,0.00,0.00,1.00,1.00,0.00,0.00,neptune.

Please consider this request on priority.

jeffheaton commented 4 years ago

The way that the code that I have works is we run a sample of rows through the autoencoer/decoder (near the bottom of the notebook) and evaluate how high the RMSE is (how much the autoencoder distorted the entire sample). For a single row, I would suggest using a sample of one. And see how high the error is. Maybe try a few known attacks vs known normal just to see what the threshold should be. Not sure how effective that will be, I will probably investigate adding that the next time I update this module.