Prediction of Car Prices in Nigeria Using Machine Learning Models

  • Samuel Oluyemi Owoeye

Abstract

In Nigeria, where more than 95% of vehicles are used cars, precise car valuation is essential for buyers, sellers, and dealers alike. This research employs machine learning techniques to forecast the prices of pre-owned cars based on various vehicle features. Data were collected from online car sales platforms in Nigeria, encompassing over 8,000 vehicles with attributes such as make, model, transmission type, and overall condition. Following data preprocessing, four machine learning algorithms were evaluated, namely Linear Regression, Random Forest, XGBoost, and Multi-Layer Perceptron (MLP) Regressor. The XGBoost model demonstrated superior performance, achieving a Root Mean Square Error (RMSE) of N7, 047, 536.43, a Mean Absolute Error (MAE) of N 3,540,639.15, and an R-squared (R2) score of 0.8612, indicating that it accounts for 86.12% of the variance in car prices. The most effective model was implemented in a web application based on Streamlit, allowing users to enter vehicle details and obtain price estimates and providing a valuable resource for the automotive market in Nigeria.

Keywords: Car prices; Machine Learning; Linear Regression; Multi-Layer Perceptron; Random Forest; XGBoost

References

Aderibigbe O. O., Fadare S. O., and Gumbo T. (2024). “Transport situation in the Global South: Insights from Nigeria, South Africa and India,” in Emerging Technologies for Smart Cities: Sustainable Transport Planning in the Global North and Global South, Cham: Springer Nature Switzerland, pp. 43-77.
Agarwal P., Abudu D., Calabrese L., and Chukwurah O. (2023). “The automotive sector in Nigeria: Opportunities under the AfCFTA,” ODI Research Report.
Agrahari K., Chaubey A., Khan M., and Srivastava M. (2021). “Car price prediction using machine learning,” Int. J. Innov. Res. Technol., vol. 8, no. 1, pp 572-575.
Alita D., Putra A. D., and Darwis D. (2021). “Analysis of classic assumption test and multiple linear regression coefficient test for employee structural office recommendation,” IJCCS (Indonesian Journal of Computing and Cybernetics Systems), vol. 15, no. 3, pp. 295-306.
Chandak A., Ganorkar P., Sharma S., Bagmar A., and Tiwari S. (2019) “Car price prediction using machine learning,” International Journal of Computer Sciences and Engineering, vol. 7, no. 5, pp. 444-450.
Hatta M., Wahid W. N., Yusuf F., Hidayat F., Santoso N. A., and Aini Q. (2024). “Enhancing predictive models in system development using machine learning algorithms,” International Journal of Cyber and IT Service Management, vol. 4, no. 2, pp. 80-87.
Heitz T., He N., Ait-Mlouk A., Bachrathy D., Chen N., Zhao G., and Li L. (2025). “Investigation on eXtreme Gradient Boosting for cutting force prediction in milling,” Journal of Intelligent Manufacturing, vol. 36, no. 1, pp. 285-301.
Jain N. and Jana P. K. (2023) “LRF: A logically randomized forest algorithm for classification and regression problems,” Expert Systems with Applications, vol. 213, 119225.
Kovpak E. and Orlov F. (2019). “Comparative analysis of machine learning models and regressions for car price prediction,” Bulletin of VN Karazin Kharkiv National University Economic Series, no. 97, pp. 31-40, 2019.
Maleki A., Raahemi M., and Nasiri H. (2023). “Breast cancer diagnosis from histopathology images using deep neural network and XGBoost,” Biomedical Signal Processing and Control, vol. 86, 105152, 2023.
Mienye I. D. and Sun Y. (2022). “A survey of ensemble learning: Concepts, algorithms, applications, and prospects,” IEEE Access, vol. 10, pp. 99129-99149.
Pal N., Arora P., Kohli P., Sundararaman D., and Palakurthy S. S. (2019). “How much is my car worth? A methodology for predicting used cars’ prices using random forest,” in Advances in Information and Communication Networks: Proceedings of the 2018 Future of Information and Communication Conference (FICC), vol. 1, Springer International Publishing, pp. 413-422.
Pan R., Bagherzadeh M., Ghaleb T. A., and Briand L. (2022). “Test case selection and prioritization using machine learning: A systematic literature review,” Empirical Software Engineering, vol. 27, no. 2, p. 29.
Peerun S., Chummun N. H., and Pudaruth S. (2015). “Predicting the price of second-hand cars using artificial neural networks,” in The Second International Conference on Data Mining, Internet Computing, and Big Data (BigData2015), vol. 17.
Putra P. H., Azanuddin A., Purba B., and Dalimunthe Y. A. (2024). “Random forest and decision tree algorithms for car price prediction,” Jurnal Matematika Dan Ilmu Pengetahuan Alam LLDikti Wilayah 1 (JUMPA), vol. 4, no. 1, pp. 81-89.
Rane N. L., Paramesha M., Choudhary S. P., and Rane J. (2024). “Machine learning and deep learning for big data analytics: A review of methods and applications,” Partners Universal International Innovation Journal, vol. 2, no. 3, pp. 172-197.
Samruddhi K. and Kumar R. A. (2020). “Used car price prediction using K-nearest neighbor based model,” Int. J. Innov. Res. Appl. Sci. Eng. (IJIRASE), vol. 4, no. 3, pp. 686.
Singh P., Adebanjo A., Shafiq N., Razak S. N. A., Kumar V., Farhan S. A., and Sergeevna M. T. (2024). “Development of performance-based models for green concrete using multiple linear regression and artificial neural network,” International Journal on Interactive Design and Manufacturing (IJIDeM), vol. 18, no. 5, pp. 2945-2956.
Watson C., Cooper N., Palacio D. N., Moran K., and Poshyvanyk D. (2022). “A systematic literature review on the use of deep learning in software engineering research,” ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 31, no. 2, pp. 1-58.
Zhang Y., Liu J., and Shen W. (2022). “A review of ensemble learning algorithms used in remote sensing applications,” Applied Sciences, vol. 12, no. 17, 8654.
Published
2026-03-12
How to Cite
Owoeye, S. O. (2026). Prediction of Car Prices in Nigeria Using Machine Learning Models. Journal of Engineering Research, 30(3), 115-131. Retrieved from https://jer.unilag.edu.ng/article/view/2884