Wołoszyn, JacekWołoszyn, Michał2026-03-272026-03-272025-12Dydaktyka Informatyki T. 20 (2025), s. 142-155978-83-8277-320-02083-3156https://repozytorium.ur.edu.pl/handle/item/12328In this article, One-Class SVM has been highlighted as a particularly valuable approach, as it does not require collecting large datasets of labeled attack samples. Instead, it effectively models normal behavior and identifies significant deviations from the expected pattern. Both theoretical considerations and a Python code example have been presented, demonstrating how such a model can be trained on real or synthetic network data and subsequently used to detect potential anomalies. Additionally, the text includes guidelines for data preparation, covering collection, cleaning, normalization, and potential dimensionality reduction, as well as hyperparameter optimization (including nu and gamma). Furthermore, a mathematical perspective is provided, explaining the role of the weight vector (w), the threshold value (R), and the kernel function, which enables nonlinear mapping and the separation of normal samples from outliers.W niniejszym artykule skupiono się na One-Class SVM jako szczególnie wartościowym podejściu, gdyż nie wymaga ono gromadzenia dużych zbiorów etykietowanych próbek ataków, natomiast potrafi opisać normalne zachowania i rozpoznać każde istotne odchylenie od wzorca. Przedstawiono rozważania teoretyczne i zaprezentowano przykład kodu w Pythonie demonstrujący, w jaki sposób można w praktyce trenować taki model na rzeczywistych lub syntetycznych danych sieciowych, a następnie wykorzystywać go do oznaczania potencjalnych anomalii. W tekście zawarto ponadto wskazówki dotyczące przygotowania danych (od zbierania poprzez czyszczenie, normalizację i ewentualną redukcję wymiarowości), jak również optymalizacji hiperparametrów (m.in. nu, gamma). Omówiono też, w ujęciu matematycznym, na czym polega rola wektora w, wartości progowej R oraz funkcji jądra (kernel), która umożliwia nieliniowe odwzorowanie i oddzielenie normalnych próbek od odstających.engAttribution-NonCommercial-NoDerivatives 4.0 Internationalhttp://creativecommons.org/licenses/by-nc-nd/4.0/Pythonartificial intelligencecybersecurityOne-Class SVMsztuczna inteligencjacyberbezpieczeństwoTheoretical Considerations on Artificial Intelligence and Cybersecurity, One-Class SVM for Anomaly Detection in Network TrafficRozważania teoretyczne na temat sztucznej inteligencji i cyberbezpieczeństwa, One-Class SVM do wykrywania anomalii w ruchu sieciowymarticle10.15584/di.2025.20.162543-9847