This repository contains an experiment using Differential Privacy (DP) with the Opacus library on the UNSW-NB15 network security dataset.
This notebook compares the performance of a baseline model and a differentially private model using PyTorch.
- Data preprocessing (SMOTE, normalization)
- Model training (Baseline and DP)
- Evaluation (Accuracy, Confusion Matrix)
- Epsilon (ε) calculation using Opacus
After opening in Colab, run the following command in the first code cell to install required packages:
!pip install torch torchvision opacus scikit-learn imbalanced-learn
The UNSW-NB15 dataset is not included in this repository. Please upload it manually when using Colab.
The notebook includes both baseline and differentially private model evaluation using ε metrics.