Talk:Convolution/Archive 2

From Wikipedia, the free encyclopedia

Archive 1Archive 2Archive 3Archive 4

Start off easy, then push the reader over a cliff

Another lousy wikipedia article written by self-claimed experts to wank on about how they edited a wikipedia article.

The first paragraph is not bad.

The second paragraph, about the use of convolution in other groups is total wiki bullshit.

Put that crap down lower in the article. I don't care you have a Ph.D and that you are correct. Are you writing for more jackholes or for people that actually want to learn?

Similarly, get rid of stupid animations that have no ability to stop and let the person read.

DEMAND ATTENTION DEMAND ATTENTION DEMAND ATTENTION.

I made an animation, and regardless of how distracting it is, I will force you to read it.

In summation, typical crappy wikipedia article.

68.106.47.124 (talk) 17:35, 6 March 2012 (UTC)

The lead of the article is supposed to provide a capsule summary of the article. It isn't necessarily supposed to be the easiest part. Since much of the article does focus on generalizations of the convolution, the second paragraph is appropriate and roughly proportional to the prominence of this topic in the article. It's true that there should be more detail in the earlier sections on things that a larger group of readers might be interested in, like applications to image processing. These can then also be mentioned in the lead, which has ample room for expansion. At this point, I have no opinion about the animation. I seem to recall lobbying for its removal in the past whilst other editors have favored it's inclusion. I think it should probably stay, at least pending a wider discussion. Sławomir Biały (talk) 18:53, 6 March 2012 (UTC)
I don't understand the ambivalence about the .gif animation. I think it is clearly a positive feature of the article, and an excellent example of what computer-based learning can offer that hardcover books cannot. A pause button would also be a nice, but minor, addition. Perhaps someday Wikipedia will also figure out how to write articles on multiple levels... high school, undergrad, & grad. Good things take time.--Bob K (talk) 12:27, 10 March 2013 (UTC)

Lead images

The lead images to this article are not good. They are so wide that they completely dominate the lead, squashing all of the text aside. Moreover, the new captions I think are worse. They are much less succinct that the original captions, and dwell on things like the difference between cross-correlation and convolution, which the images don't even illustrate. If someone wants to write an examples section that includes these (or other) images, along with detailed explanations, that might be better. Sławomir Biały (talk) 01:50, 12 March 2013 (UTC)

I think the .gif "movies" are not helpful at their current location. They would be more helpful with the formulas (Definition section) that they serve to illustrate. The reason I brought up cross-correlation is so that I could equate to which is easier to grasp. It was awkward, I agree, but maybe less awkward than That was the hope. I also thought it important to say how is defined. But all those details became cumbersome. I think it is better now. --Bob K (talk) 04:25, 12 March 2013 (UTC)

Examples of convolution

I saw the wiki page, but I couldn't find any examples using actual numbers evaluating the formula. Could you give some examples of convolution, please? Mathijs Krijzer (talk) 22:44, 9 March 2013 (UTC)

