Interpretation of Gaussian Kernel

Click For Summary

Discussion Overview

The discussion centers on the interpretation of the Gaussian kernel used for smoothing data sets, particularly in the context of a software application. Participants explore the relationship between the parameter "range" in a discrete Gaussian kernel and the standard deviation of a continuous Gaussian function, as well as the implications for data smoothing in spectroscopic analysis.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant seeks clarification on the precise relationship between the "range" parameter and the standard deviation of a continuous Gaussian function, noting that larger ranges seem to correlate with larger standard deviations.
  • Another participant asserts that the ideal range for perfect Gaussian smoothing is infinite, but suggests that a practical limit of around 3 standard deviations may be reasonable, while cautioning about normalization.
  • Concerns are raised about the effect of the "range" value on the shape of the smoothed curve, with one participant emphasizing the possibility of oversmoothing.
  • A later reply confirms that the width of the Gaussian, related to the standard deviation, should be adjusted in proportion to changes in the range to avoid oversmoothing.
  • One participant expresses confusion regarding the standard deviation and acknowledges discrepancies in the graphs produced by Mathematica as the range increases.

Areas of Agreement / Disagreement

Participants generally agree that the "range" parameter affects the smoothing process and that oversmoothing is a concern. However, there is no consensus on the precise relationship between "range" and standard deviation, and differing opinions on the ideal range value remain.

Contextual Notes

Participants mention normalization and the practical limitations of using an infinite range, indicating that assumptions about the Gaussian kernel's behavior may depend on specific applications and data characteristics.

wil3
Messages
177
Reaction score
1
Hello. In a software application I am attempting to smooth a data set by convoluting it with a discrete Gaussian kernel. Based upon information garnered online, I've been using this Mathematica command to generate the kernel:

kern = Table[Exp[-k^2/100]/Sqrt[2. Pi], {k, -range, range}];

where range is a user-specified parameter. For non-Mathematica speakers, my kernel is:
<br /> \dfrac{e^{-k^2/100}}{\sqrt{2 \pi}}<br /> \qquad<br /> \forall \; k \; \in \{-\text{range}, \text{range}\}; k \in \mathbb{Z}<br />

What is the correct relation of the parameter "range" in this kernel to the standard deviation of a continuous Gaussian function? I'm aware that a large range correlates to a larger standard deviation Gaussian over which the data is sampled, but I would like to know the precise relation. I can't seem to figure it out because the Gaussian and the discrete kernel seem to have slightly different forms.

Application: I have spectroscopic data, and I have been finding that certain "range" values yield the best-fit smoothing. I am curious whether this is related to the standard deviations of the continuous Gaussian functions that comprise the spectra that I am smoothing.

Thanks very much.
 
Last edited:
Physics news on Phys.org
The truly correct value of range, to give perfect Gaussian smoothing, is infinite. In practice, of course, that's inconvenient, and you have to decide how much accuracy you're willing to sacrifice by lopping off the tails. I imagine that in practice 3 standard deviations would be reasonable. (But be careful about normalization.)
 
It seems to me that the value of range has a noticeable effect on the shape of a smoothed curve... are you certain about that? Because I think that oversmoothing definitely is possible.

But thanks for taking a crack at it. I guess I'm being a little particular
 
wil3 said:
It seems to me that the value of range has a noticeable effect on the shape of a smoothed curve... are you certain about that? Because I think that oversmoothing definitely is possible.

But thanks for taking a crack at it. I guess I'm being a little particular
Yes, of course the value of range has an effect. I must not have been clear, if you thought I said it didn't have an effect.

Oversmoothing is of course possible. The main way you control that is by controlling the width (i.e., SD) of the Gaussian. That, in your example, is \sqrt{100/2}. When you change the width of the Gaussian, range should be changed in proportion.
 
Ahh, I understand now. I was thinking that the Standard deviation must be around 7, so that is good to hear. I had originally thought that \sqrt{50} must be it, but I guess I got confused because Mathematica is giving me very different graphs as I increase "range" without bound, making me think that something else is affecting the convolution.

Anyway, sorry for the misunderstanding. Thanks very much for your help.
 

Similar threads

Replies
8
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K