All about the Mpesa statement prediction
# M-Pesa Spending Prediction
M-Pesa is a mobile money service launched by Safaricom, Kenya’s leading telecommunications company, in 2007. It has revolutionized financial transactions, allowing users to send, receive, deposit, and withdraw money using their mobile phones. M-Pesa has played a significant role in financial inclusion, particularly for unbanked populations
# What’s an M-Pesa Statement?
An M-Pesa statement is a log of all your M-Pesa transactions over a selected period basically your mobile money history.
# Project Description
This project involves the extraction, cleaning, and analysis of M-Pesa transaction data to uncover personal spending patterns. Leveraging Python and Pandas for data preprocessing, the statements were converted from PDF to structured formats. Advanced analytics and forecasting models (e.g., Prophet) were applied to predict future expenses, visualize trends over time, and generate automated financial insights.
## Features
- **Data Collection**: Utilizes Python modules like
1. (pikepdf)
2. (tabula.io - reading the pdf file)
3. (PyPDF2)
- **Data Anonymise**: Removes and anonymise the data
- **Data Cleaning**: Modifies the data, Removes Duplicates, change data types.
- **Data Connection**: Connects the cleaned data into database and saves it for future usage
- **Exploratory Data Analysis and Visualization**: Finding insight and correlation on dataset by answering the following question
- What day of the week do I spend the most money?
1. Spending Patterns
- Which transaction types (e.g., Buy Goods, PayBill, Withdraw) do I use most?
2. People or Places You Transact With
- Which parties do I send/receive money to/from the most?
3. Balance & Financial
- Do larger transactions lead to lower account balances?
- **Data Modelling**: Entails
1. looking for missing values,
2. check outliners(Uses Quantiles range),
3. filling values with median
4. Label Encoding
5. Scaling Values
6. Linear Regression
7. Random Forest Regressor
8. xgboost …