Credit Card Fraud

To ensure code in this tutorial runs as shown, download the tutorial project folder and follow these instructions.

If you have questions or suggestions about this tutorial, please open an issue here.

@OUTPUT (macro with 1 method)

Classification of fraudulent/not credit card transactions (imbalanced data) By Kristian Bjarnason. The original script can be found here

Editor's note. To reduce training times, we have reduced the the original number of data observations. To re-instate the full dataset (290k observations) change reduction=0.05 to reduction=1. The data is highly imbalanced, and this is ignored when training some models. Some other changes to Bjarnason's original notebook are noted at the end.

using Dates, Statistics, LinearAlgebra, Random # standard libraries
using MLJ, Plots, DataFrames, UrlDownload
using CSV # needed for `urldownload` to work
import StatsBase # needed for `countmap`

Adjusting fontsize in plotting:

Plots.scalefontsizes(0.85)