Coder Social home page Coder Social logo

abhinav-bhardwaj / network-intrusion-detection-using-machine-learning Goto Github PK

View Code? Open in Web Editor NEW
105.0 3.0 44.0 16.84 MB

A Novel Statistical Analysis and Autoencoder Driven Intelligent Intrusion Detection Approach

Home Page: https://medium.com/geekculture/network-intrusion-detection-using-deep-learning-bcc91e9b999d?source=friends_link&sk=2b84dd61f3e76d63af0a14daf6f89f43

License: GNU General Public License v3.0

Jupyter Notebook 100.00%
machine-learning deep-learning nsl-kdd autoencoder svm-classifier mlp-classifier data-science pandas keras statistical-analysis

network-intrusion-detection-using-machine-learning's Introduction

Network-Intrusion-Detection-Using-Deep-Learning

Loosely based on research paper A Novel Statistical Analysis and Autoencoder Driven Intelligent Intrusion Detection Approach https://doi.org/10.1016/j.neucom.2019.11.016

Blog of this Project

Repository Structure

Network-Intrusion-Detection-Using-Machine-Learning

  • Datasets

    • bin_data.csv - CSV Dataset file for Binary Classification
    • multi_data.csv - CSV Dataset file for Multi-class Classification
    • KDDTrain+.txt - Original Dataset downloaded
  • Labels

    • le1_classes.npy - Numpy file for ndarray containing Binary Labels
    • le2_classes.npy - Numpy file for ndarray containing Multi-class Labels
  • Models

    • ae_binary.json - Trained Auto Encoder Model JSON File for Binary Classification
    • ae_multi.json - Trained Auto Encoder Model JSON File for Multi-class Classification
    • knn_binary.pkl - Trained K-Nearest-Neighbor Model Pickle File for Binary Classification
    • knn_multi.pkl - Trained K-Nearest-Neighbor Model Pickle File for Multi-class Classification
    • lda_binary.pkl - Trained Linear Discriminant Analysis Model Pickle File for Binary Classification
    • lda_multi.pkl - Trained Linear Discriminant Analysis Model Pickle File for Multi-class Classification
    • lst_binary.json - Trained Long Short-Term Memory Model JSON File for Binary Classification
    • lsvm_binary.pkl - Trained Linear Support Vector Machine Model Pickle File for Binary Classification
    • lsvm_multi.pkl - Trained Linear Support Vector Machine Model Pickle File for Multi-class Classification
    • mlp_binary.json - Trained Multi Layer Perceptron Model JSON File for Binary Classification
    • mlp_multi.json - Trained Multi Layer Perceptron Model JSON File for Multi-class Classification
    • qda_binary.pkl - Trained Quadratic Discriminant Analysis Model Pickle File for Binary Classification
    • qda_multi.pkl - Trained Quadratic Discriminant Analysis Model Pickle File for Multi-class Classification
    • qsvm_binary.pkl - Trained Quadratic SUpport Vector Machine Model Pickle File for Binary Classification
    • qsvm_multi.pkl - Trained Quadratic Support Vector Machine Model Pickle File for Multi-class Classification
  • Weights

    • ae_binary.h5 - Model weights of Auto Encoder Model for Binary Classification
    • ae_multi.h5 - Model weights of Auto Encoder Model for Multi-class Classification
    • lst_binary.h5 - Model weights of Long Short-Term Memory Model for Binary Classification
    • mlp_binary.h5 - Model weights of Multi Layer Perceptron Model for Binary Classification
    • mlp_multi.h5 - Model weights of Multi Layer Perceptron Model for Multi-class Classification
  • Plots

    • Pie_chart_binary.png - Pie chart of Binary Classification
    • Pie_chart_multi.png - Pie chart of Multi-class Classification
    • ae_binary.png - Auto Encoder Model Summary for Binary Classification
    • ae_binary_accuracy.png - Auto Encoder Accuracy Plot for Binary Classification
    • ae_binary_loss.png - Auto Encoder Loss Plot for Binary Classification
    • ae_multi.png - Auto Encoder Model Summary for Multi-class Classification
    • ae_multi_accuracy.png - Auto Encoder Accuracy Plot for Multi-class Classification
    • ae_multi_loss.png - Auto Encoder Loss Plot for Multi-class Classification
    • lstm_binary.png - Long Short-Term Memory Model Summary for Binary Classification
    • lstm_binary_accuracy.png - Long Short-Term Memory Accuracy Plot for Binary Classification
    • lstm_binary_loss.png - Long Short-Term Memory Loss Plot for Binary Classification
    • mlp_binary.png - Multi Layer Perceptron Model Summary for Binary Classification
    • mlp_binary_accuracy.png - Multi Layer Perceptron Accuracy Plot for Binary Classification
    • mlp_binary_loss.png - Multi Layer Perceptron Loss Plot for Binary Classification
    • mlp_multi.png - Multi Layer Perceptron Model Summary for Multi-class Classification
    • mlp_multi_accuracy.png - Multi Layer Perceptron Accuracy Plot for Multi-class Classification
    • mlp_multi_loss.png - Multi Layer Perceptron Loss Plot for Multi-class Classification
  • Classifiers_NSL-KDD.ipynb - Machine Learning Classifiers IPYNB file

  • Data_Preprocessing_NSL-KDD.ipynb - Data Preprocessing IPYNB File

  • Intrusion_Detection.ipynb - Combined IPYNB File

Dataset

The NSL-KDD dataset from the Canadian Institute for Cybersecurity (updated version of the original KDD Cup 1999 Data (KDD99) https://www.unb.ca/cic/datasets/nsl.html

Prerequisites

  • Keras
  • Sklearn
  • Pandas
  • Numpy
  • Matplotlib
  • Pickle

Running the Notebook

The notebook can be run on

  • Google Colaboratory
  • Jupyter Notebook

Instructions

  • To run the code, user must have the required Dataset on their system or programming environment.
  • Upload the notebook and dataset on Jupyter Notebook or Google Colaboratory.
  • Click on the file with .ipynb extension to open the notebook. To run complete code at once press Ctrl + F9
  • To run any specific segment of code, select that code cell and press Shift+Enter or Ctrl+Shift+Enter

Caution - The code should be executed in the given order for best results without encountering any errors.

Citation

network-intrusion-detection-using-machine-learning's People

Contributors

abhinav-bhardwaj avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

network-intrusion-detection-using-machine-learning's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.