Practical Implementation of Artificial Intelligence in Cybersecurity, One-Class SVM for Anomaly Detection in Network Traffic

Authors

DOI:

https://doi.org/10.15584/di.2025.20.17

Keywords:

Python, artificial intelligence, cybersecurity, One-Class SVM

Abstract

The presented material provides a detailed discussion on the implementation of One-Class SVM in Python, including code examples and a sample CSV file containing network flow parameters such as duration, number of packets, and packet sizes. This is a continuation of the article Theoretical Considerations on Artificial Intelligence and Cybersecurity: One-Class SVM for Anomaly Detection in Network Traffic. The authors emphasize the necessity of removing the label column during training, as One-Class SVM is designed to identify anomalous observations based solely on a dataset of normal behavior. The text outlines the key stages of working with the model, including data loading, splitting into training and test sets, scaling, model initialization, and evaluation of results using metrics such as Precision, Recall, and F1-score. It is noted that model evaluation in laboratory conditions may be misleading if only a small number of samples are available. The article also discusses hyperparameter tuning (nu, gamma) and explores potential extensions, including combining One-Class SVM with other algorithms, integration with SIEM systems, and the implementation of real-time streaming data processing.

Downloads

Download data is not yet available.

Downloads

Published

2025-12-31

How to Cite

Wołoszyn, J., & Wołoszyn, M. (2025). Practical Implementation of Artificial Intelligence in Cybersecurity, One-Class SVM for Anomaly Detection in Network Traffic. DIDACTICS OF INFORMATION TECHNOLOGY, 20, 195–206. https://doi.org/10.15584/di.2025.20.17

Issue

Section

ICT TOOLS IN PRACTICE

Most read articles by the same author(s)

1 2 > >>