0% found this document useful (0 votes)
31 views

Deep Learning Manual,paper and other (1)

This document is a lab report submitted by students A. Krishna Sowjanya, M. Anantha Lakshmi, and M. Sai Harshitha for the Bachelor of Technology in Artificial Intelligence and Machine Learning at Bonam Venkata Chalamayya Engineering College. It includes a certificate of authenticity, acknowledgments, institutional vision and mission, program outcomes, educational objectives, and specific outcomes related to deep learning with TensorFlow. The report outlines various experiments designed to implement neural networks for tasks such as handwritten digit classification, movie review classification, and news wire classification.

Uploaded by

dhwathvikm1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Deep Learning Manual,paper and other (1)

This document is a lab report submitted by students A. Krishna Sowjanya, M. Anantha Lakshmi, and M. Sai Harshitha for the Bachelor of Technology in Artificial Intelligence and Machine Learning at Bonam Venkata Chalamayya Engineering College. It includes a certificate of authenticity, acknowledgments, institutional vision and mission, program outcomes, educational objectives, and specific outcomes related to deep learning with TensorFlow. The report outlines various experiments designed to implement neural networks for tasks such as handwritten digit classification, movie review classification, and news wire classification.

Uploaded by

dhwathvikm1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

A Lab Report Submitted in partial fulfilment of the requirements for the award of the degree

Bachelor of Technology
In
Artificial Intelligence and Machine Learning

Submitted by

A. Krishna Sowjanya (23225A6106)


M. Anantha Lakshmi (22221A6138)
M. Sai Harshitha (22221A6133)

Under the esteemed guidance of

Mrs. B. Ganga Bhavani M. Tech, (Ph.D)


Associate Professor

BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE


(Autonomous)
(Approved by AICTE, permanently affiliated to JNTUK, Kakinada) (ISO 9001:2015 Certified
Institute Accredited by NBA and NAAC with A‘Grade)
Odalarevu – 533210

A.Y 2024 - 25
BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE
(Autonomous)
(Approved by AICTE, permanently affiliated to JNTUK, Kakinada) (ISO 9001:2015 Certified Institute
Accreditedby NBA and NAAC with A‘Grade)

Odalarevu – 533210

Department of Artificial Intelligence and Machine Learning

CERTIFICATE
This is to certify that manual entitled, “DEEP LEARNING WITH TENSORFLOW
LAB MANUAL” is a Bonafide work of A. Krishna Sowjanya, M. Anantha
Lakshmi, M. Sai Harshitha of III B. Tech in Artificial Intelligence and Machine
Learning, Bonam Venkata Chalamayya Engineering College, Odalarevu, permanently
affiliated to Jawaharlal Nehru Technological University Kakinada, during the
academic year 2024-2025 in partial fulfilment of the requirements for the Award of the
Bachelor of Technology in Artificial Intelligence and Machine Learning.

LAB INCHARGE HEAD OF THE DEPARTMENT

Mrs. B. Ganga Bhavani Dr. A. Rama Krishna


MTech,(Ph.D) MTech, Ph.D
Associate Professor Professor
ACKNOWLEDGEMENT

We express our sincere gratitude to our esteemed institute Bonam Venkata


Chalamayya Engineering College, which has provided us an opportunity to fulfil the
most cherished Desire to reach our goal.

We owe own project to Mrs. B. Ganga Bhavani, Associate Professor,


Department of Computer Science and Engineering, who has been our guide. We
sincerely thank her for the support and guidance which was given to us, as without
which we would not have made this effort of our success.

We express our deep hearted thanks to Dr. A. Rama Krishna, our beloved Head
of the Department for being helpful in providing us with his valuable advice and
timely guidance.

We would like to thank the principal, Sri Dr. Maheswar Dutta and management of
Bonam Venkata Chalamayya Engineering College, for providing us with the
requisite facilities to carry out.

Our deep hearted thanks to all the faculty members of our department for their
value-based impairing of theory and partial subjects, which we had put into use in our
deep learning lab. We are also indebted to the non-teaching staff for their co-
operation.

A. Krishna Sowjanya

M. Anantha Lakshmi

M. Sai Harshitha
BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE
(AUTONOMOUS)
APPROVED BY AICTE, NEW DELHI, AFFILIATED TO JNTUK KAKINADA
ODALAREVU, ALLAVARAL MANDAL, DR.B. R AMBEDKAR KONASEEMA DISTRICT, ANDHRA PRADESH – 533210.

III BTech II Sem BR20


DEEP LEARNING WITH TENSORFLOW LAB
Laboratory Manual
Prepared By

A. Krishna Sowjanya – 23225A6106


M. Anantha Lakshmi – 22221A6138
M. Sai Harshitha – 22221A6133

Guide: Mrs. B. Ganga Bhavani

DEPARTMENT OF AIML
INSTITUTION VISION MISSION

OUR VISION

“To become a leading technical institute of academic excellence by imparting high patterns of
discipline through innovative programs of global standards making our students technologically
superior and ethically strong to serve the Nation.”

OUR MISSION

“To create an environment that shall foster the growth of intellectually capable, innovative
professionals who can contribute to the growth of Technology in partnership with Industry and develop
and harness it for the welfare of the Nation and Mankind.”

DEPARTMENT VISION MISSION

OUR VISION

To make the students technically and communicationally strong to produce globally competent
graduates with innovative idea and ethics to build a vibrant nation.

OUR MISSION

To provide good infrastructure, technology know how in collaboration with software industry, student
internship, training by corporate experts, undertaking real time projects, also exposing the students to
workshops and motivational programs.

Program Outcomes (POs)

Engineering Graduates will be able to:


1. Engineering Knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering problems.
2. Problem Analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics, natural
sciences, and engineering sciences.
3. Design/Development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate consideration
for the public health and safety, and the cultural, societal, and environmental considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of the
information to provide valid conclusions.
5. Modern Tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities with an
understanding of the limitations.
6. The Engineer and Society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
7. Environment and Sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need for
sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and Team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
effective reports and design documentation, make effective presentations, and give and receive clear
instructions.
11. Project Management and Finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and leader
in a team, to manage projects and in multidisciplinary environments.
12. Life-long Learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.

Program Educational Objectives (PEOs):


PEO:1 BVC Graduates shall have strong foundation in basic sciences, mathematics, engineering
fundamental and in computer science engineering subjects in addition to proficiency to
computer programming and use of modern tools and technologies.

PEO:2
BVC Graduates will be successfully engaged in careers in software and hardware and allied
fields as eminent engineers and managers.

PEO:3 BVC Graduates will be prepared for continued professional development through
postgraduate studies in engineering and allied fields and through life-long learning.

PEO:4 BVC Graduates will have demonstrated practices and skills in professional attitude,
teamwork, leadership, values, ethics and communication.

Program Specific Outcomes (PSOs)

Solutions to the real-world problem: Associate learning of Data Science, Big Data, IOT to
PSO1:
arrive solution to real world problem
Use of open-source modern design tools: improve capability to comprehend the
PSO2: technological advancements in the usage of open-source modern design tools to analysis,
design subsystem process for variety applications
Code: 20AD6L04 L T P C
III YEAR II SEM
0 0 3 1.5
DEEP LEARNING WITH TENSORFLOW LAB
Course Outcomes:

On completion of this course, the student will be able to

• Implement deep neural networks to solve real world problems

• Choose appropriate pre-trained model to solve real time problem

• Interpret the results of two different deep learning models


List of Experiments:

1. Implement multilayer perceptron algorithm for MNIST Hand written Digit


Classification.
2. Design a neural network for classifying movie reviews (Binary Classification) using IMDB
dataset.
3. Design a neural Network for classifying news wires (Multi class classification) using
Reuters dataset.
4. Design a neural network for predicting house prices using Boston Housing Price dataset.
5. Build a Convolution Neural Network for MNIST Hand written Digit
Classification.
6. Build a Convolution Neural Network for simple image (dogs and Cats)
Classification
7. Use a pre-trained Convolution Neural Network (VGG16) for image
classification.
8. Implement one hot encoding of words or characters.
9. Implement word embeddings for IMDB dataset.
10.Implement a Recurrent Neural Network for IMDB movie review classification problem.

Text Books:
1. Reza Zadeh and Bharath Ramsundar, ―TensorFlow for Deep Learning¦, O ‘Reilly publishers,
2018
References:
1. https://github.com/fchollet/deep-learning-with-python-notebooks
EXPERIMENT:1

1.Implement a multi-layer perceptron algorithm for MNIST Hand Written Digit Classification.

AIM: Implement a multi-layer perceptron algorithm for MNIST Hand Written Digit Classification.

DESCRIPTION:

 Handwritten digit recognition using MNIST dataset is a major project made with the help of
Neural Network. It basically detects the scanned images of handwritten digits.
 We have taken this a step further where our handwritten digit recognition system not only
detects scanned images of handwritten digits but also allows writing digits on the screen with
the help of an integrated GUI for recognition.
 The MNIST dataset (Modified National Institute of Standards and Technology) is a large
collection of handwritten digits (0-9) used for training and testing machine learning models,
particularly in image classification and deep learning.
Key Features of MNIST:
 60,000 training images and 10,000 test images
 Each image is 28x28 pixels in grayscale (values between 0 and 255)
 Labels range from 0 to 9, representing the digit in the image
 It is widely used for benchmarking neural network architectures like MLPs, CNNs, and RNNs
The figure 1 shows the basic architecture of a neural network consisting the different layers densely
connected to each other. The figure 2 shows the proposed method that how the model is going to
be trained. It follows several steps for the execution and provides some insights like the evaluation
metrics such as accuracy.
Fig 1: Basic Architecture of a Deep Neural Network

Fig 2: Proposed Method


Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Step 1: Import Libraries
Begin by importing the necessary libraries and frameworks required for the project. This often includes
libraries like NumPy, pandas, TensorFlow, or PyTorch.
Step 2: Load the Dataset
Load the dataset into your workspace. This could involve reading data from files, databases, or APIs
to make it accessible for processing.
Step 3: Preprocess the Dataset
Clean and prepare the data. This involves handling missing values, normalizing data, encoding
categorical variables, and splitting data into training and testing sets.
Step 4: Creating the Model
Define the architecture of the machine learning model. This step involves selecting the type of model
(e.g., neural network, decision tree) and specifying its parameters.
Step 5: Compile the Model
Set up the model for training by selecting the loss function, optimizer, and metrics. This prepares the
model for the learning phase.
Step 6: Train the Model
Fit the model to the training data. During this step, the model learns from the data by adjusting its
weights based on the optimization algorithm.
Step 7: Evaluate the Model
Test the model's performance using the evaluation dataset. This can include metrics like accuracy,
precision, recall, and F1-score, helping to assess how well the model generalizes to unseen data.
PROGRAM:
EXPERIMENT:2

