# vprayagala/anomalydetection-using-ae architecture

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

- Interactive diagram: https://gitdiagram.com/vprayagala/anomalydetection-using-ae
- Repository: https://github.com/vprayagala/anomalydetection-using-ae

## Overview

This repository is an early log-analysis prototype. Its main script sketches a workflow from JSON-log loading and feature preparation through autoencoder training, reconstruction-error thresholding, and anomaly visualization. Separate utilities provide JSON reading, preprocessing, neural-network and one-class SVM anomaly methods, and time-series forecasting. The README gives no product overview; notably, the script imports legacy utility module names that do not match the files in the tree, so links to those utilities are not asserted.

Main entry points: [`Source/JSON_Log_Anomaly_V1.0.py`](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py) (Analysis script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Log anomaly workflow"]
  node_main["Analysis script"]
  node_prep["Log preprocessing"]
  node_autoencoder["Autoencoder training"]
  node_threshold["Error thresholding"]
  node_visualization["Anomaly visualization"]
end

subgraph group_utilities["Log analysis utilities"]
  node_jsonreader["JSON log reader<br/>[ReadJsonFile.py]"]
  node_preprocessutil["Preprocessing utilities<br/>[PreProcessData.py]"]
  node_anomalymethods["Anomaly methods"]
end

subgraph group_forecast["Time-series forecasting"]
  node_forecasting["Time-series forecasting<br/>[TSForecast.py]"]
end

node_main -->|"prepares logs"| node_prep
node_main -->|"trains model"| node_autoencoder
node_main -->|"thresholds errors"| node_threshold
node_main -->|"plots anomalies"| node_visualization

click node_main "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py"
click node_prep "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py"
click node_autoencoder "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py"
click node_threshold "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py"
click node_visualization "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py"
click node_jsonreader "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/util/ReadJsonFile.py"
click node_preprocessutil "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/util/PreProcessData.py"
click node_anomalymethods "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/util/AnomalyDetection.py"
click node_forecasting "https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/util/TSForecast.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_main,node_prep,node_autoencoder,node_threshold,node_visualization toneBlue
class node_jsonreader,node_preprocessutil,node_anomalymethods toneAmber
class node_forecasting toneMint
```

## Components

### Log anomaly workflow

- [Analysis script](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py): `Source/JSON_Log_Anomaly_V1.0.py`
- [Log preprocessing](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py): `Source/JSON_Log_Anomaly_V1.0.py`
- [Autoencoder training](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py): `Source/JSON_Log_Anomaly_V1.0.py`
- [Error thresholding](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py): `Source/JSON_Log_Anomaly_V1.0.py`
- [Anomaly visualization](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/JSON_Log_Anomaly_V1.0.py): `Source/JSON_Log_Anomaly_V1.0.py`

### Log analysis utilities

- [JSON log reader](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/util/ReadJsonFile.py): `Source/util/ReadJsonFile.py`
- [Preprocessing utilities](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/util/PreProcessData.py): `Source/util/PreProcessData.py`
- [Anomaly methods](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/util/AnomalyDetection.py): `Source/util/AnomalyDetection.py`

### Time-series forecasting

- [Time-series forecasting](https://github.com/vprayagala/anomalydetection-using-ae/blob/master/Source/util/TSForecast.py): `Source/util/TSForecast.py`

## Connections

- Analysis script → Log preprocessing: prepares logs (evidence: `Source/JSON_Log_Anomaly_V1.0.py`)
- Analysis script → Autoencoder training: trains model (evidence: `Source/JSON_Log_Anomaly_V1.0.py`)
- Analysis script → Error thresholding: thresholds errors (evidence: `Source/JSON_Log_Anomaly_V1.0.py`)
- Analysis script → Anomaly visualization: plots anomalies (evidence: `Source/JSON_Log_Anomaly_V1.0.py`)
