Icon

01_​Training DBSCAN for Fraud Detection

Fraud Detection using DBSCAN Clustering Algorithm

This workflow uses the DBSCAN clustering algorithm to detect fraud by identifying outliers in credit card transaction data. Density-based spatial clustering of applications with noise (DBSCAN) is a unsupervised clustering algorithm that works well with data that does not vary significantly across different parts of the dataset. We normalize the training data and sample a subset for analysis, outliers are tagged for potential fraud. Metrics are extracted at the end for viewing through the 'Scorer' node.

Steps taken for training:
1. Read Training Data
2. Data Preprocessing: Normalize the data into range [0,1] or [good,fraud] and Save Normalizer model
3. Train DBSCAN using Euclidean Distance
4. Mark Outliers and Evaluate Model Results

URL: Kaggle Dataset https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud

Read Training Data

Data Preprocessing

Fraud Detection: DBSCAN Method - Training


This workflow uses the DBSCAN clustering algorithm to detect fraud by identifying outliers in credit card transaction data. Density-based spatial clustering of applications with noise (DBSCAN) is a unsupervised clustering algorithm that works well with data that does not vary significantly across different parts of the dataset. We normalize the training data and sample a subset for analysis, outliers are tagged for potential fraud. Metrics are extracted at the end for viewing through the 'Scorer' node.

Steps taken for training:

  1. Read Training Data

  2. Data Preprocessing: Normalize the data into range [0,1] or [good,fraud] and Save Normalizer model

  3. Train DBSCAN using Euclidean Distance

  4. Mark Outliers and Evaluate Model Results

Mark Outliers and Evaluate Model Results








Save the models and table for deployment

Train DBSCAN using Euclidean Distance

TransformTarget column from0/1 => good/bad
Expression
Read credit card data (sample) Download full dataset via the Kaggle link in the description
CSV Reader
Mark outliersLIKE noise = fraud
Expression
Open viewto see score
Scorer
Min-max normalization to[0,1]
Normalizer
Save aseuclidean.model
Model Writer
Euclidean distance
Numeric Distances
Save asnormalization.model
Model Writer
10 % of samplesfor faster execution
Row Sampling
Save asdbscan_output.table
Table Writer
DBSCAN

Nodes

Extensions

Links