# about random kernel generator

zhihongp opened this issue · comments

In the following code, lamda_1&2 (referred as kernel width) are used to calculate the COV matrix. But shouldn't the square of lambda be used here for covariance?

Line 50 in 5ca3f7c

Here, `lambda_1`

and `lambda_2`

denote `$\sigma_1^2$`

and `$\sigma_2^2$`

in the covariance matrix, respectively. Therefore, it has already been squared. Note that isotropic Gaussian generation functions often take `$\sigma$`

(the standard deviation, not squared) as input.

We did this to be consistent with mvnpdf(anisotropic Gaussian) and fspecial(isotropic Gaussian) in Matlab.