Vendor Invoice Intelligence System using Machine Learning for Cost Prediction and Risk Detection
Main Article Content
Abstract
The tracking of vendor invoices in large organizations requires the handling of thousands of invoices across multiple vendors, purchase orders, and deliveries. Manual record keeping not only is tedious but also can lead to errors, making it difficult for the finance team to detect any anomalies that pose a threat. The design, implementation, and deployment of this project includes developing a Vendor Invoice Intelligence System powered by machine learning techniques for automatically predicting invoices' freight costs and detecting potentially risky invoices. In order to accomplish that, the authors implement this system by using the programming language Python along with a relational SQLite database made up of five interrelated tables with more than one million records in total. Next, exploratory data analysis is performed, features are extracted from the raw data such as the freight per unit, delay in delivery, and mismatch between invoices at the dollar level, and regression and classification models are trained on that dataset. As for the model that yields the highest accuracy for the task of predicting invoices' freight costs, after comparing three algorithms, Linear Regression emerges as the winner with an R² score of 96.99 percent, Mean Absolute Error of 24.11, and Root Mean Squared Error of 124.72. In terms of invoice risk detection, after comparing three different classification algorithms, Random Forest is the model that performs the best with an accuracy of 88 percent and a weighted F1 score of 0.87. Finally, both tasks are deployed on an interactive Streamlit web application in which invoices' information can be inputted and analyzed in real-time regardless of the user's technical background.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
CC BY-NC-SA 4.0
Attribution Non-Commercial Share-alike 4.0 International
Visit here for more details: https://creativecommons.org/licenses/by-nc-sa/4.0/
References
Abdallah, A., Maarof, M. A., & Zainal, A. Fraud detection system: A survey. Journal of Network and Computer Applications, 68, 90-113.
Carbonneau, R., Laframboise, K., & Vahidov, R. Application of machine learning techniques for supply chain demand forecasting. European journal of operational research, 184(3), 1140-1154.
Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. SMOTE: synthetic minority over-sampling technique. Journal of artificial intelligence research, 16, 321-357.
Géron, A. . Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow. " O'Reilly Media, Inc.".
Mishra, A. (n.d.). Vendor invoice intelligence system [Video tutorial series]. YouTube. Available online: https://www.youtube.com/@AyushiMishra
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., ... & Duchesnay, É. Scikit-learn: Machine learning in Python. The Journal of machine Learning research, 12, 2825-2830.
Raschka, S., & Mirjalili, V.. Python machine learning: Machine learning and deep learning with Python, scikit-learn, and TensorFlow 2. Packt publishing ltd.
Zheng, L., Liu, G., Yan, C., & Jiang, C. Transaction fraud detection based on total order relation and behavior diversity. IEEE Transactions on Computational Social Systems, 5(3), 796-806.
Breiman, L. (2001). Random forests. Machine learning, 45(1), 5-32.
Chen, T., & Guestrin, C. (2016, August). Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining (pp. 785-794).
Han, J., Kamber, M., & Mining, D. (2006). Concepts and techniques. Morgan Kaufmann, 340(1), 94104-103205.
James, G., Witten, D., Hastie, T., & Tibshirani, R. (2021). An Introduction to Statistical Learning with Applications in R (2nd ed.), 978-1-0716-1418-1, Springer.
Kotu, V., & Deshpande, B. . Data science: concepts and practice. Morgan Kaufmann.
Ngai, E. W., Hu, Y., Wong, Y. H., Chen, Y., & Sun, X. . The application of data mining techniques in financial fraud detection: A classification framework and an academic review of literature. Decision support systems, 50(3), 559-569.
Mishra, A. (n.d.). Vendor invoice intelligence system Dataset Kaggle Available online: https://www.kaggle.com/ayushimishra2809