Design a neural network for classifying movie reviews using IMDB (Internet Movie Database)
AIM:

Design a neural network for classifying movie reviews using IMDB (Internet Movie Database)
DESCRIPTION:
The IMDB dataset is a comprehensive collection of information sourced from the Internet Movie
Database (IMDB), which serves as a prominent online resource for details related to movies, television
shows, and other entertainment content. This dataset encompasses a wide array of information,
including titles, release dates, genres, cast and crew details, user ratings, plot summaries, box office
performance, and awards.
A neural network is a computational model inspired by the way biological neural networks in the
human brain process information. It consists of interconnected layers of nodes, or "neurons," which
process inputs to produce outputs as shown in the figure 1. Each neuron receives signals, applies a
mathematical transformation, and passes the result to the next layer. The network learns from data by
adjusting the weights of the connections based on the errors in its predictions, enabling it to perform
tasks such as classification, regression, and pattern recognition across various applications like image
and speech recognition.

Fig 1: Basic Neural Network


Fig 2: Proposed Method

Proposed Method: Designing a neural network for classifying IMDB movie reviews involves several
steps as shown in the figure 2, from data preprocessing to model training and evaluation. Below is a
step-by-step proposed method:
Step 1: Data Collection & Preprocessing
Dataset: Use the IMDB movie reviews dataset available in TensorFlow/Keras (imdb.load_data()). It
contains 50,000 reviews labelled as positive or negative.
Tokenization: Convert text into sequences of integers using a vocabulary dictionary.
Padding: Pad sequences to a fixed length to ensure uniform input size.
Train-Test Split: Typically, the dataset is already split into 25,000 training and 25,000 testing samples.
Step 2: Neural Network Architecture
We use a deep learning model with an Embedding layer followed by recurrent layers (LSTM/GRU) or
CNN for feature extraction.
Step 3: Model Compilation & Training
Loss Function: Use binary_crossentropy since it is a binary classification task.
Optimizer: Adam (adam) for better convergence.
Metrics: Accuracy (metrics=['accuracy']).
Batch Size & Epochs: Experiment with values like batch_size=64, epochs=10-20.
Step 4: Model Evaluation
Evaluate the model on the test set, using accuracy, precision, recall, and F1-score as performance
metrics.
Step 5: Fine-Tuning & Optimization
Adjust hyperparameters (learning rate, batch size), using techniques like dropout, batch normalization,
or bidirectional LSTM for improvement.
Step 6: Model Accuracy and Loss Visualization:
The model accuracy and loss metrics should be visualized using the matplotlib.pyplot.
PROGRAM:
EXPERIMENT:3

AIM:

Design a neural network for classifying news wires (multiclass, classification) using Reuters dataset.

DESCRIPTION:

The Reuters dataset is a well-known collection of newswires that are used in deep learning projects for
text classification tasks. Here are a few key details about it:
 Source: The dataset consists of news articles from Reuters, a reputable international news
organization.
 Content: It includes 11,228 news articles categorized into 46 different topics, such as politics,
business, sports, and technology.
 Purpose: It's commonly used for multi-class classification tasks, where the goal is to classify a
given news article into one of the predefined topics.
 Popularity: The Reuters dataset is frequently used in academic research and practical
applications to train and evaluate text classification models.

A neural network is a computational model inspired by the way biological neural networks in the
human brain process information. It consists of interconnected layers of nodes, or "neurons," which
process inputs to produce outputs as shown in the figure 1. Each neuron receives signals, applies a
mathematical transformation, and passes the result to the next layer. The network learns from data
by adjusting the weights of the connections based on the errors in its predictions, enabling it to
perform tasks such as classification, regression, and pattern recognition across various applications
like image and speech recognition.

Fig 1: Basic Neural Network


Fig 2: Proposed Method

Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Step 1: Import Libraries and Load the Reuters Dataset
Begin by importing necessary libraries such as TensorFlow, Keras, and NumPy. Load the Reuters
dataset, which is available in Keras, using the reuters.load_data() function. This dataset consists of
news articles categorized into different topics.
Step 2: Preprocessing the Data
Preprocess the data by tokenizing the text, converting it into sequences, and padding the sequences to
ensure uniform input size. Additionally, convert the labels into a one-hot encoded format to prepare
them for classification.
Step 3: Neural Network Architecture
Define the architecture of the neural network. This typically includes an embedding layer for text
representation, followed by one or more dense layers with activation functions (like ReLU) and a final
output layer with a SoftMax activation function for multi-class classification.
Step 4: Compile the Model
Compile the model by specifying the optimizer (e.g., Adam), loss function (e.g., Categorical Cross
entropy), and evaluation metrics (e.g., Accuracy) to be used during training.
Step 5: Train the Model
Train the model using the training data, specifying the number of epochs and batch size. Monitor the
training process to ensure the model is learning effectively.
Step 6: Evaluate the Model
After training, evaluate the model's performance on a separate validation or test dataset to assess its
accuracy and generalization capabilities.
PROGRAM:
EXPERIMENT:4

Design a neural network for predicting house price using Boston housing price.

AIM:

Design a neural network for predicting house price using Boston housing price.

DESCRIPTION:
Neural networks are machine learning models that mimic the complex functions of the human brain.
These models consist of interconnected nodes or neurons that process data, learn patterns and enable
tasks such as pattern recognition and decision making. The typical neural network can be shown in
figure 1.

Layers:

 Input Layer: It receives the import data. Each input neuron in layer corresponds to a feature in
input data.

 Hidden Layer: A neural network can have one or more multiple hidden layers. Each layer
consists of units that transform the inputs into something that output layer can use.

 Output Layer: The final layer produces the output of the model.

Fig 1: Neural Network


Fig 2: Proposed Method

Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:

Step 1: Import Required Libraries

Begin by importing the necessary libraries for data manipulation, model building, and visualization.
This typically includes libraries like TensorFlow or Keras for constructing the neural network, along
with NumPy, Pandas, and Matplotlib for data handling and visualization.

Step 2: Load and Preprocess the Data

Load the Boston housing dataset, which contains features related to housing attributes and their
corresponding prices. Preprocess the data by handling any missing values, encoding categorical
variables if needed, and splitting the dataset into features (input variables) and target (housing prices).
Normalize or standardize the features to enhance model performance.

Step 3: Define the Neural Network Model

Define the architecture of the neural network, which usually consists of an input layer, one or more
hidden layers with activation functions (such as ReLU), and a final output layer designed for regression
tasks (typically a linear activation function).

Step 4: Train the Model

Compile the model by selecting an appropriate optimizer (like Adam), a loss function suitable for
regression (such as Mean Squared Error), and relevant metrics (like Mean Absolute Error). Train the
model using the training dataset, specifying the number of epochs and batch size to optimize learning.

Step 5: Evaluate the Model


After training, evaluate the model's performance on a separate test dataset to assess its accuracy and
generalization capabilities to quantify the model's predictive performance.

PROGRAM:
EXPERIMENT:5

Build a convolutional neural network for MNIST hand written digit classification.

AIM:
Build a convolutional neural network for MNIST hand written digit classification.

DESCRIPTION:
Hand written digit classification system is the system of working with of a machine train itself so that
it can recognize different sources email book changes 1 paper etc.
MNIST DATASET:
 MNIST stands for “Modified National Institute of Standard and Technology”.
 Each image is of 28*28 pixels i.e. about 784 features.
 It is a dataset of 70,000 hand written images.
 Each features represents only one pixel’s intensity i.e. from 0(white) to 255(black)
 This dataset is further divided into 60,000 training and 10,000 testing images.

CNN: A convolutional neural network (CNN) is a type of deep learning architecture commonly used
for image classification as shown in the figure 1.

Fig 1: Convolutional Neural Network (CNN) Architecture for Handwritten Digit Recognition
Fig 2: Proposed Method

Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Step 1: Import Necessary Libraries
In this initial step, you will import essential libraries required for building your Convolutional Neural
Network (CNN) model. This typically includes libraries such as TensorFlow or PyTorch for deep
learning, NumPy for numerical operations, and Matplotlib for visualizations. These libraries provide
useful functions and classes that simplify the implementation of machine learning models.

Step 2: Load and Preprocess the MNIST Dataset


This step involves loading the MNIST dataset, which consists of handwritten digits, and
preprocessing it to make it suitable for model training. Preprocessing may include normalizing pixel
values, reshaping the images, and splitting the dataset into training and testing sets. This helps the
model learn effectively by ensuring the data is in a compatible format.

Step 3: Build the CNN Model


In this step, you design the architecture of your CNN model. This usually involves stacking
convolutional layers, activation functions like ReLU, pooling layers, and possibly dropout layers to
mitigate overfitting. The goal is to create a structure that can effectively capture spatial hierarchies in
the images.
Step 4: Compile the Model
After constructing the model, you'll compile it to configure the learning process. This step includes
defining the loss function, the optimizer (like Adam or SGD), and any metrics you want to track
during training, such as accuracy. Compiling the model prepares it for the training phase.

Step 5: Train the Model


In this crucial step, you train the CNN using the training dataset. This involves feeding the data into
the model, which uses backpropagation to adjust its weights based on the loss calculated against the
true labels. This step is important for the model to learn patterns and features from the data.

Step 6: Evaluate the Model


Once the model is trained, this step involves evaluating its performance on the test dataset. This
typically includes calculating metrics like accuracy, precision, and recall to determine how well the
model generalizes to unseen data. Evaluating the model helps identify any issues and provides
insights into its effectiveness.

Step 7: Visualize Sample Predictions


The final step focuses on visualizing the model's predictions on sample images from the dataset. This
may involve displaying a selection of test images alongside the model's predicted labels and the true
labels. Visualization helps in interpreting the model’s performance and understanding its decision-
making process.

PROGRAM:
EXPERIMENT:6

