5

Your question is a bit broad, I think. Lacking concreteness, I would give a high-level overview. Terms that you can search for are in italics. Machine learning is a huge field, that includes many techniques. It has traditionally been used (and still is) in image processing, speech recognition, etc. In these applications, data are abundant. What you call ...


4

If you simply want to compute the convolution you can construct a Kernel matrix for computation with arbitrary arrangements of Gaussians that do not lie on grid points of the domain where you want to compute the convolution. To do that one can employ an "outer sum". In python its given as done here: https://stackoverflow.com/questions/33848599/...


4

It looks to me that the FFT convolution algorithm is doing what is expected here. Remember that you work with discretized signals, and therefore, discretized convolution. There are a few ways to implement the discrete convolution numerically. The slight differences basically come from the way to deal with the finiteness of each signal. The discrete ...


2

You need to pay attention that unless properly padded the Multiplication in the Frequency Domain (DFT) applies Circular Convolution while you're after Linear Convolution. For practical examples and more information have a look on my answers: Kernel Convolution in Frequency Domain - Cyclic Padding. Question About Linear and Circular Convolution - 1D and 2D.


2

I think that you can use convolve() from scipy.signal. As mentioned in a previous question, you can take advantage that the Fourier Transform of a convolution represents a product.


2

Let us write it as \begin{equation} A_j = \sum_{l'=1}^{NL} S_{jl'}L_{l'} \end{equation} Where \begin{equation} S_{jl'} = \sum_{k= 0}^{K-1}[T_k\epsilon_{l'\text{mod} R,k}]e^{2\pi i \frac{k}{K}j} \end{equation} (I'm using R for the number of rows, the re-use of L is much too confusing) This last expression is clearly the discrete Fourier Transfrom of the ...


2

The classical way to do this fast for arbitrary collections of "source" and "target" points is to use a fast multipole-type algorithm called the Fast Gauss Transform, developed by Greengard. A quick Google search turned up this Julia package implementing what the author deems an "improved" FGT: https://github.com/jwmerrill/...


2

Approximately implementing @Ron's answer in Python the key is img = (A * weights).sum(axis=2) which of course is a loop but it's done in the compiled code that numpy calls. There may be some speed optimization possible here by adjusting the array definitions so that we can sum over a different axis and other things as well. See Code Review answers to Better ...


2

Not stating that this approach is faster, but maybe it inspires you or someone else. The conventional approach in here was certainly faster compared to my implementation of the approach outlined below. My goal was to somehow combine the parameterized path $(\varphi_1(t),\varphi_2(t))$ and $g(t)$ into a single entity. Taking the parameterized path as $\...


1

I didn't manage to find a suitable formulation for the diagonal. But doing the convolution of the column then the convolution of the rows was enough computation time gain for me h_vec = gaussienne(X) convol_row = scipy.signal.convolve(p, h_vec, 'same').T adj = np.diag(scipy.signal.convolve(convol_row, h_vec, 'same'))


1

That depends on what kind of integral transform you are looking at. Your comments suggest that you are looking at a Fourier transform specifically, so I would recommend the FFT implementation of NumPy. Using this approach you can also tackle Laplace transforms. For the most general case you will have to evaluate your convolution using a brute force ...


1

You certainly can try using Gauss-Seidel based preconditioning that is relatively easy to construct and is cheap enough (by my assessment) to give it a try. Other choices of algebraic preconditioners (say, incomplete LU) might be too heavy relative to their potential impact. I would also suggest looking into a full sparse direct solution of your problem. ...


Only top voted, non community-wiki answers of a minimum length are eligible