# Kernel Density Derivative Estimation of Euler Solutions
## 2 Materials and Methods
### Multivariate KDE of the Euler Solution Datasets
#### 2.2.2 Computational Performance of Multivariate KDDE  
To verify the computational efficiency of the fast linear binning approximation and multivariate KDDE proposed in this paper, we used the following parameters: \(\mu=\{-2,\,0,\,2\}\) and \(\delta=\{1/6,1/2,\,1/3\}\), to construct eight data instances, which are drawn from a function \(f(\mu,\delta,n)=\sum_{i=1}^{3}\mu_{i}+\delta_{i}\times randn(n,1)\), with \(n=\) 19,200, 38,400, 76,800, 153,600, 307,200, 614,400, 1,228,800, and 2,457,600, respectively. Here, \(randn(\cdot,1)\) is 1-D normally distributed random numbers function. For the convenience of comparative analysis, the performance for calculating grid counts of the Brute-Force algorithm and the fast linear binning approximation is carried out by looping eight data instances over a series of one-dimensional grids with different-sized \(M_{1}=\) 40, 80, 160, 320, 640, 1280, 2560, and 5120, respectively.  
Two relatively tight line clusters are formed in Figure 2, indicating that using different-sized grids in fast linear binning approximation and the Brute-Force method does not significantly impact the computation time. In general, as the number of sample data increases, such as in the partially enlarged drawing, the corresponding computation time increases linearly. Meanwhile, the computation time of both algorithms tends to increase sharply with the increase in the number of observation samples. Compared with the Brute-Force calculation, the fast linear binning approximation can significantly save computational times by about an order of magnitude. However, the accelerating tendency of this algorithm gradually weakens with the number of observation samples increasing, which may be affected by the computer performance.  
Based on the above eight data instances, we verify the computational performance of the multivariate KDDE. The 1-D KDDE was calculated using nested for-loops and FFT based on Equation (16) over a series of grids = [40, 80, 160, 320, 640, 1280, 2560, 5120], respectively.  
In Figure 3, the computation time of both algorithms increases slightly as the number of observation samples increases. However, the result of 1-D KDDE with nested for-loops is more pronounced, for example, when the grid size is not greater than 160 in the partially enlarged drawing. Along with the increase in grid size, the 1-D KDDE with FFT is more computationally efficient by about 3-4 orders of magnitude than the 1-D KDDE with nested for-loops. However, as the grid size increases (i.e., \(M_{1}>1280\)), the accelerating tendency of 1-D KDDE with FFT gradually decreases, perhaps owing to computer performance. Fortunately, we do not adopt such a large estimation grid in practical applications.  
Figure 3: Computation times of the 1-D KDDE were calculated using the FFT and nested for-loops according to the grid size \(M\) and the number of sample data \(n\).  
Figure 2: Computation times of the Brute-Force algorithm and the fast linear binning approximation according to the number of sample data \(n\) and the grid size \(M\).