liveBook · Manning

Decision tree

As explained in Fight Fraud with Machine Learning

A decision tree is a predictive model that recursively partitions instances using feature-based conditions until reaching decision leaves.

A decision tree is a predictive model that organizes feature-based conditional rules into a hierarchy. Each internal node splits transactions at a feature threshold, and each leaf predicts a class. section 3.4 section 3.4.4

A practical fraud-detection workflow uses a tree to:

  • Split processed transaction data into training and test sets. section 3.4
  • Train with cross-validation and randomized hyperparameter search. section 3.4
  • Evaluate predictions with area under the precision-recall curve for imbalanced fraud data. section 3.4 section 3.9
  • Interpret decisions by inspecting feature importance, split thresholds, node impurity, sample counts, and class votes. section 3.4.4

Reading a fraud decision tree

A root node can compare TRANSFER with a threshold of 0.5. Transfer transactions follow one subtree and other transactions follow the other; subsequent splits lead to leaves labeled fraudulent or genuine by the majority class. Gini impurity indicates how mixed the transactions are at each node. section 3.4.4

Figure 3.11 Steps in building a decision-tree-based online transactions fraud detection model.

Use the workflow figure to trace the progression from transaction data through tree training, evaluation, and interpretation. section 3.4

How Fight Fraud with Machine Learning covers it

How deep it goes
Explains hierarchical rules, thresholds, leaves, majority labels, feature importance, and Gini impurity down to plotted tree nodes.
Examples
Uses transaction splits on TRANSFER and amount, plotted tree nodes, feature-importance listings, and fraudulent-versus-genuine leaves.
What it assumes
Assumes a processed transaction dataset with selected features and labels, while treating categorical-feature handling and class imbalance as practical concerns.
What you can do after
Build it from scratch as a fraud classifier, evaluate it with AUPRC, and inspect its rules and influential features.
How it connects
Connects decision trees to random forests, gradient boosted trees, categorical features, feature importance, Gini impurity, and precision-recall evaluation.

Also explained in

Compare how 18 books explain decision tree →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fight Fraud with Machine Learning. The section links point to the parts of the book it draws on.