# rpcodes121/flow-based-ml-ids architecture

> Architecture diagram of the GitHub repository rpcodes121/flow-based-ml-ids, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rpcodes121/flow-based-ml-ids
- Repository: https://github.com/rpcodes121/flow-based-ml-ids

## Overview

This repository is a notebook-based research project for flow-based machine-learning intrusion detection, rather than a packaged runtime service. Its tree suggests stages for dataset analysis, feature preparation, model training and threshold calibration. The README gives no workflow details, and the sampled source contains only dependencies, so connections between notebooks and data or models cannot be verified; the graph therefore groups the main activities without asserting their wiring.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Data analysis"]
  node_eda["Exploratory analysis"]
  node_cleaning["Data cleaning"]
  node_dataset_setup["Dataset setup"]
end

subgraph group_features["Feature preparation"]
  node_preprocess["Preprocessing"]
  node_normalization["Normalization"]
  node_pruning["Feature pruning<br/>[pruning.ipynb]"]
  node_feature_importance["Feature importance"]
end

subgraph group_training["Model training"]
  node_mlp["MLP training<br/>[MLP_train.ipynb]"]
  node_svm["SVM training<br/>[svm_train.ipynb]"]
  node_tabnet["TabNet training<br/>[train_tabnet.ipynb]"]
  node_xgboost["XGBoost training"]
  node_xgb_tuning["XGBoost tuning<br/>[tuning.ipynb]"]
end

subgraph group_calibration["Threshold calibration"]
  node_tabnet_calibration["TabNet calibration<br/>[calibration.ipynb]"]
  node_xgb_calibration["XGBoost calibration"]
end

click node_eda "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/analysis/cicIds2018/prelim_analysis.ipynb"
click node_cleaning "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/analysis/data_cleaning.ipynb"
click node_dataset_setup "https://github.com/rpcodes121/flow-based-ml-ids/tree/main/analysis"
click node_preprocess "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/data_related/full_feat_preprocess.ipynb"
click node_normalization "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/data_related/normalization.ipynb"
click node_pruning "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/data_related/pruning.ipynb"
click node_feature_importance "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/data_related/feature_imp_calc.ipynb"
click node_mlp "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/MLP/MLP_train.ipynb"
click node_svm "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/svm/svm_train.ipynb"
click node_tabnet "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/tabnet/train_tabnet.ipynb"
click node_xgboost "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/xgboost/xgboost_train.ipynb"
click node_xgb_tuning "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/tuning/xgboost/tuning.ipynb"
click node_tabnet_calibration "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/Threshold_calibration/tabnet/calibration.ipynb"
click node_xgb_calibration "https://github.com/rpcodes121/flow-based-ml-ids/blob/main/Threshold_calibration/xgboost/calibration_fullSet.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_eda,node_cleaning,node_dataset_setup toneBlue
class node_preprocess,node_normalization,node_pruning,node_feature_importance toneAmber
class node_mlp,node_svm,node_tabnet,node_xgboost,node_xgb_tuning toneMint
class node_tabnet_calibration,node_xgb_calibration toneRose
```

## Components

### Data analysis

- [Exploratory analysis](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/analysis/cicIds2018/prelim_analysis.ipynb): `analysis/cicIds2018/prelim_analysis.ipynb`
- [Data cleaning](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/analysis/data_cleaning.ipynb): `analysis/data_cleaning.ipynb`
- [Dataset setup](https://github.com/rpcodes121/flow-based-ml-ids/tree/main/analysis): `analysis`

### Feature preparation

- [Preprocessing](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/data_related/full_feat_preprocess.ipynb): `models/data_related/full_feat_preprocess.ipynb`
- [Normalization](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/data_related/normalization.ipynb): `models/data_related/normalization.ipynb`
- [Feature pruning](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/data_related/pruning.ipynb): `models/data_related/pruning.ipynb`
- [Feature importance](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/data_related/feature_imp_calc.ipynb): `models/data_related/feature_imp_calc.ipynb`

### Model training

- [MLP training](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/MLP/MLP_train.ipynb): `models/MLP/MLP_train.ipynb`
- [SVM training](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/svm/svm_train.ipynb): `models/svm/svm_train.ipynb`
- [TabNet training](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/tabnet/train_tabnet.ipynb): `models/tabnet/train_tabnet.ipynb`
- [XGBoost training](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/models/xgboost/xgboost_train.ipynb): `models/xgboost/xgboost_train.ipynb`
- [XGBoost tuning](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/tuning/xgboost/tuning.ipynb): `tuning/xgboost/tuning.ipynb`

### Threshold calibration

- [TabNet calibration](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/Threshold_calibration/tabnet/calibration.ipynb): `Threshold_calibration/tabnet/calibration.ipynb`
- [XGBoost calibration](https://github.com/rpcodes121/flow-based-ml-ids/blob/main/Threshold_calibration/xgboost/calibration_fullSet.ipynb): `Threshold_calibration/xgboost/calibration_fullSet.ipynb`
