Intrusion and anomaly detection, malware analysis, threat intelligence, phishing, security logs and incident response: defensive experiments that really compute in your browser on synthetic data, with algorithms, datasets, projects and quizzes.
- Home
- AI Intrusion Detection
- Cyber Anomaly Detection
- Malware Analysis
- Cyber Threat Intelligence
- AI Network Security
- AI Phishing Detection
- AI Security Log Analytics
- AI Incident Response
- Algorithm Library
- Datasets Repository
- Learning Roadmap
- Projects
- Quizzes and Challenges
- Experiment Workbench
- Research and Metrics
- My experiments
- Scientific references
- Glossary and FAQ
Decision tree
Algorithm Library · Algorithm Supervised Learning Runs in the browser
The idea
Splits the space with successive threshold rules, choosing at each node the split that reduces Gini impurity most.
The problem it addresses
Human-readable rules that analysts can review.
Data it needs
Tabular numeric and categorical data.
Equations
G(S)=1-\sum_c p_c^2,\quad \Delta=G(S)-\tfrac{|S_L|}{|S|}G(S_L)-\tfrac{|S_R|}{|S|}G(S_R)Steps
- Find the best feature and threshold
- Split samples
- Recurse to max depth or pure nodes
- Predict majority class at leaves
Pseudocode
def grow(S, depth):
if pure(S) or depth == D: return leaf(S)
f, t = best_split(S)
return Node(f, t, grow(S[S[:,f]<=t], depth+1), grow(S[S[:,f]>t], depth+1))Strengths
- Interpretable
- No scaling needed
- Handles interactions
Limitations
- High variance, overfits
- Axis-aligned boundaries
Uses in cybersecurity
- Teaching detection rules
- Building block of forests
Common pitfalls
- Deep trees memorise the training set; limit depth and watch the train/test gap.
Computational complexity
Inference is tree-depth; building requires sorting features.
Suggested datasets
Related experiments
See also
References
- Breiman (2001). Random Forests. Machine Learning 45(1), pp. 5-32. doi:10.1023/a:1010933404324
