Laporkan Masalah

Prediksi Harga Emas Menggunakan Extreme Gradient Boosting dengan Automatic Hyperparameter Tuning

MUHAMMAD RAIHAN FAIQ ABDULLAH, Dr. Nur Rokhman, S.Si., M.Kom.

2024 | Skripsi | ILMU KOMPUTER

Prediksi harga emas yang akurat sangat penting bagi investor untuk memaksimalkan keuntungan. Oleh karena itu, muncul berbagai macam metode untuk memprediksi harga emas, salah satunya adalah dengan machine learning. Salah satu metode machine learning yang unggul dalam prediksi adalah Extreme Gradient Boosting (XGBoost). Akan tetapi, performa metode ini sangat dipengaruhi oleh penyetelan hyperparameter. Salah satu metode penyetelan hyperparameter yang populer adalah Grid Search yang memiliki keunggulan dalam hal eksplorasi. Namun, metode ini membutuhkan waktu komputasi yang lama. Untuk mengatasi hal tersebut, penelitian ini mengusulkan modifikasi Grid Search yaitu Automatic Grid Expansion Search (AGES). Dalam penelitian ini, dilakukan komparasi empat variasi model XGBoost, yaitu model dengan hyperparameter default, hyperparameter dari penelitian acuan, hyperparameter dari Grid Search (GS-XGBoost), dan model dengan hyperparameter yang dihasilkan dari metode modifikasi Grid Search yaitu Automatic Grid Expansion Search (AGES-XGBoost). Komparasi akan dilakukan berdasarkan nilai metrik evaluasi RMSE, MAE, dan R2, serta waktu komputasi yang diperlukan. Hasil penelitian menunjukkan bahwa model dengan hyperparameter dari AGES memberikan performa terbaik dengan nilai RMSE 51,99 dan MAE 40,04 serta nilai R2 71,60%. Selain itu, waktu komputasi dari model XGBoost dengan AGES (24,79 detik) jauh lebih cepat daripada model dengan Grid Search (1480,88 detik). Tingkat akurasi yang tinggi dan waktu komputasi yang efisien menjadikan AGES-XGBoost sebagai model XGBoost terbaik untuk prediksi harga emas. Kemudian dilakukan validasi performa dengan model yang sama untuk jenis data yang berbeda yaitu dataset harga rumah dan AGES-XGBoost tetap menunjukkan performa terbaik dengan RMSE 0.1134 dan MAE 0.0802 serta nilai R2 93,04%. Ini membuktikan bahwa performa metode AGES yang diusulkan dalam penelitian ini tetap yang terbaik meskipun digunakan untuk data yang berbeda.

Accurate gold price predictions are crucial for investors to maximize profits. Therefore, various methods have emerged to predict gold prices, one of which is machine learning. One of the most effective machine learning methods for predictions is Extreme Gradient Boosting (XGBoost). However, the performance of this method is highly dependent on hyperparameter tuning. One popular hyperparameter tuning method is Grid Search, which excels in exploration. However, this method requires significant computational time. To address this issue, this research proposes a modification of Grid Search, namely Automatic Grid Expansion Search (AGES). In this study, four variations of the XGBoost model were compared: the model with default hyperparameters, hyperparameters from reference studies, hyperparameters from Grid Search (GS-XGBoost), and the model with hyperparameters generated by the modified Grid Search method, Automatic Grid Expansion Search (AGES-XGBoost). The comparison was made based on the evaluation metrics RMSE, MAE, and R2, as well as the required computational time. The results of the study showed that the model with hyperparameters from AGES provided the best performance with an RMSE of 51.99, an MAE of 40.04, and an R2 of 71.60%. Additionally, the computational time for the XGBoost model with AGES (24.79 seconds) was significantly faster than that of the model with Grid Search (1480.88 seconds). The high accuracy and efficient computational time make AGES-XGBoost the best XGBoost model for predicting gold prices. Performance validation was then carried out using the same model for different data types, namely the house price dataset, and AGES-XGBoost continued to show the best performance with an RMSE of 0.1134, an MAE of 0.0802, and an R2 of 93.04%. This proves that the performance of the AGES method proposed in this research remains the best, even when applied to different data.

Kata Kunci : Extreme Gradient Boosting, hyperparameter optimization, Grid Search, gold price, house price, prediction accuracy.

  1. S1-2024-459270-abstract.pdf  
  2. S1-2024-459270-bibliography.pdf  
  3. S1-2024-459270-tableofcontent.pdf  
  4. S1-2024-459270-title.pdf