--- title: FaudDetectionClassification emoji: 💳 colorFrom: indigo colorTo: pink sdk: docker app_port: 8501 tags: - streamlit pinned: false short_description: Fraud detection for online payments using a Random Forest license: mit --- # 💳 Payment Fraud Detection This project demonstrates how machine learning can be used to detect fraudulent online payment transactions. The Streamlit app allows users to enter transaction details and receive a prediction: - **0** → Not Fraud - **1** → Fraud --- ## 🚀 Application Overview The app predicts fraud based on transaction-related features such as: - Account age - Number of purchased items - Transaction time - Payment method and payment method age The goal is to accurately detect fraudulent transactions while minimizing false alarms. --- ## 🤖 Model - **Algorithm:** Random Forest Classifier - **Problem Type:** Binary Classification (Fraud vs. Not Fraud) - **Class Imbalance Handling:** SMOTE (Synthetic Minority Oversampling Technique) - **Evaluation Metrics:** Accuracy, Precision, Recall, F1-score, ROC-AUC Among all tested models, Random Forest achieved the best performance and was selected as the final model. --- ## 📊 Model Performance (Summary) - Excellent separation between fraud and non-fraud transactions - High precision and recall for fraud detection - Robust performance on imbalanced data --- ## 🛠 How to Run Locally ```bash pip install -r requirements.txt streamlit run app.py