To build a convolutional neural network for simple image (dogs and cats) classification.
AIM:
To build a convolutional neural network for simple image (dogs and cats) classification.
DESCRIPTION:
CNN is a machine learning for machines to understand the features of image with foresight and
remember the features to guess whether the name of new image is fed to machine.
We will create an image classifier of our own as shown in the below figure 1, that can distinguish
whether a given picture of a dog or cat, or something else depending upon your fed data. To achieve
our goal, we will use one of the famous machine learning algorithms out there which are used for image
classification i.e. CNN. The name of each image of training dataset is either start with “cat” or “dog”
so we will use that to our advantage then we use one hot encoder for the machine to understand the
labels (cat [1,0] or dog [0,1]).

Fig 1: CNN Architecture for Cat vs. Dog Image Classification


Fig 2: Proposed Method
The proposed method as shown in the figure 2, consists of several steps of execution which can be
explained as:
Step 1: Import Libraries
In this initial step, essential libraries are imported to facilitate data handling, preprocessing, and
modeling. Common libraries include NumPy and pandas for data manipulation, Matplotlib and
Seaborn for data visualization, and TensorFlow or PyTorch for building and training neural networks.
Step 2: Load and Preprocess Data
After importing the necessary libraries, the next step involves loading the dataset into the environment.
This typically includes reading data from various sources such as CSV files, image directories, or
databases. Preprocessing, This step may involve resizing images, normalizing pixel values, handling
missing values, and splitting the dataset into training, validation, and test sets to ensure the model can
generalize well.
Step 3: Data Augmentation
Data augmentation is a technique used to artificially expand the training dataset. It involves applying
random transformations such as rotation, flipping, or zooming to the images. This step is important to
improve the model’s robustness by exposing it to a more diverse set of training examples. Data
augmentation helps prevent overfitting and enhances the model's ability to generalize to unseen data.
Step 4: Build the CNN Model
In this step, the architecture of the Convolutional Neural Network is defined. This includes stacking
different layers such as convolutional layers, activation functions (like ReLU), pooling layers, and fully
connected layers. The design of the model can vary based on the specific requirements of the task at
hand, and it’s typically guided by the complexity and nature of the dataset being used.
Step 5: Train the Model
Training the model is where the actual learning occurs. The CNN is fed the training data, and it
iteratively adjusts its weights to minimize the loss function. During this process, the model learns the
underlying patterns of the data through backpropagation. This step includes monitoring the model’s
performance on validation data to ensure that it is not overfitting and to fine-tune hyperparameters such
as learning rate and batch size.
Step 6: Evaluate the Model
After training, the model is evaluated using the test dataset to determine its performance. This step
involves calculating metrics such as accuracy, precision, recall, and F1 score, depending on the nature
of the problem (e.g., classification). Evaluating the model is critical to understanding its effectiveness
and provides insights into its generalization capabilities on new, unseen data.
Step 7: Make Predictions
Finally, after evaluation, the model can be utilized to make predictions on new data. This step involves
feeding new images or data points to the trained model to obtain predictions. The effectiveness of the
model can be gauged based on how well it performs on this unseen data compared to the initial
evaluation.

PROGRAM:
EXPERIMENT:7

Use a pretrained Convolutional Neural Network (VGG16) for image classification.

AIM:

Use a pretrained Convolutional Neural Network (VGG16) for image classification.

DESCRIPTION:

Convolutional Neural Network:


Convolutional Neural Networks (CNNs) are a specialized class of neural networks designed
to process grid-like data, such as images. They are particularly well-suited for image recognition and
processing tasks. They are inspired by the visual processing mechanisms in the human brain, CNNs
excel at capturing hierarchical patterns and spatial dependencies within images is as shown in the
figure 1.
Key Components of a Convolutional Neural Network:
1. Convolutional Layers: These layers apply convolutional operations to input images, using filters
(also known as kernels) to detect features such as edges, textures, and more complex patterns.
Convolutional operations help preserve the spatial relationships between pixels.
2. Pooling Layer: They down sample the spatial dimensions of the input, reducing the
computational complexity and the number of parameters in the network. Max pooling is a
common pooling operation, selecting the maximum value from a group of neighboring pixels.
3. Activation Function: They introduce non-linearity to the model, allowing it to learn more
complex relationships in the data.
4. Fully Connected Layers: These layers are responsible for making predictions based on the high-
level features learned by the previous layers. They connect every neuron in one layer to every
neuron in the next layer.

Fig 1: Convolutional Neural Network


VGG16:
The VGG-16 model is a convolutional neural network (CNN) is characterized by its depth,
consisting of 16 layers, including 13 convolutional layers and 3 fully connected layers. VGG-16 is
renowned for its simplicity and effectiveness, as well as its ability to achieve strong performance on
various computer vision tasks, including image classification and object recognition. The model’s
architecture features a stack of convolutional layers followed by max-pooling layers, with
progressively increasing depth. This design enables the model to learn intricate hierarchical
representations of visual features, leading to robust and accurate predictions.
VGG Architecture:
The VGG-16 architecture is a deep convolutional neural network (CNN) designed for image
classification tasks. The VGG-16 configuration typically consists of 16 layers, including 13
convolutional layers and 3 fully connected layers. These layers are organized into blocks, with each
block containing multiple convolutional layers followed by a max-pooling layer for down sampling as
shown in the figure 2.

Fig 2: VGG-16 Architecture

Fig 3: Proposed Method


Proposed Method: The proposed method as shown in the figure3, consists of several steps of execution
which can be explained as:
Step 1: Import Required Libraries
The first step in the process is to import the necessary libraries required for image classification.
These include TensorFlow and Keras for deep learning model loading and inference, NumPy for
numerical operations, OpenCV or PIL for image processing, and Matplotlib for visualization. These
libraries help in handling images, performing preprocessing, and interpreting model outputs.

Step 2: Load the pre-trained VGG16 Model


In this step, the pre-trained VGG16 model is loaded. VGG16 is a convolutional neural network
trained on the ImageNet dataset, which contains millions of images across 1,000 different categories.
By using a pre-trained model, we leverage its learned features without training from scratch, saving
both time and computational resources.

Step 3: Load and Preprocess the Image


Once the model is loaded, the input image is prepared for classification. This includes resizing it to
224x224 pixels (the standard input size for VGG16), normalizing pixel values to match the model's
training distribution, converting it to a NumPy array, and ensuring it has the correct dimensions.
Proper preprocessing ensures accurate classification by the model.

Step 4: Perform Image Classification


After preprocessing, the image is passed through the VGG16 model to obtain predictions. The model
outputs probabilities for different categories, and the class with the highest probability is considered
the final classification result. The predictions are based on the model’s deep learning architecture,
which detects patterns and features from the image.

Step 5: Interpret the Results


The final step involves interpreting the classification results. The predicted class label is extracted,
along with the confidence score. These results can be displayed using text output or visualized using
tools like Matplotlib. If needed, further steps such as thresholding or filtering can be applied to refine
the classification output.
PROGRAM:
EXPERIMENT:8

Implement One-hot encoding for words or characters.

AIM:

Implement One-hot encoding for words or characters.

DESCRIPTION:

One-hot encoding: One-hot encoding is a method of convert categorical data into a numerical format
that algorithms can process as shown in the figure 1.
Categorical data: This data consists of categorical such as words or characters in text.
Vocabulary: Identify all unique categories (words or character) in data. This forms your vocabulary.
Vectorisation: Create a binary vector for each category. The length of vector equals to number of
unique categories. The vector has all zeros except for a single one at position corresponding to category.

Fig 1: One-Hot Coding

Fig 2: Proposed Method


Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Step 1: Define the Text data
Start by selecting a sample text or dataset that will be used for processing. This could be a sentence,
paragraph, or entire document, depending on the application. The text should be pre-processed by
removing unnecessary symbols, punctuations, or special characters to maintain consistency.

Step 2: Tokenization
Tokenization involves breaking the text into smaller units called tokens. These tokens can be words,
sub words, or characters, depending on the level of granularity required. Tokenization helps in
structuring text data for further processing in NLP applications.

Step 3: Create a Vocabulary


A vocabulary is a collection of unique words found in the text. It acts as a reference dictionary where
each distinct word in the text corpus is stored. The vocabulary helps in mapping words to numerical
representations for further processing.

Step 4: Encode the Words


Each word from the vocabulary is assigned a unique numerical identifier. This step converts words into
numerical values, enabling algorithms to process textual data efficiently. Encoding techniques include
label encoding, integer encoding, and word embedding methods.

Step 5: Convert Text to One-Hot Representation


One-hot encoding represents words as binary vectors, where each word is mapped to a vector with a
single "1" in the position corresponding to its index in the vocabulary, while all other positions contain
"0". This method helps in text representation while ensuring that words are treated independently.
PROGRAM:
EXPERIMENT:9

Implement word embeddings for IMDB dataset.

AIM:

Implement word embeddings for IMDB dataset.

DESCRIPTION:

Word Embedding is essential in natural language processing with deep learning. This learning allows
the network to learn about the meaning of the words. The IMDB dataset is then loaded and prepared
by limited the vocabulary to the top 10,000 must common words and padding sequence to ensure
uniform input size. A sequential model is created.

Fig 1: Word Embedding


Fig 2: Proposed Method

Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Step 1: Import Libraries
The required libraries such as TensorFlow, Keras, NumPy, and Matplotlib are imported. TensorFlow
and Keras are used for building and training the deep learning model, while NumPy is used for
numerical operations. Matplotlib is used for visualizing training history. The IMDB dataset is also
imported from Keras, which contains movie reviews for sentiment classification.

Step 2: Model Configuration


The essential hyperparameters for model training are defined. These include the maximum sequence
length (to standardize input size), the vocabulary size (limiting the number of unique words), the
embedding output dimensions (size of word vector representation), loss function (binary cross-entropy
for classification), optimizer (Adam for efficient training), number of epochs, and validation split
percentage to separate training and validation data.

Step 3: Load Dataset


The IMDB dataset is loaded and split into training and testing sets. The dataset consists of movie
reviews represented as sequences of integers, where each integer corresponds to a word in the
vocabulary. The training set is used to train the model, while the test set evaluates its performance on
unseen data.

Step 4: Preprocess Data


Since the dataset consists of sequences of varying lengths, padding is applied to ensure all sequences
have the same length. Padding adds zeros to shorter sequences, making them uniform in size. This step
is crucial because neural networks require a fixed input size to process data effectively.

Step 5: Text Sample Inspection


To understand the dataset better, a few sample reviews are converted back from numerical
representations to words. This step helps verify how the text data is structured and ensures that
preprocessing has been correctly applied. It also provides insight into how the model interprets input
sequences.

