I'm a coding beginner and I would like to know how to use the transformer algorithm to predict a temperature field. Can you provide me with a step-by-step guide or code example on how to do this? The detailed requirements of my question are as follows:
Using KL decomposition, the data is processed to obtain spatial basis functions and time coefficients. Then, the transformer algorithm is used to predict the time coefficients and obtain the complete time coefficient data. Finally, the time coefficients are combined with the spatial basis functions to obtain the temperature field data.
On the cross-section of the aluminum profile, 32 sampling points are uniformly selected to obtain temperature data for points 1 to 9, 11 to 21, and 23 to 32 during the extrusion cycle. The temperature data for the 10th and 22nd sampling points are used to validate the effectiveness of the prediction model at unsampled points. The temperature data is sampled at intervals, with a total of 903 data points collected. The first 500 data points of 30 points are used to train the model, and the remaining 403 experimental data points are used to validate the accuracy of the model in the time direction.
What I have tried:
I tried searching on Google and some blog websites to find similar code.