Skip to main content
100%

Gist 392220bb33ff81da26fe5b1787cd505b

✓ Published0🌍 Public
YYannael
Last edited May 26, 2021
Created on May 26, 2021

This example visualizes the results of a fraud-detection decision tree model trained on transaction data, showing how the model classifies transactions as fraudulent or non-fraudulent. It displays the test set predictions alongside the true labels, highlighting the top 100 predicted fraud cases for performance assessment. The code uses scikit-learn’s `DecisionTreeClassifier` with a maximum depth of two for interpretability, and evaluates predictions using a custom `performance_assessment` function. The dataset includes engineered features such as transaction amounts, weekend/night indicators, and customer/terminal historical statistics over one, seven, and thirty-day windows.

AI-generated description

Similar vizzes