This project finds unusual vendor payments among 2,500 fictional transactions using two outlier detection methods, LOF and distance to nearest neighbours. The result is a ranked list auditors can examine immediately, compared against the audit outcome.
Business Goal
Set aside unusual transactions from thousands of vendor payments so auditors can focus. Application area: Accounting / Audit. Project level: advanced.
RapidMiner Tools and Operators
The process is built with these operators:
- Read CSV
- Select Attributes
- Normalize
- Multiply
- Detect Outlier (LOF)
- Detect Outlier (Distances)
- Generate Attributes
- Write CSV
What You Will Learn
- Understand unsupervised outlier detection and how to check it against audit data
- Compare density-based (LOF) and distance-based methods
- Build a ranked transaction list as the basis for audit sampling
Working Steps
- Read the transaction data — Read CSV loads transaksi_pembayaran.csv (2,500 vendor payments). id_transaksi becomes the id; the hasil_audit column is used only to compare results at the end.
- Select numeric attributes — Select Attributes keeps seven numeric attributes: amount, hour, days to due date, vendor frequency, ratio to vendor average, approval level and difference from the purchase order.
- Rescale the attributes — Normalize (Z-transformation) ensures large-valued attributes such as the amount do not overshadow others when distances are computed.
- Duplicate the data — Multiply makes two copies so the two detection methods can run on the same data.
- Compute the LOF score — Detect Outlier (LOF) with minimal points 30 to 50 gives a local density score. A score near 1 is normal, larger means more unusual. The MinPts range is set above the size of unusual groups so those groups are still detected.
- Flag by threshold — Generate Attributes creates the tanda_lof column with the formula if(outlier>2,"anomali","wajar"). A threshold of 2 is a common starting point and can be changed.
- Compute neighbour distance — Detect Outlier (Distances) uses the 10 nearest neighbours and flags the 75 transactions (3%) with the largest distances as outliers.



