Least Absolute Shrinkage and Selection Operator (LASSO) and k-Nearest Neighbors (k-NN) Algorithm Analysis Based on Feature Selection for Diamond Price Prediction
Shafilah Ahmad Fitriani, Yuli Astuti, Irma Wulandari
Abstract
Diamonds are the most expensive, rarest, and most complex gemstones globally. Diamond investing is a new lifestyle; however, diamond prices fluctuate and are difficult to predict. Predicting the price of diamonds can be done using a regression technique because the price is continuous. Regression is part of the field of machine learning. This study aims to find the most efficient and accurate model. The models used to predict diamond prices are k-Nearest Neighbors (kNN) and Least Absolute Shrinkage and Selection Operator (LASSO). The process is carried out by selecting features, considering the value of k from k-NN and alpha from LASSO to ensure optimal accuracy. The data of this research is public and taken from Kaggle. The number of datasets is around 54000 data and is divided into training data by 80% and testing data by 20%. The results showed that k-NN had the highest accuracy of 0.9066 compared to LASSO, which was 0.8801. Meanwhile, the RMSE level shows that k-NN has the smallest value, 926.06, compared to LASSO, 1049.59.