How stephanyrajeh/tgf works
TGF is a research workflow for detecting random link anomalies: preprocess link-stream datasets, inject labeled anomalies when ground truth is unavailable, generate history-graph features, and train/test classifiers. The README documents H- and G-type histories, combined feature sets, bipartite and unipartite handling, and large-network/sliding-window variants. The tree and sampled feature-generation source support the feature stage; learning and preprocessing internals are represented at their documented subsystem level because their implementations were not sampled.
Main entry points: main.py Feature CLI · 1-PreprocessingOfDatasets Raw Datasets · 2-Injection Anomaly Injection · ClassicalLearning Classical Learning
Components 16
Preprocessing
- Raw Datasets
1-PreprocessingOfDatasets - Stream Cleaning
1-PreprocessingOfDatasets
Anomaly Injection
- Anomaly Injection
2-Injection - Injected Streams
2-Injection
Feature Generation
- Feature CLI
3-FeatureGeneration/main.py - Dynamic Counters
3-FeatureGeneration/DSC_lib.py - Feature Records
Learning and Testing
- H Histories
4-LearningAndTesting/HTypeHistoryGraphs - G Histories
4-LearningAndTesting/GTypeHistoryGraphs - Combined Histories
4-LearningAndTesting/CombiningHandGTypeHistoryGraphs - Combined H Histories
4-LearningAndTesting/CombiningHTypeHistoryGraphs - Combined G Histories
4-LearningAndTesting/CombiningGTypeHistoryGraphs - Classical Learning
4-LearningAndTesting-LargeNetworks/ClassicalLearning - Sliding Windows
4-LearningAndTesting-LargeNetworks/SlidingWindowsLearning
Other components
- Researcher
- Detection Results
Connections 16
- Researcher → Raw Datasets: supplies datasets
- Raw Datasets → Stream Cleaning: preprocesses as
- Stream Cleaning → Anomaly Injection: provides stream
- Anomaly Injection → Injected Streams: writes labeled stream
- Injected Streams → Feature CLI: streams input
- Feature CLI → Dynamic Counters: uses counters
- Feature CLI → Feature Records: emits features
- Feature Records → H Histories: trains and tests
- Feature Records → G Histories: trains and tests
- Feature Records → Combined Histories: trains and tests
- Feature Records → Combined H Histories: trains and tests
- Feature Records → Combined G Histories: trains and tests
- Feature Records → Classical Learning: supports learning
- Feature Records → Sliding Windows: supports windowed learning
- Classical Learning → Detection Results: detects anomalies
- Sliding Windows → Detection Results: tests in chunks