Giter Site home page Giter Site logo

aawaizali / internet-firewall-classification-model Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 437.6 MB

An AI model that uses 2 different classification models RandomForest and SupportVectorMachine to judge if an access request to a firewall should be 'allowed', 'denied', 'dropped' or 'reset-both'

Jupyter Notebook 100.00%
ai-model classification machine-learning python random-forest-classifier svm-classifier

internet-firewall-classification-model's Introduction

Data Analysis and Modeling Notebook

Introduction

This Jupyter Notebook provides a comprehensive analysis and modeling of network traffic data. The main objectives are to explore the data, handle preprocessing, and apply machine learning models to predict network actions.

Environment Setup

To replicate this analysis, ensure your Python environment is set up correctly. Create a requirements.txt file with the following content and install the packages using pip:

You can install all required packages with the command:

pip install -r requirements.txt

Libraries Used

  • pandas, numpy: For data manipulation and numerical calculations.
  • matplotlib, seaborn: For plotting and visualizations.
  • scipy: Used in statistical tests and transformations.
  • sklearn: For preprocessing data, model building, and evaluation.

Initial Data Handling

The data is loaded from a CSV file. Initial examination includes checking the structure, basic statistics, and null values of the dataset.

Exploratory Data Analysis (EDA)

Visual explorations are performed using histograms, count plots, and heatmaps to understand distributions and relationships in the data. Insights regarding port usage, action distributions, and correlations between features are drawn.

Data Cleaning

Data cleaning steps include handling outliers through methods such as winsorization, and encoding categorical variables. Numerical features are scaled using standard scaling techniques.

Model Training

Two machine learning models are trained:

  1. Random Forest: A robust model suitable for handling non-linear relationships and interactions.
  2. Support Vector Machine (SVM): Chosen for its effectiveness in high-dimensional spaces.

Model Evaluation

Models are evaluated using confusion matrices, and performance metrics like precision, recall, and F1-score are calculated. A comparison between the models' performance is also provided.

Conclusions

The notebook concludes with insights gathered from model performances and suggestions for future improvements in model accuracy and processing.

internet-firewall-classification-model's People

Contributors

aawaizali avatar

Watchers

 avatar

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.