r/learnmachinelearning • • 11d ago

I built a Real-Time UPI Fraud Detection System using Machine Learning, XGBoost, FastAPI & Streamlit — Looking for Technical Feedback!

2 Upvotes

Hi everyone!

I'm a recent Electronics and Communication Engineering graduate, and I've been working on a project to explore how machine learning can help identify potentially fraudulent UPI transactions.

I built a Real-Time UPI Fraud Detection System that predicts whether a transaction is potentially fraudulent or legitimate. I wanted to go beyond simply training a machine learning model and build an end-to-end application where users can interact with the model and understand its predictions.

I'd love to share what I built and get feedback from the community.

1. What does the project do?

The system analyzes UPI transaction details and behavioural features to identify suspicious transaction patterns.

It supports:

  • Real-time transaction fraud prediction.
  • CSV batch transaction analysis.
  • Live transaction simulation.
  • Google Pay PDF statement analysis.
  • Explainable predictions using SHAP.

2. Technology stack

  • Python: Core development and data processing.
  • XGBoost: Machine learning classification model.
  • FastAPI: Backend API for transaction predictions.
  • Streamlit: Interactive dashboard.
  • SHAP: Model prediction explainability.
  • Pandas & NumPy: Data processing and feature handling.

3. How does it work?

The overall workflow is:

  1. Transaction data is provided to the application.
  2. The system processes the transaction and extracts the required features.
  3. The trained XGBoost model evaluates the transaction.
  4. A fraud probability is generated.
  5. A tuned decision threshold is applied to classify the transaction.
  6. SHAP explanations help understand which features influenced the prediction.
  7. The result is displayed through the Streamlit dashboard.

I also handled class imbalance using XGBoost's scale_pos_weight and tuned the fraud decision threshold using a separate validation set.

4. Model evaluation

On my reported synthetic test dataset of 199 records, the model achieved:

MetricResult
Accuracy99.5%
Precision100%
Recall88.9%
F1-score94.1%

These are prototype evaluation results on synthetic data, not proof of performance on real banking transactions. I understand that real-world fraud detection requires larger, representative datasets and more rigorous validation.

5. Live Demo and Source Code

Live Demo: https://fraud-detection-dashboard-a2ewk5y6yoo6mlw5z995dw.streamlit.app/

GitHub Repository: https://github.com/Prabha2005/Fraud-Detection-Dashboard

I've also included the project in my portfolio:
https://vlpportfolio.ccbp.tech/

6. What I'd like feedback on

I'm looking to improve this project beyond its current implementation. I'd especially appreciate feedback on:

  1. Is XGBoost a suitable choice for this type of fraud detection problem, or should I explore other approaches?
  2. How can I improve fraud detection recall while maintaining high precision?
  3. What additional transaction or behavioural features would make the model more effective?
  4. How would you approach detecting previously unseen fraud patterns?
  5. What improvements would you recommend for making the system closer to a production-ready application?
  6. Are there better approaches for evaluating fraud detection models on highly imbalanced datasets?

I'm particularly interested in suggestions from people working in Machine Learning, Data Science, FinTech, and backend engineering.

This is a learning project, and I'm genuinely interested in understanding what I could improve technically and architecturally.

Thanks for taking the time to check it out. Any constructive feedback is appreciated!


r/learnmachinelearning • • 11d ago

Project Simple browser-based AI video generator for turning ideas and photos into clean clips

Thumbnail interconnectd.com
0 Upvotes

r/learnmachinelearning • • 11d ago

Building a Local AI Photography Editing Assistant. Anyone working on something similar? [D]

Thumbnail reddit.com
1 Upvotes

r/learnmachinelearning • • 11d ago

Just starting my AI career. What would you tell a newbie?

13 Upvotes

You folks are way ahead of me, so I'm asking here.

I'm a fresh grad and I've just started working in tech, and I want to go deeper into AI. I can code and I've built a few things, but I don't know what I don't know.

What would you tell someone at this stage? Anything helps: what to build, what to learn first, what to skip, which prompts or tools actually save you time, or a mistake you made early that you'd warn me about.

Thanks in advance.


r/learnmachinelearning • • 11d ago

Project Best free AI video generation tools and workflows I actually use in 2026

Thumbnail interconnectd.com
0 Upvotes

r/learnmachinelearning • • 11d ago

Tutorial Free AI Prompt Generator for ChatGPT, Claude, and LLMs

Thumbnail reddit.com
1 Upvotes

r/learnmachinelearning • • 11d ago

Where does AI actually fit in networking? Notes on OSI layers, telemetry and anomaly detection. https://www.youtube.com/watch?v=0tHoDCbxMag

Thumbnail
reddit.com
2 Upvotes

r/learnmachinelearning • • 11d ago

Looking for 1st & 2nd-Year College Students Interested in AI/ML Research (Free Community)

0 Upvotes

Hey everyone!

We're TRINETRA RESEARCH, and we're exploring the idea of building a completely free, student-driven AI/ML research and learning community.

The idea is to bring together 1st and 2nd-year college students who want to go beyond courses and tutorials and actually understand how AI works.

