How thisakg/praetorian works
Praetorian generates synthetic authentication events, splits and preprocesses them, trains an Isolation Forest, then scores and presents data in a Streamlit dashboard. The dashboard also supports evaluation, visualizations, and CSV export. Source excerpts confirm the generator, split, preprocessing, model, evaluation, and dashboard behavior; some training and data-stage links are documented only in the README.
Main entry points: dashboard.py Streamlit dashboard · preprocess.py Feature preprocessing · evaluate.py Model evaluation · train_preprocessed.csv Processed datasets
Components 15
Data preparation
- Synthetic logins
src/data/generate_data.py - Login dataset
data/synthetic_logins.csv - Train-test split
src/data/split.py - Train and test data
data/train.csv - Feature preprocessing
app/preprocess.py - Feature scaler
scaler.save - Processed datasets
data/train_preprocessed.csv
Detection pipeline
- Isolation Forest training
app/model.py - Trained model
models/isolation_forest.pkl
Dashboard experience
- Streamlit dashboard
app/dashboard.py - Anomaly scoring
app/dashboard.py - Plots and CSV export
app/dashboard.py
Evaluation
- Model evaluation
plots/evaluate.py - Evaluation plots and metrics
plots
Other components
- Security analyst
Connections 17
- Synthetic logins → Login dataset: writes events
src/data/generate_data.py - Login dataset → Train-test split: reads dataset
src/data/split.py - Train-test split → Train and test data: writes splits
src/data/split.py - Train and test data → Feature preprocessing: preprocesses
README.md - Feature preprocessing → Feature scaler: saves and loads
app/preprocess.py - Feature preprocessing → Processed datasets: writes features
app/preprocess.py - Processed datasets → Isolation Forest training: trains on
README.md - Isolation Forest training → Trained model: saves model
app/model.py - Security analyst → Streamlit dashboard: uses
README.md - Streamlit dashboard → Feature preprocessing: preprocesses uploads
app/dashboard.py - Streamlit dashboard → Processed datasets: loads sample data
app/dashboard.py - Streamlit dashboard → Trained model: loads model
app/dashboard.py - Streamlit dashboard → Anomaly scoring: runs analysis
app/dashboard.py - Anomaly scoring → Plots and CSV export: presents results
app/dashboard.py - Streamlit dashboard → Model evaluation: runs evaluation
app/dashboard.py - Model evaluation → Trained model: loads model
plots/evaluate.py - Model evaluation → Evaluation plots and metrics: saves plots
plots/evaluate.py