A comprehensive fraud detection system with real-time monitoring, machine learning-based predictions, and interactive visualizations.
- Real-time fraud detection using machine learning
- Interactive dashboard with multiple visualizations
- Transaction monitoring and analysis
- Risk assessment and scoring
- User authentication and role-based access
- API endpoints for integration
- React.js
- Material-UI
- Recharts for visualizations
- Axios for API calls
- FastAPI
- Python
- Scikit-learn
- Pandas
- NumPy
fraud_detection/
├── backend/
│ ├── app/
│ │ ├── router.py
│ │ └── models/
│ ├── utils/
│ ├── config.py
│ └── main.py
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── services/
│ │ └── utils/
│ └── public/
└── README.md
- Python 3.8+
- Node.js 14+
- npm or yarn
-
Create a virtual environment:
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Start the backend server:
python -m uvicorn main:app --host 0.0.0.0 --port 8000 --reload
-
Install dependencies:
cd frontend npm install
-
Start the development server:
npm start
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
GET /api/v1/status
- API status checkPOST /api/v1/predict
- Fraud prediction endpointGET /api/v1/dashboard/summary
- Dashboard summary dataGET /api/v1/dashboard/fraud-distribution
- Fraud distribution dataGET /api/v1/dashboard/model-performance
- Model performance metrics
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Material-UI for the component library
- Recharts for the visualization library
- FastAPI for the backend framework
- Dataset Generation: 50,000 synthetic transactions with 10 relevant features
- Multiple ML Models: Implementation of 4 powerful algorithms
- Random Forest
- XGBoost
- LightGBM
- CatBoost
- Advanced Visualizations: 8 different types of data visualizations
- Class Imbalance Handling: SMOTE technique implementation
- Comprehensive Evaluation: Multiple performance metrics
fraud_detection/
├── data/ # Dataset directory
├── docs/ # Documentation and visualizations
├── models/ # Trained models
├── notebooks/ # Jupyter notebooks
├── src/ # Source code
└── tests/ # Unit tests
- Languages: Python 3.x
- ML Libraries:
- Scikit-learn
- XGBoost
- LightGBM
- CatBoost
- Data Processing:
- Pandas
- NumPy
- Visualization:
- Matplotlib
- Seaborn
- Plotly
- Development:
- Jupyter Notebooks
- Git
- Clone the repository
git clone https://github.com/Arindam-GitH/Payment-Fraud-Detection-.git
cd Payment-Fraud-Detection-
- Set up virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Run the analysis
python src/main.py
Each model is evaluated using:
- Accuracy
- Precision
- Recall
- F1-Score
- ROC-AUC Score
The project includes 8 different types of visualizations:
- Transaction Amount Distribution
- Fraud vs Non-Fraud Distribution
- Correlation Heatmap
- Transaction Time Analysis
- Amount vs Fraud Box Plot
- Customer Age Distribution
- Device Type Distribution
- Geographic Distribution
Feel free to submit issues and enhancement requests!
This project is licensed under the MIT License - see the LICENSE file for details.
Arindam Guha
- GitHub: @Arindam-GitH
⭐️ From Arindam-GitH