Live Demo

Fraud Detection Pipeline

This system looks at a credit card transaction and decides in milliseconds whether it is likely to be fraudulent or legitimate — the same way your bank automatically flags suspicious purchases on your card.

How it works

What does this system actually do?

1

Learns from 284,807 real transactions

The system was trained on a real dataset of credit card transactions — each one labeled as either legitimate or fraudulent. It learned the patterns that separate normal purchases from suspicious ones.

2

Analyzes behavioral signals

It doesn't just look at the transaction amount. It considers behavioral patterns — how many transactions happened recently, what time of day it is, whether the amount is unusually large compared to recent history.

3

Returns a fraud probability score

For every new transaction, the system returns a label (Legit or Fraud) and a probability score — how confident it is. A score of 4% means very likely legitimate. A score of 95% means very likely fraud.

Example

Input → Output

Here is what happens when a transaction is submitted to the API:

Input — Transaction
Amount: $150
Time: 2:00 AM
Recent activity: normal
Location signals: standard
Processing
Random Forest model
analyzes 33 features
across 100 decision trees
and takes a majority vote
Output — Result
Label: Legit
Fraud probability: 4.13%
Response time: <200ms

API Response

prediction 0
label Legit
fraud_probability 0.0413 (4.13%)
Results

How accurate is it?

0.98
ROC-AUC Score
83%
Fraud Caught
284K
Transactions Trained On
<200ms
Response Time

A score of 0.98 out of 1.0 means that if you showed the model a real fraud case and a legitimate transaction side by side, it would correctly identify the fraudulent one 98% of the time. It catches 83% of all fraud cases in the test set.

Try it Live — Open API View Source Code ← Back to Projects