How khicklin23/ids-ml-project works
IDS-ML-Project is an educational intrusion-detection simulation: seeded synthetic flows become model-ready features, separately trained detectors and classifiers produce predictions, and evaluation and analyst workspaces make results inspectable. The principal workflow runs through the Streamlit workbench or the documented static dashboard; the Python pipeline also supports generating, training, evaluating, and saving artifacts. Groups preserve the documented data lab, replay, incident review, robustness, open-set, and model-version capabilities. Some unsampled links are omitted rather than inferred.
Main entry points: state.py Workbench state · features.py Feature preparation · generator.py Flow generator · train.py Model training
Components 26
Synthetic data
- Traffic scenarios
src/ids_ml/data/scenarios.py - Flow generator
src/ids_ml/data/generator.py - Flow schema
src/ids_ml/data/schema.py
Modeling
- Feature preparation
src/ids_ml/features.py - Model training
src/ids_ml/models/train.py - Neural classifier
src/ids_ml/models/classifier.py - Session sequences
src/ids_ml/models/sessions.py - GRU model
src/ids_ml/models/sequence.py
Detection analysis
- Model inference
src/ids_ml/inference.py - Rule baseline
src/ids_ml/baseline.py - Metrics and evaluation
src/ids_ml/models/evaluate.py - Alert aggregation
src/ids_ml/alerts.py - Detection replay
src/ids_ml/replay.py - Open-set handling
src/ids_ml/openset.py - Robustness analysis
src/ids_ml/robustness.py - Model versions
src/ids_ml/versions.py - Static report
src/ids_ml/report.py - Experiment pipeline
src/ids_ml/pipeline.py
Analyst workspaces
- Workbench state
src/ids_ml/app/state.py - Workbench pages
src/ids_ml/app/pages - Shared UI components
src/ids_ml/app/components.py - Charts and theme
src/ids_ml/app/theme.py
Static dashboard
- Browser dashboard
ui/app.js - Bundled results
ui/data.mjs
Other components
- Analyst
- Pipeline operator
Connections 36
- Analyst → Workbench pages: uses
- Workbench pages → Workbench state: updates workflow
src/ids_ml/app/Home.py - Workbench pages → Shared UI components: uses
src/ids_ml/app/pages/alert_investigation.py - Workbench pages → Charts and theme: uses
src/ids_ml/app/pages/overview.py - Workbench state → Flow generator: generates flows
src/ids_ml/app/state.py - Workbench state → Model training: trains model
src/ids_ml/app/state.py - Workbench state → Metrics and evaluation: evaluates model
src/ids_ml/app/state.py - Workbench state → Rule baseline: runs comparison
src/ids_ml/app/state.py - Workbench state → Model inference: scores flows
src/ids_ml/app/state.py - Workbench state → Detection replay: runs replay
src/ids_ml/app/state.py - Workbench state → Alert aggregation: builds alerts
src/ids_ml/app/state.py - Flow generator → Traffic scenarios: creates scenarios
src/ids_ml/data/generator.py - Flow generator → Flow schema: uses schema
src/ids_ml/data/generator.py - Feature preparation → Flow schema: reads feature definitions
src/ids_ml/features.py - Model training → Feature preparation: uses preprocessing
src/ids_ml/models/train.py - Model training → Neural classifier: constructs network
src/ids_ml/models/train.py - Model inference → Feature preparation: transforms flows
src/ids_ml/inference.py - Model inference → Metrics and evaluation: gets predictions
src/ids_ml/inference.py - Model inference → Model training: loads artifact
src/ids_ml/inference.py - Session sequences → Feature preparation: transforms flows
src/ids_ml/models/sessions.py - GRU model → Metrics and evaluation: uses metrics
src/ids_ml/models/sequence.py - Open-set handling → Feature preparation: uses preprocessing
src/ids_ml/openset.py - Open-set handling → Metrics and evaluation: uses metrics
src/ids_ml/openset.py - Robustness analysis → Flow generator: uses generated data
src/ids_ml/robustness.py - Robustness analysis → Feature preparation: uses preprocessing
src/ids_ml/robustness.py - Robustness analysis → Metrics and evaluation: measures performance
src/ids_ml/robustness.py - Model versions → GRU model: compares sequence model
src/ids_ml/versions.py - Model versions → Model training: trains versions
src/ids_ml/versions.py - Model versions → Flow generator: generates scenarios
src/ids_ml/versions.py - Experiment pipeline → Flow generator: generates data
src/ids_ml/pipeline.py - Experiment pipeline → Feature preparation: prepares features
src/ids_ml/pipeline.py - Experiment pipeline → Model training: trains model
src/ids_ml/pipeline.py - Experiment pipeline → Metrics and evaluation: evaluates model
src/ids_ml/pipeline.py - Pipeline operator → Experiment pipeline: runs experiments
src/ids_ml/pipeline.py - Analyst → Browser dashboard: reviews results
- Browser dashboard → Bundled results: reviews bundled results