- Project Overview
- Business Objective
- Data Source
- Exploratory Data Analysis (EDA)
- Models Used
- Evaluation Metrics
- Application
- Project Structure
- How to Run This Project
- Author
This project implements an end-to-end Machine Learning system designed to support finance teams by:
- Predicting expected freight costs for vendor invoices
- Flagging high-risk invoices that require manual review
The system helps detect abnormal cost, freight, and operational patterns.
- Invoice Cost Leakage: Minimize unnecessary expenses
- Audit Risk Management: Ensure compliance and financial accuracy
Data is stored in a relational SQLite database containing:
- Vendor Invoice Table
- Purchase Table
- Purchase Prices Table
- Inventory Table
- Analyzed cost distribution and anomaly patterns
- Performed feature engineering
- Used statistical tests (T-test) to validate feature significance
- Linear Regression
- Decision Tree
- Random Forest
- Logistic Regression
- Random Forest (final model)
- Tuned using GridSearchCV
- Handles class imbalance
- RMSE
- R² Score
- Precision
- Recall
- F1 Score
- Built using Streamlit
- Provides a user-friendly interface for:
- Inputting invoice data
- Getting real-time predictions
- Flagging risky invoices
├── 📁 freight_cost_prediction
│ ├── 📁 models
│ ├── data_preprocessing.py
│ ├── model_evaluation.py
│ └── train.py
├── 📁 invoice_flagging
│ ├── data_preprocessing.py
│ ├── model_evaluation.py
│ └── train.py
├── 📁 inferencing
│ ├── predict_freight.py
│ └── predict_invoice_flag.py
├── 📁 models
│ ├── predict_flag_invoice.pkl
│ ├── predict_freight_model.pkl
│ └── scaler.pkl
├── 📁 notebooks
│ ├── flagVendorInvoice.ipynb
│ └── freightCost.ipynb
├── .gitignore
├── app.py
└── requirements.txt
git clone https://github.com/Prashantbhati7/invoice-intelligence.git
cd invoice-intelligence--
python freight_cost_prediction/train.pypython invoice_flagging/train.pystreamlit run app.py- Make sure
.pklmodel files are generated before running the app - If errors occur, verify dependencies installation
- Use a virtual environment to avoid conflicts
Prashant Bhati