We aim to explore Machine Learning, Deep Learning, Computer Vision, NLP, Generative AI, Neural Networks, and real-world AI applications through practical learning, experimentation, and collaborative research.

No fees. No prior research experience required.

We're still in the planning stage and want to understand whether students would genuinely be interested in something like this.

Would you join a community focused on learning and building AI from scratch?

If you're interested, comment below or DM me!


r/learnmachinelearning • • 11d ago

AI/ML Engineer Career Roadmap: What Should I Learn Next to Become Job-Ready?

Thumbnail reddit.com
1 Upvotes

r/learnmachinelearning • • 12d ago

Suggest Best Books for ML

12 Upvotes

I work in ML and especially in Federated Learning. I have been looking for some books on ML. I already know the basics algorithms and architectures but I am willing to go for a book coz I need it as a sort of reference to look upto in case for some interview or other stuff.

So I may need 2 or 3 books and need suggestions for them.

  1. one for ML and DL or separate - some options include Ian Goodfellow but it seems bit more theoretical
  2. one for ML Systems - one suggestion was a book on ML Systems by O’reiley but not sure

Can someone please give me suggestions for such resources if any?


r/learnmachinelearning • • 12d ago

Designing a C++ ML library from scratch — would you prefer A.transpose() or transpose(A) or A.T()?

7 Upvotes

I'm currently building a machine learning library from scratch in C++, and I'm thinking about the API design for tensor operations.

For a transpose operation, I'm considering these interfaces:

Option 1: Tensor B = A.transpose();

Option 2: Tensor B = transpose(A);

Option 3: Tensor B = A.T();

I'm curious about what other C++ developers would prefer when using a library.

Which syntax feels more natural and readable?

Thanks!


r/learnmachinelearning • • 12d ago

Project Python: Different Copying options

Post image
8 Upvotes

An exercise to help build the right mental model for Python data.

The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening.


r/learnmachinelearning • • 11d ago

Request Your pinned MCP server may not be as pinned as you think

0 Upvotes

Researchers tracked a single MCP server over five weeks without touching its configuration. It ran with 15 different dependency sets during that window. The administrator saw nothing change. Twenty-three other servers in the same lab showed the same silent drift over the same period.

No alerts fired. No config diff appeared. The server looked pinned because the config file was pinned — but what actually executed against agent context was different on at least 15 occasions the team could confirm.

This is the part of AI infrastructure supply chain risk that doesn't get enough attention. Traditional artifact scanning checks what you deployed. It says nothing about what's running right now. By the time a periodic scan catches drift, the execution has already happened.

For teams operating MCP servers in production: how are you actually catching this? Periodic hash checks, invocation-time validation, something at the network layer, nothing yet? Curious what's working and what the blind spots still are.


r/learnmachinelearning • • 11d ago

Tool-calling LLM Agents

Thumbnail
youtube.com
1 Upvotes

r/learnmachinelearning • • 12d ago

Keywords for a Machine Learning Engineer Resume — PyTorch, MLOps & LLMs

6 Upvotes

Keywords list taken from Resume Fitting

The most commonly scanned keywords in ML engineering and AI job postings.

ML Frameworks

PyTorch TensorFlow Keras scikit-learn XGBoost LightGBM HuggingFace JAX

MLOps & Infrastructure

MLflow Kubeflow Apache Airflow DVC feature store model registry model serving BentoML

Cloud & Compute

AWS SageMaker Google Vertex AI Azure ML CUDA GPU training distributed training Apache SparkRay

Model Development

LLMs large language models transformers RLHF RAG fine-tuning model evaluation A/B testing

Data Engineering

feature engineering data pipelines ETL Apache Kafka data versioning training data label management data preprocessing

Languages & Tools

Python SQL Docker Kubernetes Git Jupyter CI/CD REST APIs

Keywords list taken from Resume keywords


r/learnmachinelearning • • 11d ago

I tried to trick YOLOv8... and it worked! But how? 👀

0 Upvotes

Lately, I’ve been diving deeper into Computer Vision, and I decided to run a hands-on experiment to test the robustness of Object Detection models against attacks.

The idea was to fool YOLOv8 into failing to detect objects—without changing a single thing in the model weights!

I used two of the most well-known Adversarial Attack techniques:

FGSM (Fast Gradient Sign Method)

PGD (Projected Gradient Descent)

I tested this on YOLOv8m using 100 images from the COCO 2017 Dataset.

Throughout the experiment, I focused on understanding the Detection Loss, using gradients to subtly perturb the images, executing the attacks, and then evaluating the model's performance and visually comparing the results.

And the result? Let’s just say YOLOv8 wasn’t ready for this surprise! 😅

I documented the entire experiment in a Kaggle Notebook—covering everything from the core concept and implementation to evaluation and visualization.

If you're curious about how it was built and what happened to the model, you can check out all the details here:

🔗 Kaggle Notebook: https://www.kaggle.com/code/iismmail/adversarial-attacks-on-yolov8-fgsm-vs-pgd

I’d love to hear your thoughts or any feedback on the experiment! ❤️

#AI #ComputerVision #YOLOv8 #AdversarialAttacks #DeepLearning #MachineLearning


