# Applying Machine Learning in Cloud Service Price Prediction: The Case of Amazon IaaS
## 5 Results
### Impact of Historical Data  
Tables 7-11 exhibit the results of the metrics (MAE, MAPE, and RMSE) for each timeframe utilized for prediction. These tables provide an evaluation of the efficacy of the prediction models over various time periods. The Mean Absolute Percentage Error (MAPE) values indicate a small percentage of error in the model's predictions, highlighting the precision of the forecasts. The Root Mean Squared Error (RMSE) values display a similar pattern, emphasizing the close proximity between the predicted and actual prices. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{5}{c}{**Memory-Optimized**} \\ \hline  & _6 Years Back_ & _5 Years Back_ & _4 Years Back_ & _3 Years Back_ & _2 Years Back_ & _1 Year Back_ \\ \hline _MAE_ & 1.04 & 1.03 & 1.04 & 1.01 & 0.94 & **0.56** \\ _MAPE_ & 0.41 & 0.41 & 0.42 & 0.41 & 0.38 & **0.22** \\ _RMSE_ & 1.62 & 1.63 & 1.65 & 1.61 & 1.58 & **1.16** \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Metrics results for memory-optimized instance family. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{5}{c}{**Storage-Optimized**} \\ \hline  & _6 Years Back_ & _5 Years Back_ & _4 Years Back_ & _3 Years Back_ & _2 Years Back_ & _1 Year Back_ \\ \hline _MAE_ & 0.68 & 0.70 & 0.71 & 0.65 & 0.61 & **0.61** \\ _MAPE_ & 0.35 & 0.35 & 0.36 & 0.33 & 0.32 & **0.29** \\ _RMSE_ & 1.08 & 1.09 & 1.10 & 1.02 & 1.02 & **1.02** \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Metrics results for storage-optimized instance family. The analysis of the impact of historical data on the accuracy of the prediction models reveals interesting insights as shown. The results indicate that using historical data from a shortened time period improves prediction accuracy. This observation suggests that more recent data points have a greater impact on pricing patterns and trends in the market for cloud services. Incorporating an excessive amount of historical data may introduce noise and obsolete information that hinders the models' ability to accurately capture the current dynamics. Comparing the prediction accuracy of GPU instances to that of other instance families reveals that GPU instances have, on average, greater prediction accuracy. This suggests that GPU instances may have more distinct and predictable pricing patterns than other instance types. Over multiple time intervals, the precision of GPU instances is consistently higher, indicating a relatively stable and predictable pricing behavior. Another interesting finding is that the decrease in the metrics (MAE, MAPE, and RMSE) when using the previous year as the timeframe for prediction, especially in the general purpose and memory-optimized instance families, shows that the model's accuracy improves significantly with more recent data. Examining thoroughly the aforementioned results, it is obvious that there is a strong correlation between the length of the historical data and the accuracy of the prediction models. Data play a crucial role in capturing the pricing trends and dynamics of cloud service instances. By focusing on more recent information, the models can better adapt to evolving market conditions and make more accurate predictions. Pricing for cloud services is a dynamic and evolving market. The factors that affect pricing may change over time, and including older years in the analysis may introduce obsolete data that no longer reflect the current market dynamics. By focusing on more recent years, the prediction models are able to capture the most pertinent and up-to-date pricing patterns, resulting in increased precision. The presence of substantial peaks (Figure 2) in the median price evolution of various instance families over time is an intriguing discovery of the analysis. These summits represent price fluctuations or anomalies within the cloud pricing market. Curiously, these price fluctuations do not appear to have a significant effect on the evaluation metrics utilized in this study.