The two .gif files at the top of the article are doing convolutions with actual numbers. It doesn't get much better than that.
But if you want to "get your own hands dirty", I suggest you download Octave (it's free), and play around with the conv function. You might find some of the info at http://en.wikipedia.org/wiki/User_talk:Olli_Niemitalo#Window_function helpful for getting started. I'm using version 3.6.2. Version 3.4 has an installer, but I found that Octave and qtOctave don't need to be installed. I think the word for that property is "portable".
There are four instances of the conv() function in this script: http://commons.wikimedia.org/wiki/File:Circular_convolution_example.png#Octave_script
They use actual numbers generated elsewhere in the script.
Similarly, there are two instances in this script: http://commons.wikimedia.org/wiki/File:Overlap-save_algorithm.png#Octave_script
--Bob K (talk) 00:44, 10 March 2013 (UTC)
Yes, but the .gif files don't explain all the formulas step by step. What does this mean?:

In other words, compute a sliding, weighted-average of function , where the weighting function is
The resulting waveform (not shown here) is the convolution of functions f and g. If f(t) is a unit impulse, the result of this process is simply g(t), which is therefore called the impulse response.

--Mathijs Krijzer (talk) 13:42, 10 March 2013 (UTC)
Sorry... it took me a while to realize that you've raised a very important point. The article needs to say more about topics such as Dirac_delta_function#Translation and LTI_system_theory#Impulse_response_and_convolution. In the meantime, maybe those links will help you. --Bob K (talk) 19:24, 11 March 2013 (UTC)
It already does, in plain sight actually, in more than one way. Same goes for the examples listed below. Usual problem with articles like this. Engineers can't read math and math people don't care to translate. Mct mht (talk) 21:32, 18 March 2013 (UTC)

Definition

The convolution of f and g is written fg, using an asterisk or star. It is defined as the integral of the product of the two functions after one is reversed and shifted. As such, it is a particular kind of integral transform:

 
      (commutativity)

Domain of definition

The convolution of two complex-valued functions on Rd

is well-defined only if f and g decay sufficiently rapidly at infinity in order for the integral to exist. Conditions for the existence of the convolution may be tricky, since a blow-up in g at infinity can be easily offset by sufficiently rapid decay in f. The question of existence thus may involve different conditions on f and g.

Circular discrete convolution

When a function gN is periodic, with period N, then for functions, f, such that fgN exists, the convolution is also periodic and identical to:

Circular convolution

When a function gT is periodic, with period T, then for functions, f, such that fgT exists, the convolution is also periodic and identical to:

where to is an arbitrary choice. The summation is called a periodic summation of the function f.

Discrete convolution

For complex-valued functions f, g defined on the set Z of integers, the discrete convolution of f and g is given by:

      (commutativity)

When multiplying two polynomials, the coefficients of the product are given by the convolution of the original coefficient sequences, extended with zeros where necessary to avoid undefined terms; this is known as the Cauchy product of the coefficients of the two polynomials.

Deleted References to GNU C-Graph

The following is re-posted, here, on advice from PamD noted at the end of this section.

Long before I wrote the proposed article "GNU C-Graph", I included references under the articles Convolution theorem and Convolution for the benefit of students and their professors teaching and learning about convolution. These references were removed by MrOllie and Hu12. Notwithstanding my belief that GNU C-Graph meets the WP:Notability criteria, Mark viking pointed out "external links aren't required to be WP notable, just relevant".

Most reasonable people would agree that removing the reference to the only software that easily demonstrates the convolution theorem would be a disservice to the public. The text of the references reads:

Under Convolution#External_links:

  • GNU C-Graph, a free software package for visualizing the convolution theorem, and displaying signals with their spectral plots.

Under Convolution_theorem#Additional_resources:

  • GNU C-Graph, a free software package for demonstrating the convolution theorem, and displaying signals with their spectral plots.

No doubt some WP:AGF administrator will recognise the educational value and reinstate the references for the benefit of the public.Visionat (talk) 14:16, 24 April 2013 (UTC)

Visionat, the places for these discussions are Talk:Convolution theorem and Talk:Convolution, not your own talk page. Those pages are also where you should have suggested the addition of links to the software you have written, bearing in mind WP:COI: to avoid any interpretation that you are promoting your own software, you should suggest the addition of the links on the talk page and allow independent editors (not necessarily administrators) to decide whether the links are an asset to the articles. If you look at WP:COIU, you will see that an editor with a possible conflict of interest may "make edits where there is clear consensus on the talk page (though it is better to let someone else do it)". That's the way to go. It's nothing personal, so your talk page is not the place for the discussion. I hope that helps. PamD

Discrete convolution

The formulae are wrong in that the limits of m may be finite, not infinite. A good example of this is in Numerical smoothing and differentiation. Petergans (talk) 08:47, 5 May 2013 (UTC)

To get the discrete convolution of finite sequences, you must extend those sequences by zero outside their domain. In fact, it even seems to be necessary to do this in the formulae in the article that you linked to. Sławomir Biały (talk) 11:12, 5 May 2013 (UTC)
I have clarified the text of that article. The finite convolution formula there is now written explicitly as
,
m is a finite odd integer. Petergans (talk) 15:37, 5 May 2013 (UTC)
If the sequence y has length m, then you need to extend by zero whenever . Sławomir Biały (talk) 18:45, 5 May 2013 (UTC)
No, y has length n, n>>m. The formula is the exact counterpart of the (continuous) definition, but with discrete values for i and finite limits for the summation. The number of calculated convolution points is equal to n-m+1, so this formula should only be used when n>>m. You can see an application in spectroscopic line shape#derivative spectroscopy: I used m=5 and n=100 to construct the diagram.Note that int(m/2) points at the start and end of the result are undefined; one could use zero extensions for those points, but that would be arbitrary and unnecessary. In the diagram only the central data from a wider dataset are shown, so that the undefined points are outside the plot. Petergans (talk) 08:54, 6 May 2013 (UTC)
Ok, but you're still going to run into trouble when is out of bounds. It seems quite strange to argue that the present article is wrong by comparison with such a manifestly inadequate definition. Sławomir Biały (talk) 18:45, 7 May 2013 (UTC)
I gotta say, Sławomir Biały, you're very patient. Mct mht (talk) 19:06, 7 May 2013 (UTC)

The point is that j-i does not go out of bounds, because the formula is only to be applied when this quantity is in bounds. Numerical smoothing and differentiation has been used for many years, since Savizki and Golay published tables of convolution coefficients in 1964 It is accepted that the outermost points are undefined. Look at the way smoothing using a 5-point quadratic function is used at the start of the data, y.

The values of Y1 and Y2 are undefined. Similarly the last 2 points in the series will be undefined. The points which are undefined when using this formula can be obtained by using other formulae. User:Sławomir Biały, your objections are based on hypothetical circumstances which do not occur in practice because everyone should know, as you do, that they are invalid.. Petergans (talk) 11:32, 9 May 2013 (UTC)

"The point is that j-i does not go out of bounds, because the formula is only to be applied when this quantity is in bounds." Then why does it matter so much how the convolution is defined, if the only cases you object to are never going to be applied? The mathematical definition of convolution certainly requires the group structure of the underlying space (in this case the group of integers). There is no applicable notion of "out of bounds" in the mathematical sense. Of course, which bounds are reasonable will depend on the application, but the same is true any time a mathematical device is used in numerical work. Also, I should add that the mathematical notion of convolution (even fairly sophisticated versions in locally compact groups) predate the source that you just cited by at least 15 years. Sławomir Biały (talk) 12:21, 9 May 2013 (UTC)
If I read the first displayed formula correctly, it's wrong, unless C has length m. The length of y is irrelevant. The formula with infinite limits is correct; if either f or g has finite support, the limits can be made finite. — Arthur Rubin (talk) 18:30, 9 May 2013 (UTC)
What I object to is the sentence "The convolution of two finite sequences is defined by extending the sequences to finitely supported functions on the set of integers." Extending the sequence is merely one way of dealing with the end-points which I describe above as undefined. I can give others if need be. The issue with infinite limits is a lack generality, particularly in view of the widespread use of the formula above when using Savitzki-Golay coefficients (yes, I know that the idea goes back into the 19th. century, it's a simple application of least-squares theory). It seems to me that there are two classes of application: f and g may be either functions or vectors. Let's make this explicit in the article and close this discussion. Agreed? Petergans (talk) 19:20, 9 May 2013 (UTC)
I can see your point about "is defined"; perhaps replace by "can be computed by", or replace the infinite sums by summing only over where the coeficients are defined. It makes no difference whether f is a function with finite support or a vector, and the fact that it makes no difference is important. Arthur Rubin (talk) 19:49, 9 May 2013 (UTC)
Having looked at the Savitzki-Golay article that you seem to think is the final authority on convolution, it's clear that the authors have confused the convolution with the cross-correlation. While this is not directly germane to the discussion, it does rather cast doubt on whether that can be considered a reliable source on Fourier analysis. Sławomir Biały (talk) 19:57, 9 May 2013 (UTC)

This is insulting. See my book "Data fitting in the chemical sciences", section 9.3, p. 202, "Convolution and cross-correlation". Petergans (talk) 10:10, 10 May 2013 (UTC)

I think folks are arguing a bit at cross purposes. There are different kinds of convolution being discussed here. For continuous domains, there is convolution defined on the real line and circular convolution defined on a finite segment of the real line; both allow for the convolution theorem to hold true. Taking discrete subsets, we have discrete convolution over the integers and circular discrete convolution over a finite range of integers. Suitably defined, both discrete types satisfy a version of the discrete convolution theorem. The convolution theorem is important both for pure math and for practical calculation. Fast convolution using the discrete Fourier transform is and straight multiplication and addition is .
So given two finite sequences of length and with , how do we convolve? First of all, mapping to discrete circular convolution, already being finite, is the way to go. If you want to use fast convolution, the discrete convolution theorem requires both sequences be of length , so zero-padding is necessary here to extend the shorter sequence. If you want to convolve using simple multiplication and addition, you have two options. Either you can use zero padding, which makes the iteration logic simple. Or you can avoid zero padding and add extra conditionals to the iteration code to prevent access of out-of-bounds sequence elements. Convolution with finite sequences is nicely discussed in section 13.1 of Numerical Recipes in C, 2nd. ed.
It would be useful to elucidate these issues in the article. My recommendation would be to discuss convolution with finite sequences in the Circular discrete convolution section --Mark viking (talk) 22:48, 9 May 2013 (UTC)
No, that's not what Petergans is saying. His argument is ad hoc, mathematically unsophisticated and wrong. The mathematicians are saying that convolution is defined using the group structure of the underlying group. That dictates how you you convolve. When the group is the integers, then necessarily the elements of the group algebra are absolutely summable sequences. When the group is, say, cyclic abelian of finite order n, then the group algebra consists of finite sequences of length n and you get the "discrete circular convolution." Real line, same thing, you have L^1 functions. The convolution is defined the same way for any locally compact abelian group and the Fourier analysis goes through just the same. To say that convolution is undefined for sequences is non-sensical. Mct mht (talk) 23:16, 9 May 2013 (UTC)

Another insult! My argument is not "wrong". It concerns a practical application, which needs to be taken into account in the mathematics. I'm not saying that "convolution is undefined"; some points at the start and end of the convolved sequence are undefined.

n is the length of the y-vector and, implicitly, m is an odd integer. Thus, for j=1,..,(m-1)/2 the convolved points are undefined, and similarly at the end of the sequence. In total m-1 points are undefined. As I mentioned before, values for the points that are undefined with this formula can be obtained by other means. Incidentally, on p209 of my book Fig. 9.8 shows part of the discrete Fourier transform of a vector of 15 quadratic/cubic smoothing coefficients, C. Petergans (talk) 10:10, 10 May 2013 (UTC)

I don't have access to your book, but if you're doing DFT, then the companion notion of convolution is actually the cyclic convolution (which should never be "undefined"). Sławomir Biały (talk) 10:47, 10 May 2013 (UTC)
With a 5-point function the above formula gives Y1 is undefined because y-1 and y0 do not exist (see example above). Circular convolution has nothing to do with this.Petergans (talk) 15:46, 10 May 2013 (UTC)
You're the one that brought up the discrete Fourier transform. If you really believe that the circular convolution has nothing to do with this, then you don't have a clue what you're talking about. Sławomir Biały (talk) 15:59, 10 May 2013 (UTC)
I don't have much time to comment, but I see what Petergans is up to, I think. The difference is between the values other than specified being undefined, and the values other than specified being assumed zero. The former (Petergans) has absoutely nothing to do with FFT or DFTs, though. — Arthur Rubin (talk) 16:31, 10 May 2013 (UTC)
I agree. Also agreed that this has nothing to do with circular discrete convolution or DFTs. As Mct mht nicely summarized above, mathematicians have a single concept of convolution based on abstract harmonic analysis on various topological groups or semigroups. But for other fields of endeavor, (data analysis, signal processing, etc.) convolution often has alternative meanings. Some of those alternative meanings may be considered ad hoc compared to the pure math concept, but they are in current use, discussed in reliable sources, and WP should cover them. As another example, consider image convolution in Gimp, an image processing program like Photoshop. In Gimp, there are different options for handling image borders in the convolution operation: extend, wrap, or crop. If I understand Petergans' example above, he advocates a 'crop' in his instance. 'Wrap' is more akin to mapping to discrete circular convolution. And I know of other conventions in image processing for handling convolution at the borders. Ideally, we cover it all. --Mark viking (talk) 17:55, 10 May 2013 (UTC)
There is an applications section for ad hoc applications such as these. I emphasize that just because some people do not define the convolution outside of some bounds does not make the definition in the article "wrong" as Peter Gans is insisting. Sławomir Biały (talk) 18:28, 10 May 2013 (UTC)

That's enough! After a third insult I quit this discussion. (Help:Wikipedia: The Missing Manual/Collaborating with Other Editors/Handling Incivility and Personal Attacks) Petergans (talk) 18:47, 10 May 2013 (UTC)


Time for a change?

It's a little misleading for the article to list these formulas before giving the definition in the general case. It gives and reinforces, as above exchange shows, various confusions: the domain is not clear, there are "different" convolutions, etc. Maybe that should be changed?

Convolution theorem actually embodies this problem: two "different" proofs for two special cases. Mct mht (talk) 04:38, 10 May 2013 (UTC)

I agree that taking the abstract harmonic analysis approach to convolution allows for a pretty unification of the different domains, as you nicely noted above. But from my experience, most electrical engineers, computer scientists, photographers, etc., don't know what a group is. And in the real world, signals are finite, symmetry is often broken, and periodicity is a convenient fiction to make the math easier. I think we would need to be careful not to scare away users with heavy math at the beginning of the article. --Mark viking (talk) 05:34, 10 May 2013 (UTC)
From Numerical Recipies, Pascal edition, p. 450, quote: Evidently, we have just described in words the following definition of discrete convolution with a response function of finite duration, M
unquote
This definition conflicts with the definition given in the article
because the summation limits are finite in one expression and infinite in the other. Petergans (talk) 09:28, 11 May 2013 (UTC)
I thought that Peter Gans had said he would leave this discussion! To stop these useless discussion, I have the following suggestion: change the title of this discrete section to "convolution on Z", put more math in it, like a discussion of the Wiener algebra A(T) and perhaps some convolution on finite cyclic groups. Create somewhere else a section about practical use of convolution. I like the idea of User:Mark viking to describe the problems at the boundary with Gimp, and the ad hoc solutions available. One last comment: this article starts with "in MATHEMATICS"... Bdmy (talk) 09:41, 11 May 2013 (UTC)

Unacceptable reversion

Discrete convolution(2)

Domain of definition

Related Articles

Wikiwand AI