ML for Cyber Security
ML for Cyber Security
Sign in to save your progress, earn points, and unlock module exams.
Unit 2 of MLCS
Decision trees, random forests, support vector machines and gradient boosting applied to labelled security data, hyperparameter tuning, cross-validation, voting ensembles, and a production-scale credit card fraud case study.
Every supervised model in this unit predicts a label y from a feature vector x, and why the training split and test split must never be the same data.
How a decision tree splits on the feature and threshold that most reduces impurity at each node, a runnable scikit-learn example on phishing-URL features, and why an unconstrained tree memorises rather than generalises.
How a random forest trains many trees on random samples and feature subsets and lets them vote, a real decision-surface chart over engineered URL features, and the Endpoint Protection Goes Statistical case study including the 2019 Cylance bypass.
How an SVM finds the widest-margin boundary between two classes, the kernel trick that lets it draw curved boundaries without computing a higher-dimensional space directly, and a runnable RBF-kernel example.
Sequential tree-building that fits each new tree to the residual error of the trees before it, a head-to-head real run of scikit-learn's GradientBoostingClassifier against the real XGBoost library, and ROC/confusion-matrix charts comparing three classifiers.
Automating hyperparameter search with GridSearchCV over a real heatmap of (C, gamma) combinations, and why k-fold cross-validation gives a far more honest picture of a model's performance than one train/test split.
Combining entirely different model families into a voting ensemble, a real run showing the ensemble scoring below its own strongest member, and a practical table for choosing among decision trees, random forests, SVMs and gradient boosting.
The real ULB Credit Card Fraud dataset, 284,807 transactions of which only 492 are fraudulent, a five-step realistic fraud-detection workflow, and a class-weighted random forest trained on the real feature set.
A one-page summary table of every topic in this unit, seven self-study questions to test understanding, and a lab exercise comparing all six classifiers on the same split.
Assessments
ML for Cyber Security: Complete Assessment
Start final exam →