Prediction of Car Prices in Nigeria Using Machine Learning Models
Keywords:
Car prices, Machine Learning, Linear Regression, Multi-Layer Perceptron, Random Forest, XGBoostAbstract
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.