An enterprise-grade fraud detection system leveraging advanced machine learning algorithms, ensemble methods, and real-time transaction analysis to detect and prevent fraudulent activities with 99.92% accuracy.
๐ Demo โข ๐ Mathematical Approach โข โจ Features โข ๐ ๏ธ Tech Stack โข ๐ฆ Installation โข ๐ซ Contact
Defraudo is a production-ready, full-stack fraud detection platform designed for financial institutions and payment processors. The system combines cutting-edge machine learning algorithms with a robust MERN stack infrastructure to deliver real-time fraud detection with exceptional accuracy on highly imbalanced datasets.
| Metric | Value | Description |
|---|---|---|
| Accuracy | 99.92% | Overall classification accuracy on test set |
| Precision | 95.7% | Minimizes false positives (legitimate flagged as fraud) |
| Recall | 82.4% | Maximizes fraud detection rate |
| F1-Score | 88.5% | Harmonic mean of precision and recall |
| ROC-AUC | 0.987 | Area under ROC curve |
| PR-AUC | 0.854 | Precision-Recall AUC (critical for imbalanced data) |
| Latency | <50ms | Real-time prediction response time |
- Advanced ML Pipeline: Implements XGBoost, Random Forest, and LightGBM with Bayesian hyperparameter optimization
- Class Imbalance Handling: SMOTE, ADASYN, and ensemble-based resampling techniques
- Feature Engineering: PCA-derived features, temporal patterns, statistical aggregations
- Real-time Processing: Sub-50ms prediction latency with concurrent request handling
- Production Architecture: Microservices-based design with RESTful APIs and JWT authentication
Fraud detection is formulated as a binary classification problem with extreme class imbalance:
where:
-
$X \in \mathbb{R}^{n \times d}$ is the feature matrix ($n$ transactions,$d$ features) -
$\hat{y}$ is the predicted label (0: legitimate, 1: fraudulent) - Class distribution:
$P(y=1) \approx 0.17%$ (highly imbalanced)
The dataset contains 28 PCA-transformed features (
where
To handle skewed distributions:
Generates synthetic samples using k-nearest neighbors:
where:
-
$X_i$ is a minority class sample -
$X_{\text{nn}}$ is one of its k-nearest neighbors -
$\lambda \sim U(0,1)$ is a random interpolation factor
Sampling Strategy:
Objective function with regularization:
where:
-
$l$ is the loss function (binary cross-entropy) -
$f_t$ is the$t$ -th tree -
$T$ is the number of leaves -
$\gamma, \lambda$ are regularization parameters
Key Hyperparameters:
- Learning rate:
$\eta = 0.01$ - Max depth: 6
- Subsample ratio: 0.8
- Min child weight: 1
Ensemble of decision trees with bootstrap aggregating:
where
Gini Impurity for split criterion:
Uses Gradient-based One-Side Sampling (GOSS) and Exclusive Feature Bundling (EFB):
where
Binary Cross-Entropy Loss:
With class weights to handle imbalance:
where:
-
$\text{TPR} = \frac{TP}{TP + FN}$ (True Positive Rate) -
$\text{FPR} = \frac{FP}{FP + TN}$ (False Positive Rate)
Ranges from -1 to 1; ideal for imbalanced datasets.
Bayesian Optimization using Optuna framework:
where
Uses Tree-structured Parzen Estimator (TPE) to model:
Search Space:
- Learning rate:
$\eta \in [0.001, 0.3]$ (log scale) - Max depth:
$[3, 10]$ - Number of estimators:
$[100, 1000]$ - Subsample:
$[0.5, 1.0]$
Soft Voting for final prediction:
where:
-
$M$ is the number of models (XGBoost, Random Forest, LightGBM) -
$w_i$ are model weights based on validation performance -
$P_i(c|x)$ is the predicted probability from model$i$
Optimal classification threshold
Default:
React 18.3 with hooks | TailwindCSS 3.4 for styling | Vite for blazing-fast builds | React Router v6 for navigation | Context API for state management
Node.js 20+ with Express.js | JWT authentication | Bcrypt password hashing | Mongoose ODM | CORS & security middleware
MongoDB 7.0 for document storage | Mongoose 8.0 for schema validation | Indexed queries for performance | Transaction logging & audit trails
Python 3.11+ | Flask 3.0 REST API | Scikit-learn 1.3+ for ML models | XGBoost 2.0 gradient boosting | LightGBM 4.0 for fast training | Pandas & NumPy for data manipulation | Optuna for hyperparameter tuning | Imbalanced-learn for SMOTE/ADASYN | Joblib for model serialization
Git version control | GitHub repository hosting | VS Code IDE | Postman API testing | npm/pip package management | ESLint code linting | Prettier code formatting
Matplotlib & Seaborn for ML visualizations | Chart.js for frontend dashboards | ROC curves, confusion matrices, feature importance plots
- JWT (JSON Web Tokens) for stateless authentication
- Bcrypt for password hashing (10 rounds)
- CORS configuration for cross-origin requests
- Helmet.js for HTTP header security
- Rate limiting to prevent DoS attacks
- Input validation with Joi/express-validator
- HTTPS encryption in production
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PRESENTATION LAYER โ
โ React Frontend (client_new/) + TailwindCSS + Vite โ
โ โข User authentication UI โ
โ โข Transaction submission forms โ
โ โข Real-time fraud detection dashboard โ
โ โข Analytics & visualization โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTP/REST API
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ APPLICATION LAYER โ
โ Node.js + Express.js Backend (server/) โ
โ โข JWT authentication middleware โ
โ โข Transaction API endpoints โ
โ โข Request validation & error handling โ
โ โข Communication with ML service โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโผโโโโโโโโโโโ โโโโโโโโโโโผโโโโโโโโโโ
โ DATA LAYER โ โ ML SERVICE โ
โ MongoDB โ โ Python Flask โ
โ โข User data โ โ (Model/api/) โ
โ โข Transactions โ โ โข Preprocessing โ
โ โข Audit logs โ โ โข Feature eng. โ
โโโโโโโโโโโโโโโโโโโโ โ โข Prediction โ
โ โข Ensemble โ
โโโโโโโโโโโโโโโโโโโโโ
Defraudo/
โโโ ๐ client_new/ # React Frontend Application
โ โโโ ๐ src/
โ โ โโโ ๐ api/ # API client functions
โ โ โ โโโ ๐ transactionApi.js # Transaction service integration
โ โ โโโ ๐ components/ # Reusable React components
โ โ โ โโโ ๐ Navbar.jsx # Navigation bar with theme toggle
โ โ โ โโโ ๐ TransactionForm.jsx # Transaction submission form
โ โ โ โโโ ๐ TransactionList.jsx # Transaction history display
โ โ โ โโโ ๐ Footer.jsx # Application footer
โ โ โโโ ๐ context/ # React Context providers
โ โ โ โโโ ๐ ThemeContext.jsx # Dark/Light theme management
โ โ โ โโโ ๐ AuthContext.jsx # Authentication state
โ โ โโโ ๐ pages/ # Route page components
โ โ โ โโโ ๐ Home.jsx # Landing page
โ โ โ โโโ ๐ Login.jsx # User login
โ โ โ โโโ ๐ Register.jsx # User registration
โ โ โ โโโ ๐ TransactionPage.jsx # Transaction dashboard
โ โ โโโ ๐ App.jsx # Main application component
โ โ โโโ ๐ main.jsx # React entry point
โ โ โโโ ๐ index.css # Global styles
โ โโโ ๐ index.html # HTML template
โ โโโ ๐ package.json # Dependencies & scripts
โ โโโ ๐ tailwind.config.js # TailwindCSS configuration
โ โโโ ๐ vite.config.js # Vite build configuration
โ โโโ ๐ postcss.config.js # PostCSS configuration
โ โโโ ๐ eslint.config.js # ESLint rules
โ
โโโ ๐ server/ # Node.js + Express Backend
โ โโโ ๐ config/
โ โ โโโ ๐ db.js # MongoDB connection setup
โ โโโ ๐ controllers/
โ โ โโโ ๐ authController.js # Authentication logic
โ โ โโโ ๐ transactionController.js # Transaction CRUD operations
โ โโโ ๐ middlewares/
โ โ โโโ ๐ authMiddleware.js # JWT verification middleware
โ โโโ ๐ models/
โ โ โโโ ๐ User.js # User schema (Mongoose)
โ โ โโโ ๐ Transaction.js # Transaction schema (Mongoose)
โ โโโ ๐ routes/
โ โ โโโ ๐ authRoutes.js # Auth endpoints
โ โ โโโ ๐ transactionRoutes.js # Transaction endpoints
โ โโโ ๐ server.js # Express server entry point
โ โโโ ๐ package.json # Backend dependencies
โ
โโโ ๐ Model/ # ML Fraud Detection Pipeline
โ โโโ ๐ api/ # Flask REST API
โ โ โโโ ๐ __init__.py
โ โ โโโ ๐ app.py # API endpoints (predict, batch)
โ โโโ ๐ configs/
โ โ โโโ ๐ config.yaml # Model hyperparameters & settings
โ โโโ ๐ data/
โ โ โโโ ๐ raw/ # Original dataset (creditcard.csv)
โ โ โโโ ๐ processed/ # Preprocessed & split data
โ โโโ ๐ logs/ # Training logs & visualizations
โ โ โโโ ๐ plots/ # ROC curves, confusion matrices
โ โโโ ๐ models/ # Serialized trained models
โ โ โโโ ๐ fraud_detector.joblib # Primary model (XGBoost/ensemble)
โ โ โโโ ๐ preprocessor.joblib # StandardScaler & transformers
โ โ โโโ ๐ feature_engineer.joblib # Feature engineering pipeline
โ โโโ ๐ notebooks/ # Jupyter notebooks (EDA)
โ โโโ ๐ src/ # Core ML modules
โ โ โโโ ๐ __init__.py
โ โ โโโ ๐ config.py # Configuration management
โ โ โโโ ๐ data_loader.py # Dataset loading & downloading
โ โ โโโ ๐ preprocessor.py # Data cleaning & scaling
โ โ โโโ ๐ feature_engineer.py # Feature transformations
โ โ โโโ ๐ model_trainer.py # Model training & tuning
โ โ โโโ ๐ evaluator.py # Performance evaluation
โ โ โโโ ๐ predictor.py # Inference interface
โ โโโ ๐ tests/
โ โ โโโ ๐ __init__.py
โ โ โโโ ๐ test_pipeline.py # Unit tests
โ โโโ ๐ train.py # Main training script
โ โโโ ๐ download_data.py # Kaggle dataset downloader
โ โโโ ๐ requirements.txt # Python dependencies
โ โโโ ๐ README.md # ML pipeline documentation
โ
โโโ ๐ fraud_detection_app/ # Flutter Mobile App (Optional)
โ โโโ ๐ lib/
โ โ โโโ ๐ main.dart # Flutter app entry point
โ โ โโโ ๐ config/ # App configuration
โ โ โโโ ๐ models/ # Data models
โ โ โโโ ๐ providers/ # State management
โ โ โโโ ๐ screens/ # UI screens
โ โ โโโ ๐ services/ # API services
โ โโโ ๐ pubspec.yaml # Flutter dependencies
โ โโโ ๐ analysis_options.yaml # Dart analyzer options
โ
โโโ ๐ package.json # Root workspace configuration
โโโ ๐ README.md # This file (project documentation)
| Directory | Purpose | Technologies |
|---|---|---|
| client_new/ | Modern React frontend with TailwindCSS styling | React, TailwindCSS, Vite, Axios |
| server/ | RESTful API backend with authentication | Node.js, Express, MongoDB, JWT |
| Model/ | End-to-end ML pipeline from training to deployment | Python, Scikit-learn, XGBoost, Flask |
| fraud_detection_app/ | Cross-platform mobile application | Flutter, Dart |
Ensure you have the following installed on your system:
| Software | Version | Purpose |
|---|---|---|
| Node.js | 20.x or higher | Backend & frontend runtime |
| npm | 10.x or higher | Package manager |
| Python | 3.11+ | ML model training & API |
| pip | Latest | Python package installer |
| MongoDB | 7.0+ | Database (local or Atlas) |
| Git | Latest | Version control |
Optional but recommended:
- CUDA Toolkit (for GPU acceleration during training)
- Postman (for API testing)
- VS Code (recommended IDE)
git clone https://github.com/manan-monani/Payment-Fraud-Detection-Model.git
cd Payment-Fraud-Detection-Model# Navigate to server directory
cd server
# Install dependencies
npm install
# Install additional security packages (if not in package.json)
npm install helmet express-rate-limit joiCreate a .env file in the server/ directory:
# Server Configuration
PORT=7000
NODE_ENV=production
# MongoDB Configuration
MONGO_URI=mongodb://localhost:27017/fraud_detection
# Or use MongoDB Atlas:
# MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/fraud_detection?retryWrites=true&w=majority
# JWT Configuration
JWT_SECRET=your_super_secure_jwt_secret_key_here_min_32_chars
JWT_EXPIRE=7d
# CORS Configuration
CLIENT_URL=http://localhost:5173
# ML Service URL
ML_API_URL=http://localhost:5000Security Best Practices:
- Generate a strong JWT secret:
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))" - Never commit
.envto version control - Use environment-specific
.envfiles (.env.development,.env.production)
# Development mode with auto-reload
npm run dev
# Production mode
npm startServer will be running at http://localhost:7000
# Navigate to frontend directory
cd ../client_new
# Install dependencies
npm install
# Install additional dependencies (if needed)
npm install axios react-router-domCreate a .env file in the client_new/ directory:
VITE_API_URL=http://localhost:7000/api
VITE_ML_API_URL=http://localhost:5000npm run devFrontend will be running at http://localhost:5173
# Navigate to ML directory
cd ../Model
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# If requirements.txt is missing, install manually:
pip install flask flask-cors pandas numpy scikit-learn xgboost lightgbm \
optuna imbalanced-learn matplotlib seaborn joblib pyyaml kaggleOption 1: Kaggle API (Recommended)
# Configure Kaggle API credentials
# Download kaggle.json from https://www.kaggle.com/settings/account
# Place in:
# Windows: C:\Users\<Username>\.kaggle\kaggle.json
# Linux/Mac: ~/.kaggle/kaggle.json
# Download dataset
python download_data.py
# Or using Kaggle CLI directly:
kaggle datasets download -d mlg-ulb/creditcardfraud
unzip creditcardfraud.zip -d data/raw/Option 2: Manual Download
- Visit Credit Card Fraud Detection Dataset
- Download
creditcard.csv - Place in
Model/data/raw/directory
Option 3: Synthetic Data (for testing)
python train.py --synthetic --samples 100000# Quick training (no hyperparameter tuning) - ~5 minutes
python train.py --quick
# Full training with Optuna hyperparameter tuning - ~30-60 minutes
python train.py
# Train specific model
python train.py --model xgboost
# Train ensemble model (recommended for best performance)
python train.py --model ensemble
# Compare multiple models
python train.py --compare# Development server
python -m api.app
# Or using Flask CLI
export FLASK_APP=api.app
flask run --host=0.0.0.0 --port=5000
# Production server with Gunicorn (Linux/Mac)
pip install gunicorn
gunicorn api.app:app -w 4 -b 0.0.0.0:5000 --timeout 120
# Production server with Waitress (Windows)
pip install waitress
waitress-serve --host=0.0.0.0 --port=5000 api.app:appML API will be running at http://localhost:5000
Option A: Local MongoDB
# Windows (with MongoDB installed)
net start MongoDB
# Linux
sudo systemctl start mongod
# macOS (with Homebrew)
brew services start mongodb-communityOption B: MongoDB Atlas (Cloud)
- Create account at MongoDB Atlas
- Create a new cluster (free tier available)
- Create a database user
- Whitelist your IP address (or allow from anywhere for development)
- Get connection string and update
MONGO_URIin.env
Open 3 separate terminals:
# Terminal 1: Backend
cd server
npm start
# Terminal 2: Frontend
cd client_new
npm run dev
# Terminal 3: ML Service
cd Model
python -m api.appAccess the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:7000
- ML API: http://localhost:5000
- API Docs: http://localhost:5000/ (ML API info)
Test each service independently:
# Test Backend
curl http://localhost:7000/api/auth/health
# Test ML API
curl http://localhost:5000/health
# Test MongoDB connection
# From MongoDB shell:
mongosh
use fraud_detection
db.users.find()| Issue | Solution |
|---|---|
| Port already in use | Change port in .env or kill process: npx kill-port 7000 |
| MongoDB connection failed | Check if MongoDB is running, verify MONGO_URI |
| Python module not found | Activate virtual environment, reinstall requirements |
| CORS errors | Check CLIENT_URL in backend .env, verify CORS configuration |
| Model not found | Run python train.py to train model first |
| Memory error during training | Reduce dataset size or use --quick flag |
๐ Dark Mode | โ๏ธ Light Mode
Beautiful, responsive UI with seamless theme switching
Base URL: http://localhost:7000/api/auth
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/register |
Register a new user | โ |
POST |
/login |
User login (returns JWT token) | โ |
GET |
/profile |
Get current user profile | โ |
PUT |
/profile |
Update user profile | โ |
POST /api/auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "SecurePass123!"
}
# Response (201 Created)
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": "648f1a2c3d4e5f6g7h8i9j0k",
"name": "John Doe",
"email": "john@example.com"
}
}POST /api/auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "SecurePass123!"
}
# Response (200 OK)
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": "648f1a2c3d4e5f6g7h8i9j0k",
"name": "John Doe",
"email": "john@example.com"
}
}Base URL: http://localhost:7000/api/transactions
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/ |
Get all user transactions | โ |
GET |
/:id |
Get specific transaction | โ |
POST |
/ |
Create new transaction & check for fraud | โ |
DELETE |
/:id |
Delete transaction | โ |
POST /api/transactions
Authorization: Bearer <JWT_TOKEN>
Content-Type: application/json
{
"amount": 150.00,
"merchant": "Amazon",
"location": "New York, USA",
"device_id": "device_12345",
"description": "Online purchase"
}
# Response (201 Created)
{
"success": true,
"transaction": {
"id": "648f2b3c4d5e6f7g8h9i0j1k",
"user_id": "648f1a2c3d4e5f6g7h8i9j0k",
"amount": 150.00,
"merchant": "Amazon",
"location": "New York, USA",
"device_id": "device_12345",
"fraud_prediction": {
"is_fraud": false,
"fraud_probability": 0.023,
"risk_level": "VERY LOW",
"confidence": 0.977
},
"timestamp": "2026-01-03T10:30:45.123Z"
}
}Base URL: http://localhost:5000
| Method | Endpoint | Description | Rate Limit |
|---|---|---|---|
GET |
/ |
API information | None |
GET |
/health |
Health check | None |
GET |
/model/info |
Model metadata & performance | None |
POST |
/predict |
Single transaction prediction | 100/min |
POST |
/predict/batch |
Batch prediction (up to 1000) | 10/min |
GET |
/threshold |
Get current threshold | None |
POST |
/threshold |
Update classification threshold | None |
POST /predict
Content-Type: application/json
{
"Time": 0,
"V1": -1.359807134,
"V2": -0.072781173,
"V3": 2.536346738,
"V4": 1.378155224,
"V5": -0.338320769,
"V6": 0.462387778,
"V7": 0.239598554,
"V8": 0.098697901,
"V9": 0.363786970,
"V10": 0.090794172,
"V11": -0.551599533,
"V12": -0.617800856,
"V13": -0.991389847,
"V14": -0.311169354,
"V15": 1.468176972,
"V16": -0.470400525,
"V17": 0.207971242,
"V18": 0.025790626,
"V19": 0.403992960,
"V20": 0.251412098,
"V21": -0.018306778,
"V22": 0.277837576,
"V23": -0.110473910,
"V24": 0.066928075,
"V25": 0.128539358,
"V26": -0.189114844,
"V27": 0.133558377,
"V28": -0.021053053,
"Amount": 149.62
}
# Response (200 OK)
{
"success": true,
"prediction": {
"is_fraud": false,
"label": "Legitimate",
"fraud_probability": 0.0234,
"confidence": 0.9766,
"risk_level": "VERY LOW",
"threshold": 0.5
},
"processing_time_ms": 12.45
}| Probability Range | Risk Level | Action Recommendation |
|---|---|---|
| 0.00 - 0.20 | VERY LOW | โ Approve automatically |
| 0.20 - 0.40 | LOW | โ Approve with monitoring |
| 0.40 - 0.60 | MEDIUM | |
| 0.60 - 0.80 | HIGH | |
| 0.80 - 1.00 | VERY HIGH | โ Block and alert |
POST /predict/batch
Content-Type: application/json
{
"transactions": [
{
"Time": 0,
"V1": -1.35,
"V2": -0.07,
// ... V3-V28
"Amount": 149.62
},
{
"Time": 1,
"V1": 1.19,
"V2": 0.26,
// ... V3-V28
"Amount": 2.69
}
]
}
# Response (200 OK)
{
"success": true,
"predictions": [
{
"is_fraud": false,
"fraud_probability": 0.023,
"risk_level": "VERY LOW"
},
{
"is_fraud": false,
"fraud_probability": 0.015,
"risk_level": "VERY LOW"
}
],
"summary": {
"total": 2,
"fraudulent": 0,
"legitimate": 2,
"processing_time_ms": 25.67
}
}GET /model/info
# Response (200 OK)
{
"success": true,
"model": {
"name": "XGBoost Fraud Detector",
"version": "2.0.0",
"type": "ensemble",
"algorithms": ["xgboost", "random_forest", "lightgbm"],
"training_date": "2026-01-03",
"dataset_size": 284807,
"features": 30
},
"performance": {
"accuracy": 0.9992,
"precision": 0.957,
"recall": 0.824,
"f1_score": 0.885,
"roc_auc": 0.987,
"pr_auc": 0.854
},
"threshold": 0.5
}// 400 Bad Request
{
"success": false,
"error": "Validation Error",
"message": "Missing required features: V1, V2, Amount"
}
// 401 Unauthorized
{
"success": false,
"error": "Authentication Failed",
"message": "Invalid or expired token"
}
// 429 Too Many Requests
{
"success": false,
"error": "Rate Limit Exceeded",
"message": "Too many requests. Please try again later.",
"retry_after": 60
}
// 500 Internal Server Error
{
"success": false,
"error": "Internal Server Error",
"message": "Model prediction failed"
}The ML ensemble model detects fraud based on sophisticated pattern recognition and statistical anomaly detection:
Flags transactions with
Patterns:
- ๐ต Significantly higher amounts than user's typical spending
- ๐ฐ Micro-transactions (< $1) often used for card testing
- ๐ Progressive amount increase (velocity-based fraud)
- โฐ Odd timing: Transactions at 2-5 AM (higher fraud probability)
- โก Rapid consecutive transactions: Multiple transactions within seconds
- ๐ Day-of-week patterns: Unusual activity on weekends
- ๐ฑ New Device ID: First-time devices trigger additional scrutiny
- ๐ Impossible travel: Distance/time ratio exceeds physical limits (e.g., 1000 km in 1 hour)
- ๐ High-risk geolocation: Countries with elevated fraud rates
- ๐ฑ๏ธ Transaction frequency: Deviation from established patterns
- ๐ Merchant category: Unusual merchant types for user profile
- ๐ณ Purchase patterns: Inconsistent with historical behavior
The model analyzes interactions between PCA features: $$ \text{anomaly_score} = \sum_{i=1}^{28} w_i \cdot |V_i - \mu_{V_i}| + \sum_{i<j} w_{ij} \cdot V_i \cdot V_j $$
| Feature | Weight | Description |
|---|---|---|
| V14 | 0.18 | Highest correlation with fraud |
| V12 | 0.15 | Card usage patterns |
| V10 | 0.13 | Transaction frequency indicators |
| V17 | 0.12 | Geographic anomalies |
| V4 | 0.11 | Amount-related patterns |
| Amount | 0.09 | Transaction amount |
| Time | 0.07 | Temporal patterns |
- Consistent with user's historical spending patterns
- Recognizable device IDs
- Geographically plausible locations
- Normal transaction frequency
- Typical merchant categories
Full-Stack Developer | ML Engineer | Payment Systems Specialist
|
|
GitHub |
YouTube |
Kaggle |
|
LeetCode |
|||
|
mmmonani747@gmail.com |
Phone ๐ฎ๐ณ +91 70168 53244 |
Location ๐ Jamnagar, Gujarat, India |
Portfolio Website: ๐ง Coming Soon (Deployment in progress)
I'm open to:
- ๐ผ Full-time opportunities in ML/AI & Full-Stack Development
- ๐ค Collaboration on open-source projects
- ๐ Knowledge sharing & technical discussions
- ๐ Mentorship in ML, Python, and MERN stack
Response Time: Usually within 24 hours
Made with โค๏ธ by Manan Monani and the Defraudo Team
This project was developed and presented at Indus University by Team Defraudo:
|
Manan Monani Team Lead & ML Engineer GitHub |
Nevil Dhinoja Backend Developer |
Krishil Agrawal Frontend Developer |
|
Parthiv Panchal Full-Stack Developer |
Astha Makwana UI/UX Designer |
Yashvi Bhadani Data Analyst |
๐ Academic Project: Presented at Indus University as a capstone project demonstrating advanced ML techniques in financial fraud detection.
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 Manan Monani
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- Kaggle for providing the Credit Card Fraud Detection Dataset
- Indus University for academic support and resources
- Open Source Community for the amazing libraries and tools
- XGBoost, LightGBM & Scikit-learn teams for exceptional ML frameworks
-
Dataset: Machine Learning Group - ULB. (2018). Credit Card Fraud Detection. Kaggle. https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud
-
XGBoost: Chen, T., & Guestrin, C. (2016). XGBoost: A Scalable Tree Boosting System. KDD '16.
-
SMOTE: Chawla, N. V., et al. (2002). SMOTE: Synthetic Minority Over-sampling Technique. JAIR, 16, 321-357.
-
Imbalanced Learning: Lemaitre, G., et al. (2017). Imbalanced-learn: A Python Toolbox to Tackle the Curse of Imbalanced Datasets in Machine Learning. JMLR, 18(17), 1-5.
-
LightGBM: Ke, G., et al. (2017). LightGBM: A Highly Efficient Gradient Boosting Decision Tree. NIPS 2017.
-
Hyperparameter Optimization: Akiba, T., et al. (2019). Optuna: A Next-generation Hyperparameter Optimization Framework. KDD 2019.
