Appendix A. Fundamentals of classical ML for fraud detection

 

This appendix covers

  • Types of classical machine learning models
  • Typical machine learning lifecycle
  • Fixing class imbalance in fraud datasets

In this appendix, we explore different types of classical ML models. We understand how the ML lifecycle works especially in context of fraud detection. Finally, we take a closer look at the class imbalance problem in fraud detection and the ways of tackling it.

A.1 Types of ML models

There is a plethora of classical machine learning models out there today suited for a variety of tasks. In this section, we focus on the ones that are particularly useful in fraud detection. That said, this is still not an exhaustive exploration of all possible fraud detection machine learning models, but rather a brief overview of some of the most used ones.

Figure A.1 Subdivisions of machine learning

Machine learning at the core is all about learning patterns within data, and using these patterns to make decisions or predictions for a given task. Machine learning is divided into a few categories based on how the inputs and outputs are defined as shown in figure A.1:

A.2 Using supervised ML for fraud detection

A.2.1 Regression versus classification

A.2.2 Using logistic regression as a fraud detector

A.2.3 Using K nearest neighbors for catching fraud

A.2.4 Using decision tree to detect fraud

A.2.5 Using random forest for fighting fraud

A.2.6 Using gradient boosted trees to fight fraud

A.3 Using unsupervised ML in fraud detection

A.3.1 Clustering fraud versus not fraud

A.3.2 Reducing fraud dataset dimensions

A.4 The machine learning lifecycle

A.4.1 Collecting fraud data

A.4.2 Cleaning a fraud dataset

A.4.3 Extracting features from a fraud dataset

A.4.4 Selecting, training, and evaluating fraud detection ML models

A.4.5 Deploying and monitoring a fraud detection model as a service

A.5 Handling class imbalance in fraud datasets

A.5.1 Using random under-sampling to balance fraud data

A.5.2 Using random oversampling for data balancing

A.5.3 Using SMOTE for better oversampling

A.5.4 Using weighted loss function to handle fraud imbalance

A.6 Summary