However, while applying them to the test dataset,
the accuracy of Random Forest was almost the same
as XGBoost which were both around 85%, 84.62%
and 84.66% representatively, while Linear regression
kept carrying out the worst performance with an
accuracy of 58.44%. The same condition emerged
when considering RMSE. The RMSE of Random
Forest and XGBoost were about the same, 338,065.9
and 337,698.16 each, and the largest one remained
Linear Regression with a value of 555,802.12, almost
the same as the train RMSE.
Above all, Random Forest learnt slightly faster
and better than XGBoost as Random Forest
performed evidently better when greeting the train
dataset. However, Random Forest predicted as
accurately as XGBoost did according to the test
dataset results. It’s obvious to notice that Linear
Regression performed the worst throughout all
datasets.
It was a possible reason that Linear regression is a
one-time analyzation while others went through two
times or more. What’s more, multiple results were
generated and concluded in both Random Forest and
XGBoost, while only one was generated from Linear
Regression.
Noticeably, some of the reasons concluded are
only based on the understanding towards the
algorithms and are lack of further research data
support. However, in a study written by Vishal
Khandare and Manish Pandey in which they used the
same three models to predict electric car prices, the
results come out to be almost the same (Khandare,
2022). In the studies mentioned above, Random
Forest performs the best, reaching an accuracy of
90.38% while XGBoost gets 89% and Linear
Regression achieves 67%. Therefore, the result is
quite credible to a certain extent. However, the
reasons and logic behind it still need further work and
research.
4 CONCLUSIONS
This paper compared the performances between three
machine learning models which are Linear
Regression, Random Forest and XGBoost
representatively. The standards used to appraise the
results are Root Mean Squared Error (RMSE) and
accuracy. Through the final results, it is evident that
Random Forest learnt slightly faster and better than
XGBoost but performed almost the same in
predicting car prices. Linear regression performed the
worst throughout all datasets. It was a possible reason
that Linear regression is a one-time analyzation and
only one result is concluded, much less than the other
two models.
This article supports the feasibility of machine
learning models and analyzed the reasons why the
performances differed from each other. The reasons
mentioned above are according to the personal
perspectives and understanding and requires more
accurate data to support them. However, these can
still serve as a clue to analyze different machine
learning models and select the best to be applied to
car price prediction.
REFERENCES
Alipanahi, B., Leung, M. K., Delong, A., & Frey, B. J.
2015. Machine learning in genomic medicine: a review
of computational problems and data sets. Proceedings
of the IEEE, 104(1), 176-197.
Chen, X., Zou, D., Xie, H., Cheng, G., & Liu, C. 2022. Two
decades of artificial intelligence in education.
Educational Technology & Society, 25(1), 28-47.
Diamantaras, K. I., Tziridis, K., Kalampokas, T., &
Papakostas, G. A. 2017. Airfare prices prediction using
machine learning techniques. 2017 25th European
Signal Processing Conference (EUSIPCO), 1036-1039.
IEEE.
Gegic, E., Isakovic, B., Keco, D., Masetic, Z., & Kevric, J.
2019. Car price prediction using machine learning
techniques. TEM Journal, 8(1), 113.
Kaggle. 2019. Used cars price prediction by 15 models.
Retrieved from
https://www.kaggle.com/code/vbmokin/used-cars-
price-prediction-by-15-models/notebook
Kaggle. 2021. Craigslist carstrucks data. Retrieved from
https://www.kaggle.com/datasets/austinreese/craigslist
-carstrucks-data
Karthikeyan, P., & Manjula, K. A. 2019. Gold price
prediction using ensemble based machine learning
techniques. 2019 3rd International Conference on
Trends in Electronics and Informatics (ICOEI), 1360-
1364. IEEE.
Khandare, V., & Pandey, M. 2022. Electric Car Price
Prediction using Machine Learning Techniques.
International Journal of Engineering Research in
Computer Science and Engineering (IJERCSE), 9(11).
Patil, R. S., Szolovits, P., & Schwartz, W. B. 1988.
Artificial intelligence in medical diagnosis. Annals of
internal medicine, 108(1), 80-87.
Roll, I., & Wylie, R. 2016. Evolution and revolution in
artificial intelligence in education. International journal
of artificial intelligence in education, 26, 582-599.