Step 6: Define the Model


A deep learning model is built using the Sequential API in Keras. It consists of an Embedding layer to
convert words into dense vectors, Dropout layers to prevent overfitting, a 1D Convolutional layer for
feature extraction, a MaxPooling layer for dimensionality reduction, a Flatten layer to prepare data for
the Dense layer, and a final Dense layer with a sigmoid activation function for binary classification.

Step 7: Compile and Train the Model


The model is compiled with the Adam optimizer and binary cross-entropy loss function, suitable for
binary classification tasks. The training process involves feeding the padded sequences into the model,
adjusting weights over multiple epochs, and monitoring validation performance. This step helps the
model learn patterns in movie reviews for sentiment analysis.

Step 8: Evaluate the Model


After training, the model is tested on the unseen test dataset. The evaluation process measures the
model’s accuracy and loss, providing an indication of how well it generalizes to new data. A lower loss
and higher accuracy indicate better performance in predicting sentiment.

Step 9: Visualize Performance


The training history is visualized using Matplotlib by plotting validation loss and accuracy over epochs.
These graphs help analyse whether the model is improving, overfitting, or underfitting. A well-trained
model should show decreasing loss and increasing accuracy on both training and validation sets.
PROGRAM:
EXPERIMENT:10

Implement a Recurrent Neural Network for IMDB movie review classification problem.

AIM: Implement a Recurrent Neural Network for IMDB movie review classification problem.

DESCRIPTION:

 Recurrent neural networks, also known as RNNs, are a class of neural networks that allow
previous outputs to be used as inputs while having hidden states. A recurrent neural network is
designed to allow the ANN model to represent temporal characteristics of a training set by
connecting the current state of the network output to a combination of the network input and to
previous state(s) of the network. This is done by feeding the output of a hidden layer or the
network output back to the input layer
 The primary objective of this experiment is to classify IMDB movie reviews into positive and
negative sentiments using a Recurrent Neural Network (RNN). Given the sequential nature of
textual data, RNNs are well-suited for capturing dependencies between words and
understanding the overall sentiment of a review.
 The IMDB movie review dataset is a widely used benchmark dataset for sentiment
classification. It consists of 50,000 reviews, evenly split between positive and negative
sentiments. The dataset is pre-processed by tokenizing the text, converting words into numerical
representations, and padding sequences to ensure uniform input length.
 The experiment employs an RNN-based deep learning model for sentiment classification. The
model consists of an embedding layer to convert words into dense vector representations,
followed by a recurrent layer such as Simple RNN, Long Short-Term Memory (LSTM), or
Gated Recurrent Unit (GRU). These layers help capture long-term dependencies in the text. A
fully connected dense layer with a sigmoid activation function is used for final binary
classification.

Fig 1: Recurrent Neural Network


Proposed Method:
The proposed method as shown in the figure 2, consists of several steps of execution which can be
explained as:
1. Dataset and Preprocessing
The IMDB movie review dataset is used, which contains 50,000 reviews labelled as either positive or
negative. Only the 10,000 most frequent words are considered to reduce vocabulary size. Reviews are
converted into numerical sequences using tokenization. The sequences are padded to a fixed length of
100 words to ensure uniform input size for the model.

2. Model Architecture
The classification model follows a sequential deep learning approach with the following layers:
Embedding Layer: Converts words into dense vector representations of dimension 128.
LSTM Layer: A single LSTM layer with 128 units is used to process the sequential input data.
Dense Output Layer: A fully connected layer with sigmoid activation outputs the probability of a
review being positive or negative.

3. Training Strategy
The model is compiled using the Adam optimizer for efficient gradient updates. Binary cross-entropy
loss function is used since it is a binary classification task. The model is trained for 10 epochs with a
batch size of 32. A validation split of 20% is used to monitor generalization performance.

4. Evaluation Metrics
The trained model is evaluated using the following performance metrics:
Accuracy: Measures the proportion of correctly classified reviews.
Precision & Recall: Evaluates how well the model differentiates between positive and negative
reviews.
F1-Score: Provides a balance between precision and recall.
Confusion Matrix: Visualizes true positive, true negative, false positive, and false negative
classifications.

Fig 2: Proposed Method


PROGRAM:
AN EFFICIENT ENHANCED INTRUSION DETECTION SYSTEM USING SVM
Krishna Sowjanya Akella1, Anantha Lakshmi Mekala2, Sai Harshitha Magapu3, Ganga
Bhavani Billa4
1,2,3
Department of Artificial Intelligence and Machine Learning, Bonam Venkata Chalamayya Engineering College,
4
Department of Computer Science and Machine Learning, Bonam Venkata Chalamayya Engineering College, India

Abstract margin separation.


An intrusion detection system (IDS) is necessary to
monitor network and system activities and identify malicious An Intrusion Detection System's (IDS) operation
behavior. Improving IDS accuracy is essential to lowering false within a network is depicted in the figure. The process
alarms and raising detection rates as computer connectivity grows. begins with a server transmitting packets to a router over
a network. Traffic is routed by the router to a firewall,
In order to enhance IDS performance, this work investigates
which blocks unwanted access. The Intrusion Detection
machine learning techniques, namely Support Vector Machine System (IDS) concurrently examines the traffic to look for
(SVM). The NSL-KDD dataset is used for assessment, and the irregularities or malicious behaviour. By examining the
findings indicate that SVM outperforms SVM in terms of accuracy packets that are moving through the system, a user keeps
and misclassification rates. In order to enhance intrusion detection an eye on network security. By identifying threats before
capabilities and ultimately improve network security, this study they compromise the system, this configuration improves
highlights the significance of efficient classification cybersecurity. In order to detect unwanted access and
methodologies in the analysis of large network traffic data.
Keywords: Machine Learning, Intrusion Detection, Malicious
Activity, Support Vector Machine, NSL-KDD Dataset, Network
Security Attack Classifier.

1. INTRODUCTION
Enhanced Intrusion Detection System refers to a
more sophisticated variant of a conventional Intrusion
Detection System (IDS) that utilizes more intricate
methods and algorithms to identify potential cyber threats
with greater accuracy and efficiency. Such systems often
integrate machine learning, behavioral analysis, and real-
time threat intelligence to recognize anomalies beyond
basic signature-based detection techniques. A system that
uses advanced techniques to recognize and tackle network
threats is termed as an enhanced Intrusion Detection
System (IDS). It is capable of monitoring threats, policy
breaches, and malicious actions on a network. An
safeguard network infrastructure, intrusion detection
Intrusion Detection System (IDS) is a security technology
systems (IDS) are essential. The work flow of the intrusion
that monitors for hostile activities or policy violations
detection system is as presented in the Figure -1.
within a computer network or its systems. By analyzing
traffic and alerting administrators to intervene, it helps in
identifying unauthorized access, potential threats, and Figure 1: Intrusion Detection System
unusual behaviors. For the preservation of network
security and the protection of critical data from Maonan Wang et al. [1], the SHAP approach enhances IDS
cyberattacks, an IDS is crucial. An Intrusion Detection interpretability while promoting more transparency and trust by
System (IDS) tracks network traffic, looking for irregular using SHAP to provide both local and global explanations for
activities and generating alerts when such activities occur. model choices. Ajmeera Kiran, et al [2], says that by examining
While detecting anomalies and reporting them is a system call patterns unique to each user's typical activity, IIDPS is
primary duty of an Intrusion Detection System (IDS), able to identify hostile behavior. Usman Shuaibu Musa et al. [3],
some IDSs can also respond to the discovery of hostile hybrid and ensemble machine learning classifiers outperform
activities or irregular traffic. In this context, we utilized single classifiers in intrusion detection systems, offering higher
the machine learning algorithm known as Support Vector detection rates and accuracy. Roberto Magán-Carrión et al. [4], the
Machine. A Support Vector Machine (SVM) is a main goal of this research is to develop the R-NIDS technique,
supervised learning model employed for both which combines many datasets to lessen overfitting and enhance
classification and regression analysis. It creates a the generalization and dependability of machine learning-based
hyperplane or a collection of hyperplanes in a high- network intrusion detection systems. Lan Liu, et al. [5], says that
dimensional space to distinguish between different Introduction of the DSSTE algorithm, which improves the
classes. SVMs are particularly effective for high- classification accuracy of intrusion detection systems by
dimensional spaces and scenarios that require clear addressing imbalanced network traffic through targeted expansion
of minority samples. Iftikhar Ahmad, et al. [6], says that The proposed method of this approach is given
According to this study, Extreme Learning Machines (ELM) are in Fig-2. Accuracy has been calculated and a graph has been
the best machine learning method for intrusion detection systems plotted based on the obtained results.
because they can handle big datasets with great recall, accuracy,
and precision. Murali A, et al. [7], says that in order to direct
future research toward creating a general intrusion detection
system (IDS) that can handle all kinds of attacks, this work will
examine and contrast current intrusion detection techniques in
order to determine their advantages and disadvantages. Zahedi
Azam, et al. [8], says that provide an overview of AI-based NIDS,
highlighting the advantages of DL over ML, their challenges in
real-time implementation, and open research issues for improving
intrusion detection systems. Ida Seraphim et al. [9], says that
combining deep learning and artificial neural networks with
traditional machine learning is a two-level approach to improve
the efficacy and accuracy of intrusion detection systems. Gan Xu-
sheng, et al. [10], says that the PLS–CVM approach enhances the
efficacy and efficiency of anomaly intrusion detection in large-
scale data by combining PLS for feature extraction with CVM for
quick modeling. Poulmanogo Illy, et al. [11], says that Using the
NSL-KDD dataset, ensemble learners enhance intrusion detection
and attack classification. A fog-cloud architecture is suggested for
quicker detection and more resource-intensive classification.
Amira Sayed A. Aziz, et al. [12], says that Future study will
concentrate on behavioral attack identification in regular traffic,
while simpler classifiers like NB excel in low-represented attacks.
A hybrid intrusion detection system employing multiple
classifiers increases detection accuracy across a variety of attack Fig-2: Proposed Method
classes. S. A. B. R. Mahajan et al. [13], says that future study,will
focus on feature selection and real-time implementation because
Random Tree is an efficient machine learning technique for real- 2.1 Intrusion Detection System utilizing SVM
time intrusion detection due to its high detection rate and quick
model building time. K. Azarudeen, et al. [14], says that NIDS A Machine Learning Approach This project creates an
for zero-day attacks can be improved with a deep learning intrusion detection system (IDS) based on the Support Vector
framework that uses RNNs to improve accuracy, precision, and Machine (SVM) algorithm; a supervised machine learning
recall. With the use of GPU acceleration, training times may be technique recognized for its effectiveness in classification tasks.
shortened. Mukesh Kumar Yadav, et al. [15], says that On the The dataset utilized in this study is preprocessed and analyzed to
NSL-KDD dataset, the ensemble model for intrusion detection identify various types of network intrusions.
achieves high accuracy across a range of attack types, surpassing
state-of-the-art approaches. Samir Fenanir et al. [16], says that a 2.2 Data Preprocessing along with Feature
machine learning-based lightweight intrusion detection model is Engineering
recommended for IoT security; decision trees (DT) outperform
other models in terms of accuracy and efficiency when tested on Several crucial preprocessing procedures are applied to the
the NSL-KDD dataset.. Kathryn-Ann Tait, et al. [17], says that
original dataset. To prepare nominal attributes for the SVM
machine learning's efficacy in intrusion detection, with KNN algorithm, they are transformed into binary representations. To
producing results that are almost flawless, and recommends maintain compatibility, non-numeric features that are not directly
investigating deep learning for potential advancements. Manjula applicable to the SVM are discarded. (Note: The image refers to
C. Belavagi, et al. [18], says that Using the NSL-KDD dataset, labeling into Normal, DoS, Probe, and R2L categories, but this
the Random Forest classifier performs better than the others with information is not explicitly included in the supplied code. If this
99% accuracy in intrusion detection. Dong Seong Kim et al. [19], categorization takes place during data loading or in a distinct
says that a network-based intrusion detection system based on preprocessing phase, it ought to be included.).
support vector machines (SVMs) has demonstrated its
effectiveness in detecting assaults on the 1999 KDD dataset.
Rashid Baimukashev, et al. [20], says that using a variety of
2.3 Splitting of the data
machine learning models to solve the intrusion detection problem,
with NOG-LSTM achieving the highest accuracy for binary To guarantee a thorough assessment of the model's
classification (85.68%).The Intrusion Detection System is briefly performance on previously unknown data, the
explained in the following ways with the fields: the proposed train_test_split function from scikit-learn is used to divide
method is described in the Section 2 and the sub sections are the dataset into training and testing sets.
followed by the section 2, the obtained results and discussion is
present in the section 3 and also the conclusion is demonstrated in 2.4 Model Selection
the section 4.
The SVC class from scikit-learn is used to build an SVM
classifier, with a linear kernel used for this implementation. The
2. METHOD creation of probability estimates is made possible by using the
argument probability=True; they are essential for creating ROC
curves. To guarantee repeatability, a random state is established.

