Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Oct 12;13(1):17315.
doi: 10.1038/s41598-023-44326-w.

Assessing predictive performance of supervised machine learning algorithms for a diamond pricing model

Affiliations

Assessing predictive performance of supervised machine learning algorithms for a diamond pricing model

Samuel Njoroge Kigo et al. Sci Rep. .

Abstract

This study conducted a comprehensive analysis of multiple supervised machine learning models, regressors and classifiers, to accurately predict diamond prices. Diamond pricing is a complex task due to the non-linear relationships between key features such as carat, cut, clarity, table, and depth. The analysis aimed to develop an accurate predictive model by utilizing both regression and classification approaches. To preprocess the data, the study employed various techniques. The work addressed outliers, standardized the predictors, performed median imputation of missing values, and resolved multicollinearity issues. Equal-width binning on the cut variable was performed to handle class imbalance. Correlation-based feature selection was utilized to eliminate highly correlated variables, ensuring that only relevant features were included in the models. Outliers were handled using the inter-quartile range method, and numerical features were normalized through standardization. Missing values in numerical features were imputed using the median, preserving the integrity of the dataset. Among the models evaluated, the RF regressor exhibited exceptional performance. It achieved the lowest root mean squared error (RMSE) of 523.50, indicating superior accuracy compared to the other models. The RF regressor also obtained a high R-squared ([Formula: see text]) score of 0.985, suggesting it explained a significant portion of the variance in diamond prices. Furthermore, the area under the curve with RF classifier for the test set was 1.00 [Formula: see text], indicating perfect classification performance. These results solidify the RF's position as the best-performing model in terms of accuracy and predictive power, both in regression and classification. The MLP regressor showed promising results with an RMSE of 563.74 and an [Formula: see text] score of 0.980, demonstrating its ability to capture the complex relationships in the data. Although it achieved slightly higher errors than the RF regressor, further analysis is needed to determine its suitability and potential advantages compared to the RF regressor. The XGBoost Regressor achieved an RMSE of 612.88 and an [Formula: see text] score of 0.972, indicating its effectiveness in predicting diamond prices but with slightly higher errors compared to the RF regressor. The Boosted Decision Tree Regressor had an RMSE of 711.31 and an [Formula: see text] score of 0.968, demonstrating its ability to capture some of the underlying patterns but with higher errors than the RF and XGBoost models. In contrast, the KNN regressor yielded a higher RMSE of 1346.65 and a lower [Formula: see text] score of 0.887, indicating its inferior performance in accurately predicting diamond prices compared to the other models. Similarly, the Linear Regression model performed similarly to the KNN regressor, with an RMSE of 1395.41 and an [Formula: see text] score of 0.876. The Support Vector Regression model showed the highest RMSE of 3044.49 and the lowest [Formula: see text] score of 0.421, indicating its limited effectiveness in capturing the complex relationships in the data. Overall, the study demonstrates that the RF outperforms the other models in terms of accuracy and predictive power, as evidenced by its lowest RMSE, highest [Formula: see text] score, and perfect classification performance. This highlights its suitability for accurately predicting diamond prices. The study not only provides an effective tool for the diamond industry but also emphasizes the importance of considering both regression and classification approaches in developing accurate predictive models. The findings contribute valuable insights for pricing strategies, market trends, and decision-making processes in the diamond industry and related fields.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing interests.

Figures

Figure 1
Figure 1
Description of the classifications of the SML models.
Figure 2
Figure 2
Neural network architecture.
Figure 3
Figure 3
Multi-layer perceptron architecture.
Figure 4
Figure 4
Overall modeling process.
Figure 5
Figure 5
Diamond’s key features.
Figure 6
Figure 6
Correlation heatmap.
Figure 7
Figure 7
The histograms.
Figure 8
Figure 8
The Diamond’s logarithmic price transformation.
Figure 9
Figure 9
Diamond’s price, carat and cut relationships.
Figure 10
Figure 10
RF feature importance plots.
Figure 11
Figure 11
RF Regressor evaluation plots under different data & hyperparameter tweaks.
Figure 12
Figure 12
KNN regressor evaluation plots under different data & hyperparameter tweaks.
Figure 13
Figure 13
RF & KNN model performance evaluation plots after feature interaction (FI) and pseudo-labelling (PL).
Figure 14
Figure 14
Multi-layer perceptron error and residuals plots.
Figure 15
Figure 15
RF classifier evaluation plots.

Similar articles

Cited by

References

    1. Garside, M. Diamond industry statistics and facts. Diamond Industry, 2022 (accessed on 15 February 2022); https://www.statista.com/topics/1704/diamond-industry/#dossierContents__...
    1. Garside, M. Global diamond jewelry market value 2010–2020. Diamond Industry, 2021a (accessed on 15 November 2021); https://www.statista.com/statistics/585267/diamond-jewelry-market-value-....
    1. Garside, M. Global diamond jewelry market value by country 2020. Diamond Industry, 2021b (accessed on 15 November 2021) https://www.statista.com/statistics/585103/diamond-jewelry-market-value-....
    1. M.Garside. Global demand value for polished diamonds by country 2019 . Diamond Industry, 2020 (accessed on 11 November 2020) https://www.statista.com/statistics/894919/global-polished-diamond-deman....
    1. Mamonov S, Triantoro T. Subjectivity of diamond prices in online retail: Insights from a data mining study. J. Theor. Appl. Electron. Commer. Res. 2018;13(2):15–28. doi: 10.4067/S0718-18762018000200103. - DOI