Power load time sequence prediction method based on improved Autoformer model
By using the double-layer FFT algorithm in power load timing prediction, the problems of high computing costs and information loss in the prior art are solved, and higher prediction accuracy and performance are achieved.
Patent Information
- Application Number
- CN202411247536.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-24
AI Technical Summary
In the problems of high calculation cost, high difficulty and low prediction accuracy, the existing power load timing prediction methods have caused information loss and affected the model effect.
The two-layer FFT algorithm is used to replace the original autocorrelation calculation process, keep the calculation of all autocorrelations unchanged while completely performing complete calculations, and improve the Autoformer model to improve prediction accuracy.
It significantly improves the accuracy of power load timing prediction, ensures the complete utilization of information, and improves the prediction performance of the model.
Smart Images

Figure CN119182123A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of time series prediction, and in particular to a method for predicting time series of electric load based on an improved Autoformer model. Background Art
[0002] With the advent of the big data era, the amount of data people are exposed to has increased dramatically, and much of the data exists in the form of time series. Time series prediction extracts valuable information by analyzing these chronologically arranged data points, thereby predicting future development trends. Among them, the load of the power transformer is a very important data. It can help people determine whether the transformer is within a safe working range and avoid equipment damage or failure due to overload. It can also be used to optimize operating efficiency, reduce energy consumption, and thus improve economic benefits. When the power load is abnormal, such as overload or underload, it may indicate equipment failure or the need for load adjustment. Therefore, load prediction can be used as a fault warning to improve the reliability and stability of the power system.
[0003] In the task of power load prediction, there are many commonly used prediction methods, such as the Informer algorithm proposed by Zhou et al., which introduces a sparse attention mechanism that only calculates the attention of key time steps, greatly reducing the amount of calculation and improving the efficiency of the model in processing long sequences. In addition, the algorithm reduces the sequence length, allowing the model to focus more on the most important time steps, but it may not capture all important interactions in the sequence. In some situations, sparsity may lead to information loss, thus affecting the model effect. In addition, its structure may limit the propagation path of information. In some complex time series data, the capture of long-distance dependencies may be affected, which may lead to performance degradation when processing sequences with complex dependencies.
[0004] The Autoformer model proposed by Wu et al. attempts to improve data utilization efficiency and reduce computational time complexity through sparse calculations. By calculating the autocorrelation function between sequences, it realizes the rolling connection between subsequences and achieves good results. However, since the optimal strategy is used to select the information that plays a major role and discard low-correlation information to reduce computational costs, it may lead to information loss. Summary of the invention
[0005] In order to solve the problems of high computational cost, great difficulty and low prediction accuracy in the task of power load time series prediction, the present invention utilizes the idea of using FFT in Autoformer to accelerate the calculation process, and uses a double-layer FFT algorithm to replace the original autocorrelation calculation process that discards part of the information. As a result, the improved model can complete the calculation of all autocorrelations without losing any information while maintaining the computational complexity, thereby significantly improving the prediction accuracy.
[0006] The technical solution adopted by the present invention is:
[0007] A method for predicting power load time series based on an improved Autoformer model comprises the following steps:
[0008] Step 1: Obtain the power load data set;
[0009] The power load data set includes a plurality of samples, each of which is a time series, including power loads at a plurality of timestamps obtained at a set time interval, and each sample is divided according to a set prediction step B, and the power loads at the last B timestamps in each sample are used as labels;
[0010] Step 2: preprocessing the acquired power load data set to obtain a preprocessed power load data set; the preprocessing includes maximum-minimum normalization and Z-score normalization;
[0011] The maximum-minimum normalization method is:
[0012]
[0013] Where X is a sample in the power load data set and X = X1, ..., X L , X i is the power load at the i-th timestamp in sample X, L is the number of timestamps, min(X) is the minimum value in the sample, max(X) is the maximum value in the sample, X i ' is the maximum-minimum normalized power load;
[0014] The Z-score normalization method is:
[0015]
[0016] Among them, X i ″ is the power load after Z-score normalization, mean(X) is the mean of the power load, and std(X) is the standard deviation of the power load;
[0017] Step 3: Divide the preprocessed power load data set into a training set and a test set according to a set ratio;
[0018] Step 4: Build the Double FFTAutoformer model;
[0019] The Double FFTAutoformer model replaces the Auto-Correlation module in the Autoformer model with an improved Auto-Correlation module;
[0020] The improved Auto-Correlation module includes several attention channels, a connection module and a first fully connected layer;
[0021] The query matrix, key matrix and value matrix in each attention channel are firstly passed through the second fully connected layer, the third fully connected layer and the fourth fully connected layer to assign weights and integrate information, and then each vector in the query matrix after the second fully connected layer, the key matrix after the third fully connected layer and the value matrix after the fourth fully connected layer is fast Fourier transformed, and the z-th query vector after the fast Fourier transform and the z-th key vector after the Fourier transform are multiplied element by element to obtain several multiplied vectors, and each multiplied vector is inversely fast Fourier transformed and flipped, and then the result vector after the operation is obtained through sofimax operation, and the result vector after the operation is fast Fourier transformed and multiplied element by element with the value vector after the fast Fourier transform, and then inversely fast Fourier transformed, and the several vectors finally obtained are combined into a matrix;
[0022] The flip method is: flip the order of the data. If the data is a vector, the order of each element in the flipped vector is the reverse order of the order of each element in the vector before the flip. If the data is a matrix, the order of all rows in the matrix is flipped.
[0023] The concatenation module is used to concatenate the matrices output by several attention channels to form a feature representation, and then map the concatenated feature representation to a fixed dimension through a linear transformation;
[0024] The first fully connected layer is used to integrate the output of the connection module to obtain the output of the improved Auto-Correlation module;
[0025] Step 5: Use the training set to train the constructed Double FFT Autoformer model, and use the validation set to adjust the parameters of the Double FFT Autoformer model to obtain the trained Double FFT Autoformer model;
[0026] Step 6: Input the test set into the trained Double FFTAutoformer model to obtain the predicted power load time series.
[0027] Compared with the prior art, the beneficial effects of the present invention are:
[0028] The existing Auto-Correlation mechanism learns the autocorrelation information in the data through the autocorrelation function, but in order to improve the calculation efficiency, it chooses to delete some less important information, so that all the data and its autocorrelation cannot be fully utilized. In order to make up for this deficiency, the present invention re-derives the Auto-Correlation function into the form of the product of a cyclic symmetric matrix and a vector, so that the FFT algorithm can be used to accelerate the calculation, so that the model can fully utilize the information and improve the accuracy of the prediction under the premise of maintaining the time complexity of the calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is the overall model block diagram of the original Autoformer in the example of the present invention;
[0030] Figure 2 It is the block diagram of the original Auto-Correlation module in the example of the present invention;
[0031] Figure 3 The block diagram of the improved Auto-Correlation module in the example of the present invention is shown;
[0032] Figure 4 This is a comparison chart of the prediction effects of a power load time series prediction method based on an improved Autoformer model and other algorithms on the MSE index in an example of the present invention;
[0033] Figure 5 A comparison chart of the prediction effects of a power load time series prediction method based on an improved Autoformer model and other algorithms on the MAE index in an example of the present invention;
[0034] Figure 6 This is a prediction effect diagram of a power load time series prediction method based on an improved Autoformer model in an example of the present invention at the 20000th step;
[0035] Figure 7 This is a prediction effect diagram of a power load time series prediction method based on an improved Autoformer model in an example of the present invention at step 21000;
[0036] Figure 8 This is a prediction effect diagram of a power load time series prediction method based on an improved Autoformer model in an example of the present invention at step 22000;
[0037] Fig. 9 This is a prediction effect diagram of a power load time series prediction method based on an improved Autoformer model in an example of the present invention at the 23000th step. DETAILED DESCRIPTION
[0038] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0039] A method for predicting power load time series based on an improved Autoformer model comprises the following steps:
[0040] Step 1: Obtain the power load data set;
[0041] The power load data set includes a plurality of samples, each of which is a time series, including power loads at a plurality of timestamps obtained at a set time interval, and each sample is divided according to a set prediction step B, and the power loads at the last B timestamps in each sample are used as labels;
[0042] The power load data set in this embodiment includes samples of two granularities, namely, one power load is obtained every hour and one power load is obtained every 15 minutes. In this way, the data set includes short-term patterns, long-term patterns, long-term trends and a large number of irregular patterns, which can truly reflect the working status of the power transformer.
[0043] Step 2: preprocessing the acquired power load data set to obtain a preprocessed power load data set; the preprocessing includes maximum-minimum normalization and Z-score normalization;
[0044] The maximum-minimum normalization method is:
[0045]
[0046] Where X is a sample in the power load data set and X = X1, ..., X L , X i is the power load at the i-th timestamp in sample X, L is the number of timestamps, min(X) is the minimum value in the sample, max(X) is the maximum value in the sample, X i ' is the maximum-minimum normalized power load;
[0047] In this embodiment, the maximum-minimum normalization is used to linearly transform the data into a specified range. In this embodiment, the range selected is 0 to 1, which can reduce the difference between different features and facilitate the training of subsequent models.
[0048] The Z-score normalization method is:
[0049]
[0050] Among them, X i″ is the power load after Z-score normalization, mean(X) is the mean of the power load, and std(X) is the standard deviation of the power load;
[0051] In this implementation, Z-score normalization is used to convert the data into a distribution with a mean of 0 and a standard deviation of 1, which can help remove the bias of the data and make the comparison between different features more accurate;
[0052] Step 3: Divide the preprocessed power load data set into a training set and a test set according to a set ratio. Since time series prediction usually requires preheating, this ratio may not be fixed.
[0053] Step 4: Construct Double FFTAutoformer (DFformer) model;
[0054] The Double FFTAutoformer (DFformer) model will be as follows Figure 1 The Autoformer model shown in Figure 2 The Auto-Correlation module shown is replaced with an improved Auto-Correlation module;
[0055] like Figure 3 As shown, the improved Auto-Correlation module includes several attention channels, a connection module and a first fully connected layer;
[0056] The query matrix, key matrix and value matrix in each attention channel are first given weights and integrated information through the second fully connected layer, the third fully connected layer and the fourth fully connected layer respectively. The fully connected layer maps the input to the output through the weight matrix and the bias term, so that the fully connected layer can capture the complex relationships and patterns in the input data. Then, each vector in the query matrix after the second fully connected layer, the key matrix after the third fully connected layer and the value matrix after the fourth fully connected layer is fast Fourier transformed respectively, and the z-th query vector after the fast Fourier transform and the z-th key vector after the Fourier transform are multiplied element by element to obtain several multiplied vectors. Each multiplied vector is inversely fast Fourier transformed and flipped, and then softmaxed to obtain the result vector after the operation. The result vector after the operation is fast Fourier transformed and multiplied element by element with the value vector after the fast Fourier transform, and then inversely fast Fourier transformed, and the several vectors finally obtained are combined into a matrix.
[0057] The flip method is: flip the order of the data. If the data is a vector, the order of each element in the flipped vector is the reverse order of the order of each element in the vector before the flip. If the data is a matrix, the order of all rows in the matrix is flipped, such as the first row becomes the last row, and the last row becomes the first row.
[0058] The connection module is used to concatenate the matrices output by several attention channels to form a unified feature representation, thereby making full use of the information learned in different channels, and then map the concatenated feature representation to a fixed dimension through a linear transformation to ensure that the subsequent first fully connected layer can process inputs of uniform dimension;
[0059] The first fully connected layer is used to integrate the output of the connection module to obtain the output of the improved Auto-Correlation module for subsequent network structure processing and application;
[0060] The first step is FFT proof:
[0061] The present invention utilizes the FFT algorithm and the cyclic symmetry characteristics to accelerate the calculation, and redefines the autocorrelation function in the original Autoformer model through the following derivation process:
[0062] For a time series X = X1, ..., X L , the autocorrelation function in the Auto-Correlation module of the original Autoformer model is defined as follows:
[0063]
[0064] in, is the result of the autocorrelation function of the query and key, t is the sequence number of the element in the time series, that is, the sequence number of the element in the vector, L is the length of the time series, that is, the length of the vector, τ t is the time step corresponding to the tth element in the vector, Q t is the tth element in the query vector, K t-τ is the t-τth key vector t elements, Q is a vector in the query matrix, and K is a vector in the key matrix;
[0065] according to Define a matrix:
[0066]
[0067] in, for The vector composed of t is the tth element in the key vector, Rs* (Q) is a matrix with circular symmetry properties with respect to the query;
[0068]
[0069] Among them, Roll(Q, τ t ) is a sequence cyclic shift, which means that the elements in Q are cyclically shifted by τ t Bit;
[0070]
[0071] It can be seen that the present invention converts all L autocorrelation functions into the dot product of a cyclic symmetric matrix and a vector, and then can use them to accelerate the calculation using FFT;
[0072] The second step FFT proof:
[0073] The process of performing sofimax calculation in the original Autoformer model is as follows:
[0074]
[0075] in, It is the result of the autocorrelation function of the query and key after the softmax operation;
[0076] The Auto-Correlation mechanism in the Auto-Correlation module of the original Autoformer model is as follows:
[0077]
[0078] Among them, Auto-Correlation (Q, K, V) is the Auto-Correlation mechanism, V is a vector in the value matrix, Roll (V, τ t ) is the sequence cyclic shift, which means that V is cyclically shifted by τ t Bit;
[0079] By analyzing the above formula, Autoformer uses argTopk to remove some autocorrelation functions and selects k = c logL autocorrelation functions, where c is a hyperparameter and k is less than L, instead of using all L autocorrelation functions. In this way, since the model discards some information, although the amount of calculation is reduced, The time complexity of is still O(LlogL), but the discarded information may be crucial to the overall time series, and the prediction effect of the model will inevitably be negatively affected. The present invention attempts to solve this problem, while reducing the amount of calculation and preserving all information;
[0080] Different from Autoformer, which only selects k Rolls (V, τ t ), the present invention then converts the Roll(V, τ) required to be calculated in formula (8) into t ) are all extracted. Note that τ t Instead of the k in the Autoformer, we have all L τ1, ..., τ k , ..., τ L , where the subscripts represent the time order of the time series, and then All of them are extracted and abstracted into a vector, and the following formula is obtained:
[0081]
[0082] in, for The vector composed of
[0083]
[0084] Then the positions of the rows in Rs(V) are linearly transformed to form a cyclic symmetric matrix Rs*(V):
[0085]
[0086] Rs*(V) is composed of a sequence of cyclic shifts and has a cyclic symmetry (Rs) characteristic, so the present invention names it as a cyclic symmetry matrix (Reccurrent symmetry matrix). We also shift them to match the dot product, giving us:
[0087]
[0088] in, is the shifted vector;
[0089] Since the actual operation is not Instead, the probability after softmax is equivalent to the weight, and the present invention also transforms these weights into vector form accordingly;
[0090]
[0091]
[0092] in, for The result after softmax operation is: for The vector composed of
[0093]
[0094] It can be seen that after transformation, the original Auto-Correlation function becomes the matrix Rs*(V) where each row is related to the vector The sum of all the product of elements, that is, Rs*(V) and The matrix-vector product is then transposed. This operation converts the Auto-Correlation calculation into a dot product of a symmetric matrix and a vector, which has the characteristic of circular symmetry, and is very similar to the way FFT accelerates calculation, which can accelerate the calculation, except that the order of calculation has changed. The present invention will then illustrate the specific steps of calculating the product of a circular symmetric matrix and a vector;
[0095] Assume that we are given a vector:
[0096] a=[1 2 3 4] (17)
[0097] Flip its elements:
[0098]
[0099] Then let it construct a matrix:
[0100]
[0101] Then, by linearly transforming the position of the rows in the matrix, it is equivalent to flipping each row so that it satisfies the cyclic symmetry property:
[0102]
[0103] Now, given another vector:
[0104] b=
[4567] (21)
[0105] If you want to get This is similar to formula (16). To get the result, just follow these steps:
[0106] f a =fft(a) (22)
[0107] f b =fft(b) (23)
[0108] f c =fa·fb (24)
[0109] A.b T =ifft(fc ) (25)
[0110]
[0111] Among them, fft means to transform a vector into a complex form using the fast Fourier transform, ifft means the opposite of the inverse fast Fourier transform, and flip means to flip the elements in a vector or matrix. For matrices, the default is row flipping. These operations have been integrated into library functions by program developers and can be easily called using Python and NumPy libraries with just a few lines of code.
[0112] From the above description, it is easy to use FFT to get the value of the product of a cyclic symmetric matrix and any vector. For the above example:
[0113] f a =[10 -2+2j -2 -2-2j] (27)
[0114] f b =[22 -2+2j -2 -2-2j] (28)
[0115] f c =[220 -8j 4 8j] (29)
[0116] A.b T =[56 58 56 50] (30)
[0117]
[0118] Therefore, the above example demonstrates the specific steps of using the FFT algorithm to accelerate the calculation of circulant symmetric matrices and vector products. The present invention can enable the model to learn all inter-sequence relationship features without discarding any autocorrelation function for the sake of computational efficiency while ensuring computational efficiency. Only in this way can the present invention confidently say that all autocorrelation information in the time series is retained. In fact, in order to solve the problem of too high time complexity in long-term prediction of time series, many current transformer-based prediction models are committed to utilizing the sparsity of data, or improving data utilization efficiency by removing some invalid data. However, these methods are usually difficult to accurately retain valid information and discard invalid information, and even cannot prove whether the discarded information really has no effect on the prediction effect of the model. The present invention does not need to worry about these problems in improving the Autoformer, because it not only solves the problem of high time complexity, but also does not need to discard any information, so that it can give full play to the advantages of the transformer architecture, fully learn the correlation information in the time series data, and achieve better prediction results.
[0119] Step 5: Use the training set to train the constructed DFformer (Double FFT Autoformer) model, and use the verification set to adjust the parameters of the DFformer (Double FFT Autoformer) model to obtain the trained DFformer (Double FFT Autoformer) model;
[0120] Step 6: Input the test set into the trained DFformer (Double FFTAutoformer) model to obtain the predicted time series;
[0121] In order to further verify that the present invention can achieve better prediction results than the original model, simulation experiments were conducted on multiple data sets and multiple evaluation indicators. The lower the MSE and MAE, the better the effect. The experimental comparison results are shown in Table 1. Figure 4 , Figure 5 As shown, the performance of the model is evaluated in a multivariate environment, and the input length L = 36 is fixed to compare the performance of different forecast periods. Specifically, this paper considers a series of different forecast lengths: 96, 192, 336, 720, which is consistent with the standard definition of long-term forecasts. The following is a display of the relevant results.
[0122] As shown in Table 1, Autoformer * The Autoformer model that uses FTT to accelerate the Auto-Correlation calculation according to the RS characteristics shows better performance than the Autoformer and other benchmark models on all prediction lengths and datasets through comparison with other models on multiple datasets and multiple evaluation indicators.
[0123] Specifically, compared with the original Autoformer, Autoformer has a better MSE index. * , that is, the four prediction lengths of DoubleFFTAutoformer (DFformer) in the ETT dataset were reduced by (8.63%, 2.14%, 4.13%, 2.13%), with an average reduction of 4.26%. The four prediction lengths in the Electricity dataset were reduced by (13.93%, 1.80%, 3.46%, 0.79%), with an average reduction of 5%. The four prediction lengths in the Exchange dataset were reduced by (15.74%, 5.33%, 5.11%, 10.64%), with an average reduction of 9.21%. The four prediction lengths in the Traffic dataset were reduced by (4.57%, 1.79%, 1.45%, 1.21%), with an average reduction of 2.25%. In general, Autoformer* In the above setting, the average MSE is reduced by 5.18% compared with Autoformer. * The four prediction lengths in the ETT dataset were reduced by (3.24%, 0.59%, 0.54%, 0.24%), with an average reduction of 1.15%. The four prediction lengths in the Electricity dataset were reduced by (1.58%, 3.29%, 0.89%, 0.83%), with an average reduction of 1.65%. The four prediction lengths in the Exchange dataset were reduced by (10.53%, 3.25%, 0.57%, 1.38%), with an average reduction of 3.93%. The four prediction lengths in the Traffic dataset were reduced by (1.55%, 0.79%, 3.26%, 1.23%), with an average reduction of 1.71%. Overall, Autoformer * In the above setting, the MAE is reduced by 2.11% on average compared to Autoformer. In the figure, the performance of the models on different datasets is arranged in this way: ETT (upper left), Electricity (upper right), Exchange (lower left), Traffic (lower right). This arrangement helps to clearly show the performance differences of each model on different datasets and highlights the performance of Autoformer. * Compared with the improvement effect of Autoformer, the picture clearly shows the performance difference of each model on different data sets, providing more intuitive display and reliable evidence of the performance improvement of the new model.
[0124] Then the present invention performs actual prediction on an audio waveform data, using the first 20,000 steps as pre-training data. The experimental results are as follows: Figure 6 , Figure 7 , Figure 8 , Fig. 9 As shown in the figure, it can be seen that the prediction effect of the present invention is relatively ideal. When the pre-training length is 20000, Autoformer * It has achieved excellent accuracy and good prediction results in long-term prediction tasks, especially from the 20,000th step, the predicted value can almost completely fit the original data. Even when predicting the 23,000th to 24,000th steps, the model can accurately predict the overall and local trends of the time series. It can be seen that Autoformer * It shows good prediction accuracy and robustness in time series forecasting.
[0125] Table 1 Comparison of the effects of the algorithm of the present invention and other model algorithms
[0126]
Claims
1. A method for predicting power load time series based on an improved Autoformer model, characterized in that: The following steps are involved: Step 1: Obtain the power load data set; Step 2: preprocessing the acquired power load data set to obtain a preprocessed power load data set; The preprocessing includes maximum-minimum normalization and Z-score normalization; Step 3: Divide the preprocessed power load data set into a training set and a test set according to a set ratio; Step 4: Build the Double FFTAutoformer model; Step 5: Use the training set to train the constructed Double FFT Autoformer model, and use the validation set to adjust the parameters of the Double FFT Autoformer model to obtain the trained Double FFT Autoformer model; Step 6: Input the test set into the trained Double FFTAutoformer model to obtain the predicted time series.
2. According to claim 1, a method for predicting power load time series based on an improved Autoformer model is characterized in that: The power load data set includes several samples, each sample is a time series, which includes the power loads at several timestamps obtained at set time intervals. At the same time, each sample is divided according to the set prediction step B, and the power loads at the last B timestamps in each sample are used as labels.
3. The method for predicting power load time series based on the improved Autoformer model according to claim 1, characterized in that: The maximum-minimum normalization method is: Where X is a sample in the power load data set and X = X1,…,X L , X i is the power load at the i-th timestamp in sample X, L is the number of timestamps, min(X) is the minimum value in the sample, max(X) is the maximum value in the sample, X i ' is the maximum-minimum normalized power load.
4. The method for predicting power load time series based on the improved Autoformer model according to claim 3 is characterized in that: The Z-score normalization method is: Among them, X i ” is the power load after Z-score normalization, mean(X) is the mean of the power load, and std(X) is the standard deviation of the power load.
5. The method for predicting power load time series based on the improved Autoformer model according to claim 1, characterized in that: The Double FFTAutoformer model described in step 4 replaces the Auto-Correlation module in the Autoformer model with an improved Auto-Correlation module; The improved Auto-Correlation module includes several attention channels, a connection module and a first fully connected layer; The query matrix, key matrix and value matrix in each attention channel are firstly given weights and integrated information through the second fully connected layer, the third fully connected layer and the fourth fully connected layer respectively, and then each vector in the query matrix after the second fully connected layer, the key matrix after the third fully connected layer and the value matrix after the fourth fully connected layer is fast Fourier transformed respectively, and the z-th query vector after the fast Fourier transform and the z-th key vector after the Fourier transform are multiplied element by element to obtain several multiplied vectors, and each multiplied vector is inversely fast Fourier transformed and flipped, and then softmaxed to obtain the result vector after the operation, and the result vector after the operation is fast Fourier transformed and multiplied element by element with the value vector after the fast Fourier transform, and then inversely fast Fourier transformed, and the several vectors finally obtained are combined into a matrix; The concatenation module is used to concatenate the matrices output by several attention channels to form a feature representation, and then map the concatenated feature representation to a fixed dimension through a linear transformation; The first fully connected layer is used to integrate information of the output of the connection module to obtain the output of the improved Auto-Correlation module.
6. The method for predicting power load time series based on the improved Autoformer model according to claim 5, characterized in that: The flip method is: flip the order of the data. If the data is a vector, the order of each element in the flipped vector is the reverse order of the order of each element in the vector before the flip. If the data is a matrix, the order of all rows in the matrix is flipped.
