# gauravgoel1978/random_forest_network_usecase architecture

> Architecture diagram of the GitHub repository gauravgoel1978/random_forest_network_usecase, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gauravgoel1978/random_forest_network_usecase
- Repository: https://github.com/gauravgoel1978/random_forest_network_usecase

## Overview

This is a single-file Junos DDoS detection demonstration, not a live telemetry collector: it synthesizes normal and attack telemetry, combines the samples, and trains a Random Forest. The script also contains model evaluation and visualization, including a PCA decision-boundary view, and defines example router scenarios. The excerpt does not show the complete training, evaluation, or scenario-scoring code, so those connections are marked unverified rather than presented as confirmed runtime calls.

Main entry points: [`junos_ddos_random_forest.py`](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py) (Combined Dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Telemetry Data"]
  node_normal["Normal Samples"]
  node_attack["Attack Samples"]
  node_dataset["Combined Dataset"]
  node_scenarios["Router Scenarios"]
end

subgraph group_model["Detection Model"]
  node_forest["Random Forest"]
end

subgraph group_analysis["Model Analysis"]
  node_evaluation["Model Evaluation"]
  node_plots["Evaluation Plots"]
  node_pca["PCA Boundary"]
end

node_operator(("Analyst"))

node_normal -->|"concatenates into"| node_dataset
node_attack -->|"concatenates into"| node_dataset
node_dataset -.->|"trains on"| node_forest
node_forest -.->|"evaluated by"| node_evaluation
node_evaluation -.->|"visualizes results"| node_plots
node_dataset -->|"projects features"| node_pca
node_operator -.->|"reviews"| node_plots

click node_normal "https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py"
click node_attack "https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py"
click node_dataset "https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py"
click node_forest "https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py"
click node_evaluation "https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py"
click node_plots "https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py"
click node_pca "https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py"
click node_scenarios "https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py"

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_normal,node_attack,node_dataset,node_scenarios toneBlue
class node_forest toneAmber
class node_evaluation,node_plots,node_pca toneMint
class node_operator toneIndigo
```

## Components

### Telemetry Data

- [Normal Samples](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py): `junos_ddos_random_forest.py`
- [Attack Samples](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py): `junos_ddos_random_forest.py`
- [Combined Dataset](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py): `junos_ddos_random_forest.py`
- [Router Scenarios](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py): `junos_ddos_random_forest.py`

### Detection Model

- [Random Forest](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py): `junos_ddos_random_forest.py`

### Model Analysis

- [Model Evaluation](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py): `junos_ddos_random_forest.py`
- [Evaluation Plots](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py): `junos_ddos_random_forest.py`
- [PCA Boundary](https://github.com/gauravgoel1978/random_forest_network_usecase/blob/main/junos_ddos_random_forest.py): `junos_ddos_random_forest.py`

### Other components

- **Analyst**

## Connections

- Normal Samples → Combined Dataset: concatenates into (evidence: `junos_ddos_random_forest.py`)
- Attack Samples → Combined Dataset: concatenates into (evidence: `junos_ddos_random_forest.py`)
- Combined Dataset → Random Forest: trains on (evidence: `junos_ddos_random_forest.py`)
- Random Forest → Model Evaluation: evaluated by (evidence: `junos_ddos_random_forest.py`)
- Model Evaluation → Evaluation Plots: visualizes results (evidence: `junos_ddos_random_forest.py`)
- Combined Dataset → PCA Boundary: projects features (evidence: `junos_ddos_random_forest.py`)
- Analyst → Evaluation Plots: reviews
