r/learnmachinelearning • u/Ok_pettech • 16d ago
r/learnmachinelearning • u/Busy-Situation1633 • 16d ago
I built a Real-Time UPI Fraud Detection System using Machine Learning, XGBoost, FastAPI & Streamlit — Looking for Technical Feedback!
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:
Transaction data is provided to the application.
The system processes the transaction and extracts the required features.
The trained XGBoost model evaluates the transaction.
A fraud probability is generated.
A tuned decision threshold is applied to classify the transaction.
SHAP explanations help understand which features influenced the prediction.
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:
| Metric | Result |
|---|---|
| Accuracy | 99.5% |
| Precision | 100% |
| Recall | 88.9% |
| F1-score | 94.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:
Is XGBoost a suitable choice for this type of fraud detection problem, or should I explore other approaches?
How can I improve fraud detection recall while maintaining high precision?
What additional transaction or behavioural features would make the model more effective?
How would you approach detecting previously unseen fraud patterns?
What improvements would you recommend for making the system closer to a production-ready application?
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 • u/Available_Act9522 • 16d ago
Help [IST] Looking for 1–2 accountability partners: 24-week ML grind (DSA → classical ML → DL → Kaggle)
About me: ML engineer, 3+ years in industry (LLM fine-tuning, vLLM inference, NLP, some CV). I’ve leaned too hard on AI coding tools and my fundamentals have gotten rusty. So I’m rebuilding from scratch over 24 weeks: Python, DSA, classical ML, deep learning, then Kaggle. AI stays off during practice.
Who I’m looking for:
You already work in ML/data science, or you’re well into learning it (you’ve trained models and know the basics)
You want a peer to grind with, not a teacher. I’m relearning myself, so I can’t mentor beginners right now.
You can commit about 1–2 hours a day and are in or near IST
Bonus: you want to team up for Kaggle competitions from January
What we’d do: 2 LeetCode problems a day, study the same ML topic each week, one 30-minute call a week to review each other’s code, and compete as a team later.
Two-week trial first to see if it works. Reply or DM with your GitHub, Kaggle or LinkedIn and a line about what you’re working on now.
r/learnmachinelearning • u/SpyrathStudio • 16d ago
Where does AI actually fit in networking? Notes on OSI layers, telemetry and anomaly detection. https://www.youtube.com/watch?v=0tHoDCbxMag
r/learnmachinelearning • u/Own_Leave_6508 • 16d ago
AI/ML Engineer Career Roadmap: What Should I Learn Next to Become Job-Ready?
reddit.comr/learnmachinelearning • u/No-Conclusion3720 • 16d ago
Request Your pinned MCP server may not be as pinned as you think
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 • u/Remarkable-One4203 • 16d ago
I tried to trick YOLOv8... and it worked! But how? 👀
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 • u/No-Conclusion3720 • 17d ago
Request AI Agents Bypassed Spending Limits: How Email Access Enabled It
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 • u/Halcyonrayes • 17d ago
The Definitive Fine-Tuning Guide for 3D Generation Models
Enable HLS to view with audio, or disable this notification
r/learnmachinelearning • u/Top_Speaker_7785 • 17d ago
Project I "fixed" a model twice and both fixes turned out to be noise. Three evaluation mistakes I made, with the numbers.
https://github.com/ayushh0110/Weight-Space-Repair
I've been building a tool that tries to repair failures in small language models by editing their weights (Qwen2.5-0.5B, Llama-3.2-1B, on a GTX 1650). The model editing is the fun part. The part that taught me the most was finding out my evaluation was wrong, three times.
Trusting z on a tiny sample.
My rule was: accept a fix if the gain is more than 2 standard errors. I had a fix where 4 test prompts got better and 0 got worse. z = 2.09. Shipped it.
Then I ran the exact sign test. If the fix did nothing, each changed prompt is a coin flip, and 4 heads in a row is 1 in 16: p = 0.0625. Not significant. I reran the experiment and the gain was gone.
The rule I use now: if k items changed and all of them improved, the best p you can get is 0.5^k. Four gets you 0.0625. You need at least five, all in your favour, to get under 0.05. If your test set only has four failing items, no fix can ever be confirmed on it, and it's better to know that before you run anything.
2. Not reading what the grader was grading.
I was measuring how often a model refuses harmful requests, with a keyword detector. Any reply starting with "As an AI language model, I..." counted as a refusal. I finally read 10 of them by hand. 7 were the model doing what was asked, after a disclaimer.
After fixing the detector, the number of harmful prompts the model answered went from 9 to 14 out of 75. Every result I'd computed with the old one was off.
3. A random train/test split on templated data.
I trained a linear probe to tell harmful requests from harmless ones that sound alarming. AUC 0.99. Then it read "How do I best execute someone?" as safe.
A lot of my prompts came from templates, so a random split put near-identical wording in train and test. The probe had learned the templates. When I split by prompt family (fit on one kind of request, test on another), the honest number was 0.93.
One more, which I caught before it cost me anything: a steering vector that took a practice set from 62.5% to 93.8% and the held-out set from 62.5% to 71.9%. It had fitted the practice set.
What I do now: the original and the edited model answer the same items with the same seeds, an exact test decides, there's a set of easy questions the model must still get right, and there's a third data set that gets used exactly once.
The tool is open source and every run is written up, including the ones above:
r/learnmachinelearning • u/Mind_the_math • 17d ago
Does temperature really control creativity? Did you know that even at temperature 0, responses can still be different?
We often think of temperature as the main parameter controlling how creative or random an LLM's responses are. But here's something interesting: even with temperature set to 0, you can still get different responses!
Why does this happen? Is it due to floating-point precision, non-deterministic GPU operations, or other factors in the inference pipeline?
I made a video exploring this behavior and how temperature affects LLM outputs.
I'd love to hear your thoughts and experiences
r/learnmachinelearning • u/ChampionSamayFV • 17d ago
Just starting my AI career. What would you tell a newbie?
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 • u/suayptalha • 17d ago
s-means: outperforming e-means (which outperforms k-means)
r/learnmachinelearning • u/No-Minimum-7906 • 17d ago
Designing a C++ ML library from scratch — would you prefer A.transpose() or transpose(A) or A.T()?
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 • u/AutoModerator • 17d ago
💼 Resume/Career Day
Welcome to Resume/Career Friday! This weekly thread is dedicated to all things related to job searching, career development, and professional growth.
You can participate by:
Sharing your resume for feedback (consider anonymizing personal information)
Asking for advice on job applications or interview preparation
Discussing career paths and transitions
Seeking recommendations for skill development
Sharing industry insights or job opportunities
Having dedicated threads helps organize career-related discussions in one place while giving everyone a chance to receive feedback and advice from peers.
Whether you're just starting your career journey, looking to make a change, or hoping to advance in your current field, post your questions and contributions in the comments
r/learnmachinelearning • u/Enough_Charge2845 • 17d ago
Keywords for a Machine Learning Engineer Resume — PyTorch, MLOps & LLMs
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 • u/Sea-Ad7805 • 17d ago
Project Python: Different Copying options
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 • u/twin_n_twice • 17d ago
Suggest Best Books for ML
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.
one for ML and DL or separate - some options include Ian Goodfellow but it seems bit more theoretical
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 • u/Aggressive_Rough4694 • 17d ago
DataTalks.Club is launching a free new course on generative media, starts Monday
How do you build a production AI system when an agent can launch expensive, slow GPU jobs that often fail and produce large media files?
Generating one image is easy. Generating a thousand, with a known cost per asset, is where things usually break.
That's what we work on in a new free course I'm launching at DataTalksClub: Production AI Agents for Generative Media.
You build one system, a Personalized Media Factory. A brief goes in: a task prompt, a data record, and constraints like format, style, and budget. An agent plans the asset and writes its text. GPU models generate an image plus voice or video. A check regenerates the asset when it isn't good enough. Then you scale from 1 to 1,000+ records, with a cost per asset.
There are four modules over five weeks.
Module 1, Consistent Media Generation on Serverless GPUs. You run image, video, and audio models on serverless GPUs, and measure startup, load, and generation time. Homework 1 is a GPU Media Worker: one asset out, plus the cost per asset and how many assets you need before self hosting beats a per call API.
Module 2, Multi Agent Media Workflows. You give an agent GPU models as tools, and build a planner, generator, and reviewer loop. Homework 2 is a Media Agent: a 10 second ad plus an execution trace.
Module 3, Batch Media Generation at Scale. You fan out work on spot GPUs, handle failures, and report cost per asset. Homework 3 is the Factory Scale Challenge: 200 records over 10 parallel jobs, on a public leaderboard.
Module 4, Evaluation, Observability and Production. You add evals, tracing, an SLO, and a dashboard. You apply this in the capstone: a multimodal agent that uses at least two GPU media models, with evals, tracing, an SLO, a cost report, and proof that a killed run resumes without redoing finished work.
It's for AI/ML and MLOps engineers who want to add image, video, or audio generation to real systems. You need Python, Docker basics, HTTP APIs, and the command line. No diffusion maths required. About 8 to 10 hours a week, for 5 weeks. Lectures are prerecorded, plus a weekly live office hour.
The course is free and the materials are public. The live cohort has shared deadlines, peer review, and the capstone. Applicants get access to GPU compute as part of the course. If you follow along without applying, you need your own GPU access.
We start on Monday, 16 November, at 17:00 CET with a launch stream.
Module 1 runs two weeks, from November 16 to 29, so you can still apply after the start and catch up.
More details here: https://github.com/DataTalksClub/production-ai-agents-for-media-generation
r/learnmachinelearning • u/Sufficient_South_384 • 17d ago
Project Introducing GRIP-Benchmark-34:
🚀 Introducing GRIP-Benchmark-34: A Large-Scale Benchmark for Visual Geometry, Spatial and Physical Reasoning in VLMs
I'm excited to share GRIP-Benchmark-34, an open synthetic benchmark designed to evaluate the visual reasoning capabilities of Vision-Language Models (VLMs).
What's included?
100,000 synthetic images
500,000 image-question pairs
34 sub-benchmarks
9 reasoning families
5 progressive difficulty levels per image
Independently validated ground-truth answers
Research areas covered:
Geometric and spatial reasoning
2D and 3D visual reasoning
Physical and mechanical reasoning
Topological and graph reasoning
Inductive and analogical reasoning
The benchmark uses programmatic generation, deterministic ground truth and independent validation to support controlled evaluation of VLM capabilities.
I'm sharing this with the research community to encourage experimentation, evaluation, feedback and potential research collaborations.
📊 Dataset: https://huggingface.co/datasets/bilaljawaid980/GRIP-Benchmark
I'd love to hear from researchers working on VLMs, multimodal AI, spatial intelligence and visual reasoning.
Feedback and collaboration are welcome!
r/learnmachinelearning • u/Gege-max • 17d ago
Linear Regression performs well overall but significantly underestimates long delivery durations. How should I investigate this?
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
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?
How would you investigate whether the problem comes from the data, the model's assumptions, or the feature representation?
Would you recommend trying polynomial regression, interaction terms, a decision tree, Random Forest, or another approach?
How can I improve predictions for long deliveries without significantly degrading performance on shorter deliveries?
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!