Add behavior analytics EDA notebook
Browse files- behavior_analytics_eda.ipynb +62 -0
behavior_analytics_eda.ipynb
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"nbformat": 4,
|
| 3 |
+
"nbformat_minor": 5,
|
| 4 |
+
"metadata": {
|
| 5 |
+
"kernelspec": {
|
| 6 |
+
"display_name": "Python 3",
|
| 7 |
+
"language": "python",
|
| 8 |
+
"name": "python3"
|
| 9 |
+
},
|
| 10 |
+
"language_info": {
|
| 11 |
+
"name": "python",
|
| 12 |
+
"version": "3.11.0"
|
| 13 |
+
}
|
| 14 |
+
},
|
| 15 |
+
"cells": [
|
| 16 |
+
{
|
| 17 |
+
"cell_type": "markdown",
|
| 18 |
+
"metadata": {},
|
| 19 |
+
"source": [
|
| 20 |
+
"# Security Behavior Analytics \u2014 Cohort & Peer EDA\n",
|
| 21 |
+
"\n",
|
| 22 |
+
"**Aria AI Security Data Science Team**\n",
|
| 23 |
+
"\n",
|
| 24 |
+
"Exploratory analysis on synthetic enterprise IAM/access behavior events.\n",
|
| 25 |
+
"\n",
|
| 26 |
+
"> Artifacts are pre-computed \u2014 no external downloads or model training required.\n"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"cell_type": "code",
|
| 31 |
+
"metadata": {},
|
| 32 |
+
"source": [
|
| 33 |
+
"import json\n",
|
| 34 |
+
"from pathlib import Path\n",
|
| 35 |
+
"\n",
|
| 36 |
+
"ROOT = Path('.')\n",
|
| 37 |
+
"summary = json.loads((ROOT / 'assets/demo/summary.json').read_text())\n",
|
| 38 |
+
"cohorts = json.loads((ROOT / 'assets/demo/cohort_analysis.json').read_text())\n",
|
| 39 |
+
"risk = json.loads((ROOT / 'assets/demo/risk_analysis.json').read_text())\n",
|
| 40 |
+
"print('Events:', summary['total_events'])\n",
|
| 41 |
+
"print('Users:', summary['total_users'])\n",
|
| 42 |
+
"print('Critical risk:', risk['summary']['critical'])\n"
|
| 43 |
+
],
|
| 44 |
+
"outputs": [],
|
| 45 |
+
"execution_count": null
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"cell_type": "code",
|
| 49 |
+
"metadata": {},
|
| 50 |
+
"source": [
|
| 51 |
+
"import plotly.graph_objects as go\n",
|
| 52 |
+
"\n",
|
| 53 |
+
"dept = cohorts['dimensions']['department']['cohorts'][:10]\n",
|
| 54 |
+
"fig = go.Figure(go.Bar(x=[c['cohort'] for c in dept], y=[c['event_count'] for c in dept]))\n",
|
| 55 |
+
"fig.update_layout(title='Events by Department Cohort', template='plotly_dark')\n",
|
| 56 |
+
"fig.show()\n"
|
| 57 |
+
],
|
| 58 |
+
"outputs": [],
|
| 59 |
+
"execution_count": null
|
| 60 |
+
}
|
| 61 |
+
]
|
| 62 |
+
}
|