2.5 Model Evaluation and Performance Metrics

The trained SVM model is used to forecast the test set's


classes. Standard measures like the confusion matrix, which
compares the model's predictions to the actual labels, and the
classification report, which gives accuracy, recall, F1-score, and
support for each class, are used to assess the model's effectiveness.

2.6 ROC Curve and AUC

A Receiver Operating Characteristic (ROC) curve is created


in order to evaluate the classifier's performance in a more thorough Figure-4: Tested Data
manner. The roc_curve function computes the True Positive Rate
(TPR) and False Positive Rate (FPR) at different thresholds. The The evaluation metrics of a Support Vector Machine (SVM)
Area Under the Curve (AUC), which serves as a single indicator classifier with a Linear SVC (Support Vector Classification)
of the classifier's capacity to discriminate between classes, is then kernel, results are formatted in a structured manner, indicating the
calculated using the auc function. The ROC curve, which shows model's performance across multiple metrics is shown in fig-5.
the trade-off between TPR and FPR, is displayed using matplotlib.

2.7 Analysis of Feature Importance

By looking at the coefficients associated with the linear kernel, the


linear SVM assesses the significance of each feature. The
coefficients show the relative effect of each characteristic on the
decision boundary. Finding the most important features for
intrusion detection is made possible by a bar chart that shows
feature importances.

3. RESULTS AND DISCUSSION

The accuracy of an SVM with Linear SVC has been


assessed for 31493 occurrences, of which 16720 have been Fig-5: Performance Metrics of Linear SVM
classified as "Normal" and 14773 as "Attack." The SVM model
performed exceptionally well on every evaluation metric. The The information of the confusion matrix is displayed in
model's performance across a number of measures is indicated by Figure 6; the image shows a confusion matrix for a classification
the structured format of the evaluation metrics of Support Vector model, most likely the SVM Linear SVC model previously
Machine (SVM) classifier with a Linear SVC (Support Vector mentioned; the confusion matrix assesses the model's ability to
Classification) kernel result. Strong classification ability and low distinguish between two classes: "Normal" and "Attack." The
misclassification are indicators of the model's good performance, graph in Figure 7 displays a Receiver Operating Characteristic
as seen by the high values for each of these metrics. Figure [3]
and Figure [4] display the 31493 cases that have been separated
into training and testing data.

(ROC) curve for a Linear SVC (Support Vector Classifier) model.


The ROC curve plots the True Positive Rate (TPR) against the
Figure-3: Trained Data False Positive Rate (FPR) in order to assess the performance of a
classification model.

Fig-6: Confusion matrix between Normal and Attack


 Confusion Matrix Breakdown 10.1109/ICCCI56745.2023.10128363

[3] Usman Shuaibu Musa, "Intrusion Detection System using Machine


True Positives (Attack correctly classified as Attack): 14,467 Learning Techniques: A Review”, IEEE, 2020 International
True Negatives (Normal correctly classified as Normal): 16,422 Conference on Smart Electronics and Communication (ICOSEC),
False Positives (Normal misclassified as Attack): 298 DOI: 10.1109/ICOSEC49089.2020.9215333
False Negatives (Attack misclassified as Normal): 306
[4] Roberto Magán-Carrión, "Improving the Reliability of Network
The curve is situated quite near the top-left corner, signifying Intrusion Detection Systems Through Dataset Integration", IEEE
a highly effective classifier. The AUC (Area Under the Curve) (Volume:10),Pages:1717-1732,DOI: 10.1109/TETC.2022.3178283
value is 0. 99, which is outstanding and indicates that the model
[5] Lan Liu, “Intrusion Detection of Imbalanced Network Traffic Based
possesses an exceptional capability to differentiate between the
on Machine Learning and Deep Learning”, IEEE Access (Volume:
classes. An almost flawless AUC score indicates that the model 9),2020,Page(s):7550–7563,DOI: 10.1109/ACCESS.2020.3048198
exhibits high sensitivity (recall) and specificity, rendering it
extremely dependable for classification. An ideal classifier would [6] Iftikhar Ahmad, "Performance Comparison of Support Vector
achieve an AUC of 1. 0, indicating it accurately classifies all Machine, Random Forest, and Extreme Learning Machine for
positives and negatives. Intrusion Detection”, IEEE (Volume:6), Pages:33789-33795, DOI:
10.1109/ACCESS.2018.2841987

[7] Murali A, "A Survey on Intrusion DetectionApproaches", IEEE,


First International Conference Information and Communication
Technologies, Karachi, Pakistan, 2005, pages: 233–240, DOI:
10.1109/ICICT.2005.1598592

[8] Zahedi Azam, "Comparative Analysis of Intrusion Detection


Systems and Machine Learning-Based Model Analysis Through
Decision Tree", IEEE (Volume: 11), Pages: 80348 - 80391, DOI:
10.1109/ACCESS.2023.3296444

[9] B.Ida Seraphim, "A Survey on Machine Learning Techniques in


Network Intrusion Detection System", IEEE, 2018 4th International
Conference on Computing Communication and Automation
(ICCCA), Greater Noida, India, December 2018, DOI:
10.1109/CCAA.2018.8777596

[10] Gan Xu-sheng," Anomaly intrusion detection based on PLS feature


Fig-7. ROC curve for a Linear SVC extraction and core vector machine", Knowledge-Based Systems,
Volume40,March2013,Pages1-6,DOI:
4. CONCLUSION 10.1016/j.knosys.2012.09.004

Intrusion detection and prevention are necessary in light [11] Poulmanogo Illy, “Securing Fog-to-Things Environment
Using Intrusion Detection System Based On Ensemble
of current developments. Detecting and preventing breaches is
Learning”, 2019 IEEE Wireless Communications and
essential since our routine events rely significantly on networks
NetworkingConference(WCNC),DOI:
and information systems. Intrusion detection systems have used a 10.1109/WCNC.2019.8885534
range of techniques. Among these is machine learning, which is
essential. Machine-learning methods like SVM are examined in [12] Amira Sayed A. Aziz, "Comparison of classification techniques
this study, which suggests handling 31493 examples. To improve applied for network intrusion detection and classification", Journal
accuracy in upcoming work with massive data sets, a hybrid multi- of Applied Logic, Volume 24, Part A, November 2017, Pages 109-
level model will be created. It involves creating a more efficient 118, DOI: 10.1016/j.jal.2016.11.018
model based on well-structured classifiers that are better able to
classify new threats.
[13] S. A. B. R. Mahajan, "Machine Learning for Intrusion Detection",
Journal of Information Security and Applications (2017),
5. ACKNOWLEDGEMENTS University of Pune, India, Volume: 35, Pages: 1-13, DOI:
10.1016/j.jisa.2017.03.005.
The Bonam Venkata Chalamayya group of institutions
provided support for this study. The authors express their gratitude [14] K. Azarudeen, "Intrusion Detection System Using Machine
to B. Ganga Bhavani Mam for her essential support and guidance Learning by RNN Method", E3S Web Conf., Volume 491, 2024
during this work. International Conference on Environmental Development Using
Computer Science (ICECS’24), Pages (10), DOI:
10.1051/e3sconf/202449104012
REFERENCES
[15] Mukesh Kumar Yadav, "Enhancement of Intrusion Detection
[1] Maonan Wang, "An Explainable Machine Learning Framework for System using Machine Learning", IJERT, Central Research
IntrusionDetectionSystems”,IEEEAccess(Volume:8),pages:73127 Laboratory Bharat Electronics Limited Ghaziabad, India, Volume
-73141,DOI: 10.1109/ACCESS.2020.2988359 12, Issue 01 (January 2023), DOI: 10.17577/IJERTV12IS010058

[2] Ajmeera Kiran, "Intrusion Detection System Using Machine


