Tabular Classification
Scikit-learn
English
malware-detection
network-security
random-forest
intrusion-detection
cybersecurity
Instructions to use Sakni-Tasnim/network-threat-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Sakni-Tasnim/network-threat-detector with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Sakni-Tasnim/network-threat-detector", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
π‘οΈ Network Threat Detector : Trained Models
Pre-trained models for the AI Network Threat Detector project a full-stack Intrusion Detection System (IDS) trained on the UNSW-NB15 network traffic dataset.
π§ Models
Model 1 : Binary Classifier (model1_binary.pkl)
Detects whether network traffic is normal or malicious.
| Metric | Score |
|---|---|
| Accuracy | 90% |
| F1 (weighted) | 0.90 |
| Training samples | 175,341 |
Model 2 : Multi-Class Classifier (model2_multiclass.pkl)
Identifies the attack type across 9 categories.
| Metric | Score |
|---|---|
| Accuracy | 76% |
| F1 (weighted) | 0.77 |
| Classes | DoS, Exploits, Fuzzers, Generic, Reconnaissance, Backdoor, Analysis, Shellcode, Worms |
π¦ Files
| File | Description |
|---|---|
model1_binary.pkl |
Random Forest binary classifier |
model2_multiclass.pkl |
Random Forest multi-class classifier |
encoders.pkl |
Feature encoders |
le_attack.pkl |
Label encoder for attack types |
scaler.pkl |
StandardScaler for feature normalization |
ποΈ Dataset
UNSW-NB15 University of New South Wales network traffic dataset 175,341 samples | 9 attack categories | Real network flows
π Usage
import joblib
import pandas as pd
# Load models
binary_model = joblib.load('model1_binary.pkl')
multiclass_model = joblib.load('model2_multiclass.pkl')
scaler = joblib.load('scaler.pkl')
encoders = joblib.load('encoders.pkl')
# Scale features
X_scaled = scaler.transform(your_features)
# Step 1 : detect if malicious
is_malware = binary_model.predict(X_scaled)
# Step 2 : classify attack type
attack_type = multiclass_model.predict(X_scaled)
π Full Project
For the complete source code, frontend, and API: π github.com/Sakni-Tasnim/ai-network-threat-detector
π€ Author
Sakni Tasnim Telecommunications & Computer Engineering Student
π GitHub β’ LinkedIn
- Downloads last month
- -