search for: convolution

Displaying 20 results from an estimated 752 matches for "convolution".

2011 Feb 26
1
2D Convolution Function
Dear R-Helpers, I want to try the 2D (two-dimensional) convolution in R. For example, let us we have the following kernel and data. kernel <- (1,2,3,2,1) data <- array(1:100, dim=c(10,10)) I know the function 'convolve' only for one-dimensional convolution, but it is just for a 1D sequence. Is there any function for 2D convolution? For theory, plea...
2010 Jun 04
2
Convolution vector to be derived
I want to generate the following outcome using convolution of two sequences. x <- c(1,2,3,4,5) y <- c(6,7,8,9) The resulting convolution vector is 6 19 40 70 100 94 76 45 When using convolve(), it is hard to produce the result above. Would you help me out to get that? Best regards Moohwan Kim
2011 May 18
1
Convolution confusion:
...rev(x), TRUE, "open") = 9 12 10 4 1 But I expected: 3 8 14 8 3 (like in Octave/MATLAB - conv(x, reverse(x)) ) 3 2 1 x 1 2 3 = 3 2 1 0 6 4 2 0 0 9 6 3 = 3 8 14 8 3 The thing is, that "convolve(x, x, TRUE, "open")" works. For me it feels very confusing, that convolution does the reverse itself but the help suggest to reverse it again. The help file says: "Note that the usual definition of convolution of two sequences x and y is given by convolve(x, rev(y), type = "o")." Thanks for your help, Alex
2007 Feb 06
0
convolve: request for "usual" behaviour + some improvements + some fixes
...The typical approach here and definitely the idea of the > > original author of convolve() - would be to use nextn() here > > instead of "next_power_of_2()". > > The current implementation of convolve uses an fft-buffer of length > nx + ny - 1 for "open" convolution, not nextn(). > The fft-based convolution is by nature "circular". However it can be > used for "open" convolutions: the trick is to padd the input sequences > with enough zeros to avoid the overlap inherent to circular convolution. > Then the ouput sequence doesn...
2005 Feb 15
1
convolution of functions
Dear sir, we would like to know if there exist any R package containing the computational performance of the n-fold Stieljes' convolution of functions. We look forward to hearing from you. Thank you in advance. ____________________________________ M.Luz G?miz P?rez Dpt. Estad?stica e Investigaci?n Operativa Facultad de Ciencias Universidad de Granada Telf.: 958-243156 e-mail: mgamiz at goliat.ugr.es
2000 Jan 28
0
convolution bug (PR#408)
Full_Name: Bill Simpson Version: 65.1 , 0.90.1 OS: Linux Submission from: (NULL) (193.62.250.209) I reported this on r-help, but here is official bug report. The present convolve() does not do convolution by default. Its default behaviour is correlation. This is a bug. The default argument conj should be set to FALSE. The zero-padding should be on the right for linear convolution (don't ask me why you call this type="open"; I suggest type="linear"). Here is what I expect l...
1999 Nov 18
1
convolve bug?
I have been experimenting with convolve(). What I know about convolution I learned from engineering (they call this stuff linear systems theory), not statistics, so maybe this is all just a matter of different conventions. BUT I notice very weird things with convolve(). 1. First example, from the classic Bracewell The Fourier transform and its applications, chap 3 (p.3...
2005 Sep 29
2
solution of convolution equation
Hello, May be somebody can help me... I am trying to find a solution of a convolution equation using fft (and unfortunately I do not have a good background for this). So I am just trying to figure out how it can be implemented in R. I have two multidimensional independent variables X and Z and I know their densities fx and fz, which are multidimensional arrays. So I have to find...
2005 Dec 23
2
convolution of the double exponential distribution
Is there any R function that computes the convolution of the double exponential distribution? If not, is there a good way to integrate ((q+x)^n)*exp(-2x) over x from 0 to Inf for any value of q and for any positive integer n? I need to perform the integration within a function with q and n as arguments. The function integrate() is giving me this mess...
2001 Jun 04
1
2D convolution
Dear all, I have an image that I need to filter, and so I'm looking for a method to convolve it with a matrix. If I understood the docs for convolve correctly, it only works in 1D (and I have tried to convolve, it didn't look good). So, I wondered if anybody have implemented 2D convolution in R, or have any good advices to share (beyond having a look at mvfft), before I go hacking? Best, Kjetil -- Kjetil Kjernsmo Graduate astronomy-student Problems worthy of attack University of Oslo, Norway Prove their worth by hitting back E-mail: kjetikj at astro.u...
2005 Jul 20
2
Issues with convolve
...w that once this pmf is convoluted with itself, the first probabilities will be 0 (for the computer). Here are the two issues we have with convolve(): 1. The probabilities we know should be 0 are rather in the vicinity of 1E-19, as if convolve() could not "go lower". Using a hand made convolution function (not given here), we obtained the correct values. When probabilities get around 1E-12, results from convolve() and our home made function are essentially identical. 2. We obtained negative probabilities. More accurately, the same example returns negative probabilities under Windows, b...
2005 Jun 15
1
Chi square convolution?
Hi, I want to determine the confidence interval on the sum of two sigma's. Is there an easy way to do this in R? I guess I have to use some sort of chisquare convolution algorithm??? Thanx, Roy -- The information contained in this communication and any atta...{{dropped}}
2018 Feb 09
0
Convolutional neural networks (CNN) - build a model and After?
Hi, I am learning CNN using MXNet R package. I am following this great tutorial about olivetti_faces reconnaissance <https://www.r-bloggers.com/image-recognition-tutorial-in-r-using-deep-convolutional-neural-networks-mxnet-package/>. In the end after building model and testing the final score was 0.975. It is great score but what can do after with this model? How can use this model for other set on images? Is it used to recognize which person in the training data or classify new images if...
2011 Feb 04
2
Avoiding two loops
Hello, I have a R code for doing convolution of two functions: convolveSlow <- function(x, y) { nx <- length(x); ny <- length(y) xy <- numeric(nx + ny - 1) for(i in seq(length = nx)) { xi <- x[[i]] for(j in seq(length = ny)) { ij <- i+j-1 xy[[ij]] <- xy[[ij]] + xi * y[[...
2005 Feb 23
1
WinXP not caching credentials
...On-line logins work. What can be done to get the workstations to cache credentials, so users can login without needing to have a domain controller? The error message says that the user cannot be logged on because the domain controller is unavailable. Please help! Regards, Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html
2007 Feb 02
1
Inaccuracy in ?convolve
Hi, Man page for 'convolve' says: conj: logical; if 'TRUE', take the complex _conjugate_ before back-transforming (default, and used for usual convolution). The complex conjugate of 'x', of 'y', of both? In fact it seems that it takes the complex conjugate of 'y' only which is OK but might be worth mentioning because (1) conj=TRUE is the default and (2) with this default then convolve(x,y) is not the same as convolve(y,x). N...
2006 May 12
6
Newbie to R: would like to solve a problem
...and the other with height .4. Sdmg is a helper function, because some attacks attack 2 or 4 times in a single turn. Though, I dont want the simulation (what I'm doing with the runif here). I'd like to calculate the probability distribution of total_damage, total_damage + total damage (the convolution, representing 2 hits), and so on till about 5-8 hits (then I can just use normal curve in the web-calculator I'm making), then have a polynomial function estimate the probability distributions based on min, max, and skill. (So I can make my online calculator estimate the probability of killing...
2016 Jun 03
2
Custom assembler subset
On Fri, Jun 3, 2016 at 11:53 AM, Ahmed Bougacha <ahmed.bougacha at gmail.com> wrote: > -llvmdev at cs.uiuc.edu, that list isn't in use anymore. > > On Wed, Jun 1, 2016 at 4:48 PM, Kenneth Adam Miller via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Hello all, > > > > I would like to restrain the compiler that I build on my local box from >
2024 Jan 23
0
Quantiles of sums of independent discrete random variables
...=10) discrete independent random variables X_i with n_i (= 5 to 20) values each,compute quantiles of the distribution of the sum X = X_1+...+X_k. Here X has n=n_1 x n_2 ... n_k distinct values which is too large to list them all together with their probabilities. I tried several approaches: (A) Convolution: each X_j is approximated with Y_j=X_j+Z, where Z is an N(0,sigma) variable with small sigma. Then Y_j is a probability mixture of the normal variables N(x_j,sigma), where the x_j runs over all values of X_j, and has a highly oscillatory density. The density of Y=\sum Y_j is the convolution of t...
2005 Aug 27
2
Defining an ex-gaussian PDF
How does one define PDFs as yet undefined in R, such as the ex- gaussian, the sum of two RVs, one exponential, one Gaussian? The PDF would then be the convolution of an exponential PDF, dexp(), and a normal, dnorm(). Kindly cc me in your reply to r-help. Thanks, _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102 Gil...