Learning", IEEE, 2023 International Conference on Computer [16] Samir Fenanir, "A Machine Learning-Based Lightweight Intrusion
Communication and Informatics (ICCCI), January 2023, DOI: Detection System for the Internet of Things", IIETA, 2019, Page:203-211,
DOI: 10.18280/ria.330306

[17] Kathryn-Ann Tait, “Intrusion Detection using Machine Learning


Techniques: An Experimental Comparison”, Research Gate, May
2021, DOI:10.48550/arXiv.2105.13435

[18] Manjula C. Belavagi, “Performance Evaluation of Supervised


Machine Learning Algorithms for Intrusion Detection”,
ScienceDirect, Twelfth International Multi-Conference on
Information Processing-2016 (IMCIP-2016), DOI:
10.1016/j.procs.2016.06.016

[19] Dong Seong Kim, “Network-Based Intrusion Detection with


Support Vector Machines”, Springer Nature Link, International
Conference on Information Networking, Pages 747–756, DOI:
10.1007/978-3-540-45235-5_73

[20] Rashid Baimukashev, "Intrusion Detection System for Wireless


Networks”, 2021 16th International Conference on Electronics
Computer and Computation (ICECCO), Kaskelen, Kazakhstan,
DOI: 10.1109/ICECCO53203.2021.9663787
BIOGRAPHIES OF AUTHORS:

Krishna Sowjanya Akella has a diploma in Electronics and Communication Engineering


and is currently pursuing her third year of B. Tech in the Artificial Intelligence and Machine Learning
domain at Bonam Venkata Chalamayya Engineering College in Odalarevu. She has gained practical
experience through internships at IIDT-APSCHE Blackbucks in AIML and APSSDC-Edunet
Foundation. Her areas of interest encompass artificial intelligence, machine learning, and data
analysis. She can be reached via email at [email protected]

Anantha Lakshmi Mekala has completed her Intermediate Studies at Sri Chaitanya Junior
College in Amalapuram and now she is presently pursuing a three-year B. Tech in the field of
Artificial Intelligence and Machine Learning at Bonam Venkata Chalamayya Engineering College in
Odalarevu. Through internships at IIDT APSSDC Blackbucks in AI-ML-DS and at Codsoft in domain
of UI/UX design, Techno hacks in the domain of python development. She has acquired practical
experience. Machine Learning, and Artificial Intelligence are among her interests. She can be reached
via email at [email protected]

Sai Harshitha Magapu completed her Intermediate Studies at Aditya Junior College in
Mandapeta and now she is presently pursuing a three-year B.Tech in the field of Artificial Intelligence
and Machine Learning at Bonam Venkata Chalamayya Engineering College in Odalarevu. Through
internships at IIDT APSSDC Blackbucks in AI-ML-DS and at Codsoft in domain of UI/UX design,
Technohacks in the domain of python development. she has acquired practical experience. Machine
Learning, and Artificial Intelligence are among her interests. She can be reached via email at
[email protected]

Mrs.Ganga Bhavani Billa is Research Scholar at college, Koneru Lakshmaiah Education


Foundation (KLEF) Green Fields, Vaddeswaram also Mrs. Ganga Bhavani Billa is Associate
Professor at college Bonam Venkata Chalamayya Engineering College, Odalarevu. She holds a
M.Tech degree in Computer Science and Engineering in GIET College, Rajahmundry. Her Research
areas are Machine Learning, Deep Learning and Artificial Intelligence. She has number of patents
related to machine learning field and industrial designs on her innovative ideas and has been awarded
with international patents and published different articles in international conferences.
She can be contacted at address:
Mrs.Ganga Bhavani Billa is Research Scholar at college, Koneru Lakshmaiah Education Foundation
(KLEF)Green Fields, Vaddeswaram, A.P. – 522302
Email: [email protected]
ORCID: https://orcid.org/0000-0003-1433-5832
ICTACT Journal on Soft Computing – Author’s Information Form

Paper ID : IJSC/4704

Paper Title : AN EFFICIENT ENHANCED INTRUSION DETECTION SYSTEM USING SVM

Author 1 Details

First Name : Krishna Sowjanya

Last Name : Akella

Designation : Student

Department : Artificial Intelligence and Machine Learning

College Name : BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE

University : JNTUK

Address : ODALAREVU

Email ID : [email protected]

Mobile/Phone No : 7386956365

Areas of Interest : Artificial Intelligence, Machine Learning, Deep Learning

Author 2 Details

First Name : Anantha Lakshmi

Last Name : Mekala

Designation : Student

Department : Artificial Intelligence and Machine Learning

College Name : BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE

University : JNTUK

Address : ODALAREVU

Email ID : [email protected]

Mobile/Phone No : 9573747956

Areas of Interest : Artificial Intelligence, Machine Learning, Deep Learning

Author 3 Details

First Name : Sai Harshitha

Last Name : Magapu

Designation : Student

ICT Academy
ICTACT Journal on Soft Computing – Author’s Information Form

Department : Artificial Intelligence and Machine Learning

College Name : BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE

University : JNTUK

Address : ODALAREVU

Email ID : [email protected]

Mobile/Phone No : 9391348752

Areas of Interest : Artificial Intelligence, Machine Learning, Deep Learning

Author 4 Details

First Name : Ganga Bhavani

Last Name : Billa

Designation : Associate Professor

Department : Computer Science and Machine Learning

College Name : BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE

University : JNTUK

Address : ODALAREVU

Email ID : [email protected]

Mobile/Phone No : 9603087788

Areas of Interest : Artificial Intelligence, Machine Learning, Deep Learning

ICT Academy
Page 1 of 15 - Cover Page Submission ID trn:oid:::1:3163686932

Ganga Bhavani
Intrusion
17

Economy

Institut Seni Indonesia Surakarta

Document Details

Submission ID

trn:oid:::1:3163686932 10 Pages

Submission Date 3,186 Words

Feb 24, 2025, 6:06 AM GMT+7


19,119 Characters

Download Date

Feb 24, 2025, 6:07 AM GMT+7

File Name

AN_EFFICIENT_ENHANCED_INTRUSION_DETECTION_SYSTEM_USING_SVM-.pdf

File Size

492.8 KB

Page 1 of 15 - Cover Page Submission ID trn:oid:::1:3163686932


Page 2 of 15 - Integrity Overview Submission ID trn:oid:::1:3163686932

16% Overall Similarity


The combined total of all matches, including overlapping sources, for each database.

Filtered from the Report


Bibliography

Quoted Text

Match Groups Top Sources

36 Not Cited or Quoted 15% 10% Internet sources


Matches with neither in-text citation nor quotation marks
14% Publications
4 Missing Quotations 1% 6% Submitted works (Student Papers)
Matches that are still very similar to source material

0 Missing Citation 0%
Matches that have quotation marks, but no in-text citation

0 Cited and Quoted 0%


Matches with in-text citation present, but no quotation marks

Page 2 of 15 - Integrity Overview Submission ID trn:oid:::1:3163686932


Page 3 of 15 - Integrity Overview Submission ID trn:oid:::1:3163686932

Match Groups Top Sources

36 Not Cited or Quoted 15% 10% Internet sources


Matches with neither in-text citation nor quotation marks
14% Publications
4 Missing Quotations 1% 6% Submitted works (Student Papers)
Matches that are still very similar to source material

0 Missing Citation 0%
Matches that have quotation marks, but no in-text citation

0 Cited and Quoted 0%


Matches with in-text citation present, but no quotation marks

Top Sources
The sources with the highest number of matches within the submission. Overlapping sources will not be displayed.

1 Internet

www.mdpi.com 1%

2 Publication

H.L. Gururaj, Francesco Flammini, J. Shreyas. "Data Science & Exploration in Artifi… 1%

3 Internet

fastercapital.com 1%

4 Publication

Arvind Dagur, Karan Singh, Pawan Singh Mehra, Dhirendra Kumar Shukla. "Artific… 1%

5 Internet

link.springer.com <1%

6 Internet

www.preprints.org <1%

7 Publication

Abhijeet Singh, Achyut Mishra, Ajit Antil, Bharat Bhushan, Anamika Chauhan. "An… <1%

8 Internet

vdoc.pub <1%

9 Student papers

Asia Pacific University College of Technology and Innovation (UCTI) <1%

10 Student papers

Glasgow Caledonian University <1%

Page 3 of 15 - Integrity Overview Submission ID trn:oid:::1:3163686932


Page 4 of 15 - Integrity Overview Submission ID trn:oid:::1:3163686932

11 Student papers

Adama Science and Technology University <1%

12 Publication

Al-Sakib Khan Pathan. "The State of the Art in Intrusion Prevention and Detection… <1%

13 Publication

Huiwen Wang, Jie Gu, Shanshan Wang. "An effective intrusion detection framewo… <1%

14 Student papers

University of North Texas <1%

15 Internet

www.diva-portal.org <1%

16 Internet

www.researchandmarkets.com <1%

17 Student papers

Jawaharlal Nehru Technological University <1%

18 Internet

www.springerprofessional.de <1%

19 Student papers

Leeds Beckett University <1%

20 Publication

Ping Li, Limin Zhang. "Application of big data technology in enterprise informatio… <1%

21 Publication

Zhi Xu, Jun Lu, Xin Wang, JiaHai Zhang, Mamoun Alazab, Vicente García Díaz. "AI a… <1%

22 Internet

arxiv.org <1%

23 Internet

ibc.org.in <1%

24 Internet

www.iieta.org <1%

Page 4 of 15 - Integrity Overview Submission ID trn:oid:::1:3163686932


Page 5 of 15 - Integrity Overview Submission ID trn:oid:::1:3163686932

25 Internet

www.ncbi.nlm.nih.gov <1%

26 Publication

Sidra Abbas, Shtwai Alsubai, Gabriel Avelino Sampedro, Muhammad Ibrar ul Haq… <1%

27 Publication

Vandana Mohindru Sood, Yashwant Singh, Bharat Bhargava, Sushil Kumar Naran… <1%

28 Publication

B. Sundaravadivazhagan, Sekar Mohan, Balakrishnaraja Rengaraju. "Recent Deve… <1%

Page 5 of 15 - Integrity Overview Submission ID trn:oid:::1:3163686932


Page 6 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932

AN EFFICIENT ENHANCED INTRUSION DETECTION SYSTEM USING SVM