r/learnmachinelearning • • 12d ago

With smaller AI models getting better, will businesses start choosing Small Language Models (SLMs) over expensive models like GPT and Claude in 2027? Are SLMs good enough for real-world business use?

7 Upvotes

r/learnmachinelearning • • 12d ago

Question How Good is Claude at Machine Learning?

10 Upvotes

r/learnmachinelearning • • 11d ago

Request AI Agents Bypassed Spending Limits: How Email Access Enabled It

0 Upvotes

An AI agent just approved its own spending increase. The only tool it needed was email. Researchers found AI agents capable of raising their own crypto spending caps by requesting emailed authorization codes — then reading and submitting them without human review. No human confirmed the spend. Financial guardrails designed for human approval workflows collapsed when the approver and the requester were the same autonomous system. Runtime cost controls must live outside the agent's reach entirely.


r/learnmachinelearning • • 12d ago

playing around with universal approximation

Post image
11 Upvotes

so i was recently playing around with trying to get a neural net to approximate different types of functions from simple y=mx+c to complicated composite functions , universal approximation if i remember well states thst if a function is continous and bounded then a neural netwrk should be able to approximate such a function. I had already built a neural network type of library before in numpy so i just took that code and trained a 2 layer network on a bunch of functions tweaks stuff here and there and it worked😅 , what i found really cool is when i tried a composite function like this :f(x) = e^(−3x²) · cos(12x²) + 0.5|x| , it requires my model to both provide a smooth and jagged outputs so i ran a 3 layer network this time with relu -> tanh ->linear layer i asummed that since layers are just nested composite functions the relu would provide some jagged inputs that the tanh can inhherit and map smoothly the the linear layer will produce the regression points , it not a full functionrecreation but m suprised on how close it got just felt like sharing this cause it kind of helped me understand why netwrks can overfit some very complx data soo easily and also how intuivively picking activation functions can be soo important have you guys ever played around with this old piece of deep learning theory before? and also do u care to share if u have


r/learnmachinelearning • • 12d ago

Linear Regression performs well overall but significantly underestimates long delivery durations. How should I investigate this?

5 Upvotes

Hello everyone,

I'm working on a multivariate linear regression project to predict delivery durations in minutes.

I implemented the model using NumPy, including gradient descent, rather than relying on Scikit-learn's regression implementation. My model uses the following features: Distance (km), Number of stop, Package weight (kg), Departure time, Traffic index, Day of the week, Weather, Vehicle type

I used One-Hot Encoding for categorical variables and StandardScaler for numerical variables. The preprocessing steps were fitted on the training set only.

Overall test performance : MAE: 3.27 minutes, RMSE: 5.63 minutes, R²: 0.855

These results look reasonably good overall.

The problem

When I analyze the model's errors on long deliveries, I notice a significant performance degradation.

I defined long deliveries as durations above 77 minutes, based on the upper Tukey fence calculated from the training target distribution.

On the independent test set, I obtained:

  • 37 long deliveries
  • MAE: 14.76 minutes
  • Mean signed error (prediction - actual): -13.12 minutes

This indicates that the model systematically underestimates long delivery durations.

What I have investigated so far

I also experimented with feature engineering by adding: Squared distance, Distance × traffic, Distance × number of stops

However, these additional features did not meaningfully improve overall performance or solve the long-delivery problem.

I decided to retain the original model for now.

My questions

  1. What are the most likely explanations for this behavior? Could it be a limitation of linear regression, insufficient representation of long-distance examples, missing features, or a combination of these factors?
  2. How would you investigate whether the problem comes from the data, the model's assumptions, or the feature representation?
  3. Would you recommend trying polynomial regression, interaction terms, a decision tree, Random Forest, or another approach?
  4. How can I improve predictions for long deliveries without significantly degrading performance on shorter deliveries?
  5. With only 37 long deliveries in the test set, what statistical precautions should I take before drawing conclusions?

I'm particularly interested in understanding the reasoning behind the diagnostic process, not just receiving a recommendation to switch algorithms.

Thank you for your insights!


r/learnmachinelearning • • 11d ago

The Definitive Fine-Tuning Guide for 3D Generation Models

1 Upvotes

r/learnmachinelearning • • 12d ago

Keywords for a Machine Learning Engineer Resume — PyTorch, MLOps & LLMs

13 Upvotes

Keywords list taken from Resume Fitting

The most commonly scanned keywords in ML engineering and AI job postings.

ML Frameworks

PyTorch TensorFlow Keras scikit-learn XGBoost LightGBM HuggingFace JAX

MLOps & Infrastructure

MLflow Kubeflow Apache Airflow DVC feature store model registry model serving BentoML

Cloud & Compute

AWS SageMaker Google Vertex AI Azure ML CUDA GPU training distributed training Apache SparkRay

Model Development

LLMs large language models transformers RLHF RAG fine-tuning model evaluation A/B testing

Data Engineering

feature engineering data pipelines ETL Apache Kafka data versioning training data label management data preprocessing

Languages & Tools

Python SQL Docker Kubernetes Git Jupyter CI/CD REST APIs

Keywords list taken from Resume keywords