This project uses an Autoencoder neural network to detect fraudulent mobile money transactions in real-time. It includes a web-based dashboard that simulates a live security monitor.
The dashboard visualizes the reconstruction error (MSE). Normal transactions (blue) have low error, while fraud (red spikes) exceeds the threshold.

The model is an anomaly detector trained only on normal transactions.
- Normal Input: The model reconstructs it well (Low MSE).
- Fraud Input: The model cannot reconstruct it (High MSE).
- Threshold: If MSE > 95th percentile of normal data, the transaction is flagged.
- Source: PaySim (Mobile Money Simulation) on Kaggle.
- Filtering: Used only
TRANSFERandCASHOUTtypes. - Preprocessing: Log transformation and Standard Scaling applied to amounts and balances.
- ML: TensorFlow/Keras, Scikit-learn
- Backend: FastAPI, Uvicorn
- Visualization: Chart.js (Frontend), Matplotlib
- Tunneling: Pyngrok (to expose the local server)
- Open
RT_FraudDetection.ipynbin Google Colab or Jupyter. - Upload the CSV you downloaded from Kaggle.
- Run the cells to train the Autoencoder.
- The final cell launches the server and generates a public URL (e.g.,
ngrok-free.dev). - Click the link to view the live simulation.