Icon

Intrusion Detection System - Build Classifier Model

<p><strong>Intrusion Detection Systems (IDS) </strong>play a crucial role in network security by monitoring network traffic for suspicious activity and potential threats. With the increasing frequency and sophistication of cyber-attacks, an IDS can help organizations identify unauthorized access attempts, malware, and other security breaches in real-time. The ability to detect and respond to intrusions quickly is vital for preventing data breaches and minimizing damage.</p><p></p><p>With the rise of network attacks, detecting intrusions early is crucial for preventing data breaches and minimizing damage. <strong>Traditional signature-based intrusion detection is no longer sufficient,</strong> as new attack methods evolve constantly. The challenge is to develop an Intrusion Detection System (IDS) that can identify abnormal network activity through <strong>machine learning techniques</strong>, which are capable of recognizing unknown threats</p><p></p><p>The objective of this lab activity is to apply machine learning techniques (Logistic Regression, K Nearest Neighbor (KNN), Naïve Bayes, Decision Tree, and Random Forest) to the <strong>NSL-KDD dataset</strong> to build an IDS that can classify network traffic as either <strong>normal</strong> or <strong>malicious (attack)</strong>. Then evaluate and <strong>compare </strong>model performance in terms of accuracy and efficiency.</p>
Data Preprocessing
Data Visualization
Data Import and Preparation
Build The Models
  1. train model

  2. test model

  3. score the model (evaluation)

Compare The Model Result
  • Confusion matrix

  • model's score (accuracy statistic)

Intrusion Detection System (IDS) - Build Classifier Model

Classifier model to compare:

  • Logistic Regression

  • K Nearest Neighbor (KNN)

  • Naive Bayes

  • Decision Tree

  • Random Forest

read NSL-KDD dataset (see external resource provided to get the dataset)
File Reader
Column Renamer
Logistic Regression
dimension reduction for numeric column into 2 dimension only
PCA
Confusion Matrix Comparation
normalize numeric column data using min-max scaler
Normalizer
Pie chart compostion of 'outcome'
compare accuracy statistic between the models
concatenate models score
Random Forest
select colum "PCA level 0", "PCA level 1" and "new_outcome" only for modelling
Column Filter
Pie chart compostion of 'Protocol_type''
Table View
K Nearest Neighbor (KNN)
train set = 80%,test set=20%
Partitioning
Naive Bayes
Decision Tree
Create a new column'new_outcome' basedon the condition forthe 'outcome' column
Expression

Nodes

Extensions

Links