Krishna Sowjanya Akella1, Anantha Lakshmi Mekala2, Sai Harshitha Magapu3, Ganga
Bhavani Billa4
1,2,3
Department of Artificial Intelligence and Machine Learning, Bonam Venkata Chalamayya Engineering College,
4
Department of Computer Science and Machine Learning, Bonam Venkata Chalamayya Engineering College, India

margin separation.
18
Abstract
An intrusion detection system (IDS) is necessary to
monitor network and system activities and identify malicious An Intrusion Detection System's (IDS) operation
behavior. Improving IDS accuracy is essential to lowering false within a network is depicted in the figure. The process
alarms and raising detection rates as computer connectivity grows. begins with a server transmitting packets to a router over
a network. Traffic is routed by the router to a firewall,
In order to enhance IDS performance, this work investigates
which blocks unwanted access. The Intrusion Detection
machine learning techniques, namely Support Vector Machine System (IDS) concurrently examines the traffic to look for
13
(SVM). The NSL-KDD dataset is used for assessment, and the irregularities or malicious behaviour. By examining the
13
findings indicate that SVM outperforms SVM in terms of accuracy packets that are moving through the system, a user keeps
and misclassification rates. In order to enhance intrusion detection an eye on network security. By identifying threats before
capabilities and ultimately improve network security, this study they compromise the system, this configuration improves
highlights the significance of efficient classification cybersecurity. In order to detect unwanted access and
methodologies in the analysis of large network traffic data.
Keywords: Machine Learning, Intrusion Detection, Malicious
Activity, Support Vector Machine, NSL-KDD Dataset, Network
Security Attack Classifier.

1. INTRODUCTION
Enhanced Intrusion Detection System refers to a
more sophisticated variant of a conventional Intrusion
Detection System (IDS) that utilizes more intricate
methods and algorithms to identify potential cyber threats
with greater accuracy and efficiency. Such systems often
16 integrate machine learning, behavioral analysis, and real-
time threat intelligence to recognize anomalies beyond
basic signature-based detection techniques. A system that
uses advanced techniques to recognize and tackle network
12 threats is termed as an enhanced Intrusion Detection
System (IDS). It is capable of monitoring threats, policy
11 breaches, and malicious actions on a network. An
7 safeguard network infrastructure, intrusion detection
Intrusion Detection System (IDS) is a security technology
7 systems (IDS) are essential. The work flow of the intrusion
that monitors for hostile activities or policy violations
detection system is as presented in the Figure -1.
within a computer network or its systems. By analyzing
traffic and alerting administrators to intervene, it helps in
identifying unauthorized access, potential threats, and Figure 1: Intrusion Detection System
unusual behaviors. For the preservation of network
security and the protection of critical data from Maonan Wang et al. [1], the SHAP approach enhances IDS
cyberattacks, an IDS is crucial. An Intrusion Detection interpretability while promoting more transparency and trust by
System (IDS) tracks network traffic, looking for irregular using SHAP to provide both local and global explanations for
activities and generating alerts when such activities occur. model choices. Ajmeera Kiran, et al [2], says that by examining
While detecting anomalies and reporting them is a system call patterns unique to each user's typical activity, IIDPS is
12 primary duty of an Intrusion Detection System (IDS), able to identify hostile behavior. Usman Shuaibu Musa et al. [3],
some IDSs can also respond to the discovery of hostile hybrid and ensemble machine learning classifiers outperform
activities or irregular traffic. In this context, we utilized single classifiers in intrusion detection systems, offering higher
4
8 the machine learning algorithm known as Support Vector detection rates and accuracy. Roberto Magán-Carrión et al. [4], the
Machine. A Support Vector Machine (SVM) is a main goal of this research is to develop the R-NIDS technique,
supervised learning model employed for both which combines many datasets to lessen overfitting and enhance
1 classification and regression analysis. It creates a the generalization and dependability of machine learning-based
1 hyperplane or a collection of hyperplanes in a high- network intrusion detection systems. Lan Liu, et al. [5], says that
27 dimensional space to distinguish between different Introduction of the DSSTE algorithm, which improves the
classes. SVMs are particularly effective for high- classification accuracy of intrusion detection systems by
dimensional spaces and scenarios that require clear addressing imbalanced network traffic through targeted expansion

Page 6 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932


Page 7 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932

of minority samples. Iftikhar Ahmad, et al. [6], says that The proposed method of this approach is given
According to this study, Extreme Learning Machines (ELM) are in Fig-2. Accuracy has been calculated and a graph has been
the best machine learning method for intrusion detection systems plotted based on the obtained results.
because they can handle big datasets with great recall, accuracy,
and precision. Murali A, et al. [7], says that in order to direct
future research toward creating a general intrusion detection
system (IDS) that can handle all kinds of attacks, this work will
examine and contrast current intrusion detection techniques in
order to determine their advantages and disadvantages. Zahedi
Azam, et al. [8], says that provide an overview of AI-based NIDS,
highlighting the advantages of DL over ML, their challenges in
real-time implementation, and open research issues for improving
intrusion detection systems. Ida Seraphim et al. [9], says that
combining deep learning and artificial neural networks with
22
traditional machine learning is a two-level approach to improve
the efficacy and accuracy of intrusion detection systems. Gan Xu-
4
sheng, et al. [10], says that the PLS–CVM approach enhances the
efficacy and efficiency of anomaly intrusion detection in large-
scale data by combining PLS for feature extraction with CVM for
quick modeling. Poulmanogo Illy, et al. [11], says that Using the
NSL-KDD dataset, ensemble learners enhance intrusion detection
and attack classification. A fog-cloud architecture is suggested for
quicker detection and more resource-intensive classification.
Amira Sayed A. Aziz, et al. [12], says that Future study will
concentrate on behavioral attack identification in regular traffic,
while simpler classifiers like NB excel in low-represented attacks.
A hybrid intrusion detection system employing multiple
classifiers increases detection accuracy across a variety of attack Fig-2: Proposed Method
classes. S. A. B. R. Mahajan et al. [13], says that future study,will
focus on feature selection and real-time implementation because
Random Tree is an efficient machine learning technique for real- 2.1 Intrusion Detection System utilizing SVM
time intrusion detection due to its high detection rate and quick
10
model building time. K. Azarudeen, et al. [14], says that NIDS A Machine Learning Approach This project creates an
for zero-day attacks can be improved with a deep learning intrusion detection system (IDS) based on the Support Vector
framework that uses RNNs to improve accuracy, precision, and Machine (SVM) algorithm; a supervised machine learning
recall. With the use of GPU acceleration, training times may be technique recognized for its effectiveness in classification tasks.
shortened. Mukesh Kumar Yadav, et al. [15], says that On the The dataset utilized in this study is preprocessed and analyzed to
NSL-KDD dataset, the ensemble model for intrusion detection identify various types of network intrusions.
achieves high accuracy across a range of attack types, surpassing
24
state-of-the-art approaches. Samir Fenanir et al. [16], says that a 2.2 Data Preprocessing along with Feature
machine learning-based lightweight intrusion detection model is Engineering
recommended for IoT security; decision trees (DT) outperform
4
other models in terms of accuracy and efficiency when tested on Several crucial preprocessing procedures are applied to the
the NSL-KDD dataset.. Kathryn-Ann Tait, et al. [17], says that
original dataset. To prepare nominal attributes for the SVM
machine learning's efficacy in intrusion detection, with KNN algorithm, they are transformed into binary representations. To
producing results that are almost flawless, and recommends maintain compatibility, non-numeric features that are not directly
investigating deep learning for potential advancements. Manjula applicable to the SVM are discarded. (Note: The image refers to
C. Belavagi, et al. [18], says that Using the NSL-KDD dataset, labeling into Normal, DoS, Probe, and R2L categories, but this
28 Random Forest classifier performs better than the others with
the information is not explicitly included in the supplied code. If this
99% accuracy in intrusion detection. Dong Seong Kim et al. [19], categorization takes place during data loading or in a distinct
1 that a network-based intrusion detection system based on
says preprocessing phase, it ought to be included.).
support vector machines (SVMs) has demonstrated its
effectiveness in detecting assaults on the 1999 KDD dataset.
2.3 Splitting of the data
2
Rashid Baimukashev, et al. [20], says that using a variety of
machine learning models to solve the intrusion detection problem,
23 NOG-LSTM achieving the highest accuracy for binary To guarantee a thorough assessment of the model's
2
with
6
classification (85.68%).The Intrusion Detection System is briefly performance on previously unknown data, the
explained in the following ways with the fields: the proposed train_test_split function from scikit-learn is used to divide
method is described in the Section 2 and the sub sections are the dataset into training and testing sets.
followed by the section 2, the obtained results and discussion is
present in the section 3 and also the conclusion is demonstrated in 2.4 Model Selection
the section 4.
14 The SVC class from scikit-learn is used to build an SVM
classifier, with a linear kernel used for this implementation. The
2. METHOD creation of probability estimates is made possible by using the

Page 7 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932


Page 8 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932

argument probability=True; they are essential for creating ROC


curves. To guarantee repeatability, a random state is established.

2.5 Model Evaluation and Performance Metrics

The trained SVM model is used to forecast the test set's


classes. Standard measures like the confusion matrix, which
3
compares the model's predictions to the actual labels, and the
2
classification report, which gives accuracy, recall, F1-score, and
26
support for each class, are used to assess the model's effectiveness.

15 2.6 ROC Curve and AUC

A Receiver Operating Characteristic (ROC) curve is created


in order to evaluate the classifier's performance in a more thorough Figure-4: Tested Data
5
manner. The roc_curve function computes the True Positive Rate
(TPR) and False Positive Rate (FPR) at different thresholds. The The evaluation metrics of a Support Vector Machine (SVM)
Area Under the Curve (AUC), which serves as a single indicator classifier with a Linear SVC (Support Vector Classification)
2the classifier's capacity to discriminate between classes, is then
of19 kernel, results are formatted in a structured manner, indicating the
203
calculated using the auc function. The ROC curve, which shows model's performance across multiple metrics is shown in fig-5.
the trade-off between TPR and FPR, is displayed using matplotlib.

2.7 Analysis of Feature Importance

By looking at the coefficients associated with the linear kernel, the


linear SVM assesses the significance of each feature. The
coefficients show the relative effect of each characteristic on the
decision boundary. Finding the most important features for
intrusion detection is made possible by a bar chart that shows
feature importances.

3. RESULTS AND DISCUSSION

