A machine learning-based fraud detection system with a Streamlit web interface for real-time transaction analysis.
This system uses a logistic regression model trained on transaction data to detect potentially fraudulent transactions. The web interface allows users to input transaction details and receive immediate fraud risk assessment.
- Interactive web interface using Streamlit
- Machine learning model for fraud detection
- Support for multiple transaction types
- Real-time prediction capabilities
- Balance tracking for both sender and receiver
- Visual feedback for prediction results
- Python 3.12 or higher
- pip package manager
- Required Python packages (listed in requirements.txt)
- Clone the repository:
git clone <repository-url>
cd Fraud-Detection-System- Install required packages:
pip install -r requirements.txt- Start the Streamlit web interface:
streamlit run fraud_detection.py- Access the application in your web browser at:
http://localhost:8501
-
Enter transaction details:
- Select transaction type (PAYMENT, TRANSFER, CASH_OUT, DEPOSIT)
- Enter transaction amount
- Input sender's old and new balance
- Input receiver's old and new balance
-
Click "Predict" to get fraud assessment
-
View results:
- Green message for legitimate transactions
- Red warning for potentially fraudulent transactions
Fraud-Detection-System/
├── fraud_detection.py # Main Streamlit application
├── analysis_model.ipynb # Model training notebook
├── requirements.txt # Project dependencies
├── fraud_detection_model.pkl # Trained model file
├── LICENSE
└── README.md
- Algorithm: Logistic Regression
- Features used:
- Transaction type
- Transaction amount
- Sender's balance (before and after)
- Receiver's balance (before and after)
- Training data: Financial transaction dataset with labeled fraud cases
If you encounter "command not found" errors:
# Install pipx
sudo apt install pipx
pipx ensurepath
# Install Streamlit globally
pipx install streamlitFeel free to submit issues and enhancement requests.
For any inquiries, please reach out to:
- Email: marcpon8@gmail.com
- GitHub: https://github.com/poncema4