Fans of IBM Z Hub

Fans of IBM Z Hub

Fans of IBM Z Hub

Join us and share the love of IBM Z with our global community!

 View Only

IBM Z Datathon 24' - Fighting Fraud with Machine Learning

By Alexander Ivanov posted Mon May 05, 2025 07:03 PM

  

Introduction

Hello! We are the team BIG BAD CODERS (one of the winning teams of IBMZ Datathon 2024) and we are here to share a bit about who we are and our IBM Z datathon experience working on our fraud detection system. Though we came into the datathon with a range of experiences, this was our first time diving into IBM Z - and it turned out to be one of the most rewarding parts of our journey.

Our project ran on IBM LinuxONE, a powerful IBM Z system optimised to handle running Linux workloads with enterprise-level performance, reliability, and security. From spinning up a LinuxONE instance to training and deploying a fraud detection model, we got hands-on with both machine learning and enterprise-grade computing - and came out the other side with major insights (and a fully working pipeline!).

The Problem

Online commerce has exploded in recent years, but with it has come a rise in fraudulent activity. Small businesses and less tech-savvy users are especially vulnerable, facing threats like identity theft, payment fraud, and fake product returns. These issues not only erode trust in digital marketplaces but can also lead to significant financial loss. We wanted to develop a solution that could accurately detect fraudulent transactions - before they do damage.

Fraud doesn't just hurt businesses - it impacts livelihoods. Solving this problem felt meaningful to us because it combines the power of data science with real-world impact. In an increasingly digital world, giving businesses better tools to detect fraud early can save money, protect vulnerable consumers, and preserve trust in e-commerce platforms.

Our Solution

While fraud detection is a well-researched topic, something we aimed to do for uniqueness is focus on balance and interpretability. Many models optimise for accuracy but ignore real-world costs. We ensured our model's behavior was understandable, and we highlighted trade-offs between false positives and false negatives - something often glossed over in production models.

We used a dataset from Kaggle containing labeled transaction data - some legitimate, some fraudulent. After carefully pre-processing the data (cleaning out duplicates, invalid entries, and irrelevant columns), we focused on key indicators like mismatched billing and mailing addresses. From a performance standpoint, it was also important to reduce dimensionality where possible - removing features that introduced noise or redundancy helped not only improve model generalization but also significantly speed up training and processing time. By concentrating on the most informative attributes, we allowed the model to focus its learning on the features that had the strongest predictive signal.

We trained our model using a Random Forest Classifier from the Scikit-learn library. We chose this algorithm because of its robustness with noisy data and ability to avoid overfitting, especially important in datasets with an imbalanced class distribution.

from sklearn.utils import resample

# split data
df_no_fraud = df.loc[df['Is Fraudulent'] == 0]
#print(len(df_no_fraud.axes[0]))
df_fraud = df.loc[df['Is Fraudulent'] == 1]
#print(len(df_fraud.axes[0]))

# downsample the data set
df_no_fraud_downsampled = resample(df_no_fraud, replace=False, n_samples=10000, random_state=420)
df_fraud_downsampled = resample(df_fraud, replace=False, n_samples=10000, random_state=20)

# merge the data sets
df_downsample = pd.concat([df_no_fraud_downsampled, df_fraud_downsampled])
df_downsample.shape

X_encoded = pd.get_dummies(data=df_downsample, columns=["Transaction Amount", "Payment Method", "Product Category","Customer Age", "Customer Location", "Device Used", "Shipping Address", "Account Age Days", "Transaction Hour"])

# "Transaction Date", "IP Address" columns removed
#X_encoded.head()
[Simple illustration of the Random Forest Classifier]

Accuracy and Error Analysis

Our model achieved an overall accuracy of 97.68%, and we paid close attention to the balance between Type I errors (flagging legitimate transactions as fraud) and Type II errors (failing to catch actual fraud). We found a nearly even split between these errors (64:75), which indicated that our model was not disproportionately conservative or lenient - something critical when trust and reputation are on the line.

Deployment on IBM LinuxONE

The IBM Z Datathon wasn’t just about building a model - it was about deploying it in a real, scalable environment. We spun up an Ubuntu 22.04 instance using the LinuxONE Community Cloud, connected through a shell terminal, and ran our services using Docker and Jupyter Lab.

The power and flexibility of IBM LinuxONE allowed us to run complex Python-based machine learning workflows using Pandas, NumPy, and Scikit-learn with ease. The seamless browser access and public IP configuration meant we could share results and iterate rapidly as a team.

Key Learnings

IBM Z which is the latest generation of Mainframe systems is incredibly developer-friendly, you can run popular Linux workloads along with existing mainframe operating systems and applications. Despite being new to the platform, we were able to get up and running quickly, thanks to its intuitive cloud interface and compatibility with popular ML tools.

ML deployment matters just as much as model accuracy to ensure most optimal inference. Training a model is one thing - putting it somewhere it can scale and be used is another.

Data preprocessing is king. Our early efforts in cleaning and preparing data significantly boosted model performance.

Why LinuxONE Was a Game-Changer

The reliability, security, and performance of the Enterprise Computing platform which is IBM LinuxONE made it a perfect fit for our fraud detection tool. Especially when dealing with sensitive financial data, enterprise-grade encryption and uptime become essential. IBM Z offered that and more - allowing us to experiment without worrying about infrastructure. By deploying our solution through the IBM LinuxONE Community Cloud, we were able to tap into powerful computing resources and benefit from a secure, scalable environment tailored for enterprise-grade workloads.

[Workflow diagram of our project]

Final Thoughts

The IBM Z Datathon was an incredible experience that challenged us both technically and creatively. We emerged not only with a functional fraud detection system but also with a stronger grasp of how enterprise AI operates in real-world scenarios. We’re especially grateful to Dr. Alex Osadchyy for his mentorship and the thought-provoking discussions that helped us reflect on how to refine and extend our solution. Looking ahead, we’re excited by the prospect of revisiting our approach - potentially implementing a two-stage pipeline to further improve performance on low-confidence predictions. To anyone considering joining the next datathon: do it. You’ll learn, build, and most importantly - you’ll have fun doing it.

1 comment
11 views

Permalink

Comments

Thu February 12, 2026 08:08 PM

Scoring 97.68% on a Confusion Matrix is outstanding!  A lot of models used in production to guide real business decisions don't come even close.

Kudos on a job well done and a blog post that was an enjoyable read.