The accuracy of an SVM with Linear SVC has been


assessed for 31493 occurrences, of which 16720 have been Fig-5: Performance Metrics of Linear SVM
classified as "Normal" and 14773 as "Attack." The SVM model
25
performed exceptionally well on every evaluation metric. The The information of the confusion matrix is displayed in
model's performance across a number of measures is indicated by Figure 6; the image shows a confusion matrix for a classification
the structured format of the evaluation metrics of Support Vector model, most likely the SVM Linear SVC model previously
3
Machine (SVM) classifier with a Linear SVC (Support Vector mentioned; the confusion matrix assesses the model's ability to
Classification) kernel result. Strong classification ability and low distinguish between two classes: "Normal" and "Attack." The
17
misclassification are indicators of the model's good performance, graph in Figure 7 displays a Receiver Operating Characteristic
as seen by the high values for each of these metrics. Figure [3]
and Figure [4] display the 31493 cases that have been separated
into training and testing data.

(ROC) curve for a Linear SVC (Support Vector Classifier) model.


9 The ROC curve plots the True Positive Rate (TPR) against the
Figure-3: Trained Data False Positive Rate (FPR) in order to assess the performance of a
classification model.

Fig-6: Confusion matrix between Normal and Attack

Page 8 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932


Page 9 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932

 Confusion Matrix Breakdown 10.1109/ICCCI56745.2023.10128363

[3] Usman Shuaibu Musa, "Intrusion Detection System using Machine


True Positives (Attack correctly classified as Attack): 14,467 Learning Techniques: A Review”, IEEE, 2020 International
True Negatives (Normal correctly classified as Normal): 16,422 Conference on Smart Electronics and Communication (ICOSEC),
False Positives (Normal misclassified as Attack): 298 DOI: 10.1109/ICOSEC49089.2020.9215333
False Negatives (Attack misclassified as Normal): 306
[4] Roberto Magán-Carrión, "Improving the Reliability of Network
The curve is situated quite near the top-left corner, signifying Intrusion Detection Systems Through Dataset Integration", IEEE
a highly effective classifier. The AUC (Area Under the Curve) (Volume:10),Pages:1717-1732,DOI: 10.1109/TETC.2022.3178283
value is 0. 99, which is outstanding and indicates that the model
[5] Lan Liu, “Intrusion Detection of Imbalanced Network Traffic Based
possesses an exceptional capability to differentiate between the
on Machine Learning and Deep Learning”, IEEE Access (Volume:
classes. An almost flawless AUC score indicates that the model 9),2020,Page(s):7550–7563,DOI: 10.1109/ACCESS.2020.3048198
exhibits high sensitivity (recall) and specificity, rendering it
extremely dependable for classification. An ideal classifier would [6] Iftikhar Ahmad, "Performance Comparison of Support Vector
achieve an AUC of 1. 0, indicating it accurately classifies all Machine, Random Forest, and Extreme Learning Machine for
positives and negatives. Intrusion Detection”, IEEE (Volume:6), Pages:33789-33795, DOI:
10.1109/ACCESS.2018.2841987

[7] Murali A, "A Survey on Intrusion DetectionApproaches", IEEE,


First International Conference Information and Communication
Technologies, Karachi, Pakistan, 2005, pages: 233–240, DOI:
10.1109/ICICT.2005.1598592

[8] Zahedi Azam, "Comparative Analysis of Intrusion Detection


Systems and Machine Learning-Based Model Analysis Through
Decision Tree", IEEE (Volume: 11), Pages: 80348 - 80391, DOI:
10.1109/ACCESS.2023.3296444

[9] B.Ida Seraphim, "A Survey on Machine Learning Techniques in


Network Intrusion Detection System", IEEE, 2018 4th International
Conference on Computing Communication and Automation
(ICCCA), Greater Noida, India, December 2018, DOI:
10.1109/CCAA.2018.8777596

[10] Gan Xu-sheng," Anomaly intrusion detection based on PLS feature


Fig-7. ROC curve for a Linear SVC extraction and core vector machine", Knowledge-Based Systems,
Volume40,March2013,Pages1-6,DOI:
4. CONCLUSION 10.1016/j.knosys.2012.09.004

Intrusion detection and prevention are necessary in light [11] Poulmanogo Illy, “Securing Fog-to-Things Environment
Using Intrusion Detection System Based On Ensemble
of current developments. Detecting and preventing breaches is
Learning”, 2019 IEEE Wireless Communications and
essential since our routine events rely significantly on networks
NetworkingConference(WCNC),DOI:
and information systems. Intrusion detection systems have used a 10.1109/WCNC.2019.8885534
range of techniques. Among these is machine learning, which is
essential. Machine-learning methods like SVM are examined in [12] Amira Sayed A. Aziz, "Comparison of classification techniques
this study, which suggests handling 31493 examples. To improve applied for network intrusion detection and classification", Journal
accuracy in upcoming work with massive data sets, a hybrid multi- of Applied Logic, Volume 24, Part A, November 2017, Pages 109-
21 model will be created. It involves creating a more efficient
level 118, DOI: 10.1016/j.jal.2016.11.018
model based on well-structured classifiers that are better able to
classify new threats.
[13] S. A. B. R. Mahajan, "Machine Learning for Intrusion Detection",
Journal of Information Security and Applications (2017),
5. ACKNOWLEDGEMENTS University of Pune, India, Volume: 35, Pages: 1-13, DOI:
10.1016/j.jisa.2017.03.005.
The Bonam Venkata Chalamayya group of institutions
provided support for this study. The authors express their gratitude [14] K. Azarudeen, "Intrusion Detection System Using Machine
to B. Ganga Bhavani Mam for her essential support and guidance Learning by RNN Method", E3S Web Conf., Volume 491, 2024
during this work. International Conference on Environmental Development Using
Computer Science (ICECS’24), Pages (10), DOI:
10.1051/e3sconf/202449104012
REFERENCES
[15] Mukesh Kumar Yadav, "Enhancement of Intrusion Detection
[1] Maonan Wang, "An Explainable Machine Learning Framework for System using Machine Learning", IJERT, Central Research
IntrusionDetectionSystems”,IEEEAccess(Volume:8),pages:73127 Laboratory Bharat Electronics Limited Ghaziabad, India, Volume
-73141,DOI: 10.1109/ACCESS.2020.2988359 12, Issue 01 (January 2023), DOI: 10.17577/IJERTV12IS010058

[2] Ajmeera Kiran, "Intrusion Detection System Using Machine


Learning", IEEE, 2023 International Conference on Computer [16] Samir Fenanir, "A Machine Learning-Based Lightweight Intrusion
Communication and Informatics (ICCCI), January 2023, DOI: Detection System for the Internet of Things", IIETA, 2019, Page:203-211,

Page 9 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932


Page 10 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932

DOI: 10.18280/ria.330306

[17] Kathryn-Ann Tait, “Intrusion Detection using Machine Learning


Techniques: An Experimental Comparison”, Research Gate, May
2021, DOI:10.48550/arXiv.2105.13435

[18] Manjula C. Belavagi, “Performance Evaluation of Supervised


Machine Learning Algorithms for Intrusion Detection”,
ScienceDirect, Twelfth International Multi-Conference on
Information Processing-2016 (IMCIP-2016), DOI:
10.1016/j.procs.2016.06.016

[19] Dong Seong Kim, “Network-Based Intrusion Detection with


Support Vector Machines”, Springer Nature Link, International
Conference on Information Networking, Pages 747–756, DOI:
10.1007/978-3-540-45235-5_73

[20] Rashid Baimukashev, "Intrusion Detection System for Wireless


Networks”, 2021 16th International Conference on Electronics
Computer and Computation (ICECCO), Kaskelen, Kazakhstan,
DOI: 10.1109/ICECCO53203.2021.9663787

Page 10 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932


Page 11 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932

BIOGRAPHIES OF AUTHORS:

Krishna Sowjanya Akella has a diploma in Electronics and Communication Engineering


and is currently pursuing her third year of B. Tech in the Artificial Intelligence and Machine Learning
domain at Bonam Venkata Chalamayya Engineering College in Odalarevu. She has gained practical
experience through internships at IIDT-APSCHE Blackbucks in AIML and APSSDC-Edunet
Foundation. Her areas of interest encompass artificial intelligence, machine learning, and data
analysis. She can be reached via email at [email protected]

Anantha Lakshmi Mekala has completed her Intermediate Studies at Sri Chaitanya Junior
College in Amalapuram and now she is presently pursuing a three-year B. Tech in the field of
Artificial Intelligence and Machine Learning at Bonam Venkata Chalamayya Engineering College in
Odalarevu. Through internships at IIDT APSSDC Blackbucks in AI-ML-DS and at Codsoft in domain
of UI/UX design, Techno hacks in the domain of python development. She has acquired practical
experience. Machine Learning, and Artificial Intelligence are among her interests. She can be reached
via email at [email protected]

Sai Harshitha Magapu completed her Intermediate Studies at Aditya Junior College in
Mandapeta and now she is presently pursuing a three-year B.Tech in the field of Artificial Intelligence
and Machine Learning at Bonam Venkata Chalamayya Engineering College in Odalarevu. Through
internships at IIDT APSSDC Blackbucks in AI-ML-DS and at Codsoft in domain of UI/UX design,
Technohacks in the domain of python development. she has acquired practical experience. Machine
Learning, and Artificial Intelligence are among her interests. She can be reached via email at
[email protected]

Mrs.Ganga Bhavani Billa is Research Scholar at college, Koneru Lakshmaiah Education


Foundation (KLEF) Green Fields, Vaddeswaram also Mrs. Ganga Bhavani Billa is Associate
Professor at college Bonam Venkata Chalamayya Engineering College, Odalarevu. She holds a
M.Tech degree in Computer Science and Engineering in GIET College, Rajahmundry. Her Research
areas are Machine Learning, Deep Learning and Artificial Intelligence. She has number of patents
related to machine learning field and industrial designs on her innovative ideas and has been awarded
with international patents and published different articles in international conferences.
She can be contacted at address:
Mrs.Ganga Bhavani Billa is Research Scholar at college, Koneru Lakshmaiah Education Foundation
(KLEF)Green Fields, Vaddeswaram, A.P. – 522302
Email: [email protected]
ORCID: https://orcid.org/0000-0003-1433-5832

Page 11 of 15 - Engrega de integridad Submission ID trn:oid:::1:3163686932

You might also like