# Long-Term Forecasting Using MAMTF: A Matrix Attention Model Based on the Time and Frequency Domains
## 4 Experiments
### Visual Analysis  
We compare and analyze the predicted data in graphical form. In both the Electricity dataset and the EETh2 dataset, some of the data exhibit strong periodicity with frequent changes. In Figure 5, the green box represents the long-term change pattern, and the yellow circles represent the local change patterns. It can be seen that in the Electricity dataset, the prediction results of M-MAMFT compared to DLinear are similar for the long-term change pattern; however, for the local change pattern, the prediction results of M-MAMFT are closer to the true values. This also proves that the performance of the model we built is superior. As shown in Figure 6 in the prediction results of M-MAMFT on the EETh2 dataset, compared with DLinear, M-MAMFT better captures the long-term change patterns in the data, the deviation in the local change patterns is smaller, the predicted data are closer to the overall trend in the real data, and the overall prediction performance is much better than that of DLinear. As shown in Figure 7, we use violin plots to observe the distribution of the overall prediction results and the location of the median for both the Electricity dataset and the EETh2 dataset. The prediction results of M-MAMFT are closer to the distribution of the true values as compared to the prediction results of DLinear. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c} \hline \hline  & **Models** & \multicolumn{2}{c}{**M-MAMFT**} & \multicolumn{2}{c}{**I-MAMFT**} & \multicolumn{2}{c}{**Dlinear**} & \multicolumn{2}{c}{**FEDformer**} & \multicolumn{2}{c}{**Autoformer**} & \multicolumn{2}{c}{**Informer**} & \multicolumn{2}{c}{**Pyraformer**} \\  & **Metric** & **MSE** & **MAE** & **MSE** & **MAE** & **MSE** & **MAE** & **MSE** & **MAE** & **MSE** & **MAE** & **MSE** & **MAE** & **MSE** & **MAE** \\ \hline \multirow{4}{*}{
\begin{tabular}{c} **M-MAMFT** \\ **M-MAMFT** \\ **M-M**The cyclical variation in the Weather data is different from that in the previous two datasets in that the periodicity is high but the frequency of change is low. As shown in Figure 8, both the M-MAMFT model and the DLinear model can capture the changing patterns in the data. However, through the local variation pattern in the yellow box, we can conclude that the M-MAMFT model's prediction is closer to the true value. As shown in Figure 9, the BCAT data exhibit periodicity in their oscillatory changes. In the BCAT data, we can observe that both the DLinear model and the M-MAMFT model capture the periodicity of the data, and the pattern of ups and downs in the long-term change pattern is consistent. However, in the local change pattern, the DLinear model predicts stronger oscillatory ups and downs, while the M-MAMFT model predicts smoother values, which makes the overall prediction results of M-MAMFT closer to the real values. As shown in the violin plots in Figure 10, the prediction results of M-MAMFT on the Weather dataset and the BCAT dataset are closer to the true values than those of DLinear. Figure 5: (**a**) Comparison of DLinear prediction results with ground truth for a prediction length of 720 for the Electricity dataset; (**b**) comparison of M-MAMFT prediction results with ground truth for a prediction length of 720 for the Electricity dataset. Figure 6: (**a**) Comparison of DLinear prediction results with ground truth for a prediction length of 720 for the ETHh2 dataset; (**b**) comparison of M-MAMFT prediction results with ground truth for a prediction length of 720 for the ETHh2 dataset. Figure 8: (**a**) Comparison of DLinear prediction results with ground truth for a prediction length of 720 for the Weather dataset; (**b**) comparison of M-MAMFT prediction results with ground truth for a prediction length of 720 for the Weather dataset. Figure 7: (**a**) Violin plots with a forecast length of 720 of Electricity dataset; (**b**) violin plots with a forecast length of 720 of ETTh2 dataset.