gaussian

cuda matrix inverse gaussian jordan

别来无恙 提交于 2019-12-18 07:12:43
问题 I didn't find any similar question to mine. I'm trying to write the gaussian-jordan inverse matrix algorithm. The idea of the algorithm is simple:) I want to inverse only a lower triangular matrix. I got almost correct answer. Where did I do sth wrong? Does anyone can help me? I will appreciate it. d _ A lower triangular matrix (nxn) dI identity matrix (nxn) n size of a matrix in one direction (n%16=0) dim3 threadsPerBlock(n/16,n/16); dim3 numBlocks(16,16); I know it is a simple

Median variance in background subtraction

早过忘川 提交于 2019-12-18 06:59:55
问题 I am facing some issues in implementation of the paper Statistical Background Subtraction for a Mobile Observer . Question 1 : In Section 4.1, it talks about "... the median variance is computed over the entire image from the first components ..." I am confused what the authors actually mean by this. According to Stauffer & Grimson 's paper Adaptive Background Mixture Models for Real-Time Tracking(1999), for every background model a variance gets initialized (say with value 36) and then it

one Dimensional gauss convolution function in Matlab

主宰稳场 提交于 2019-12-18 04:52:29
问题 I am trying to write a function that returns a one dimentional gauss filter. the function took sigma as a parameter. The problem is that the function returns the same array for all sigmas. function gaussFilter=gauss(sigma) width = 3 * sigma; support = (-width :sigma: width); gaussFilter= exp( - (support).^2 / (2*sigma^2)); gaussFilter = gaussFilter/ sum(gaussFilter); Note that support array is calculated correctly but the problem arise when applying the exp. 回答1: The idea is that the filter

Generating a random Gaussian double in Objective-C/C

蓝咒 提交于 2019-12-18 03:39:35
问题 I'm trying to generate a random Gaussian double in Objective-C (the same as random.nextGaussian in Java). However rand_gauss() doesn't seem to work. Anyone know a way of achieving this? 回答1: This link shows how to calculate it using the standard random() function. I should note that you'll likely have to make the ranf() routine that converts the output of random() from [0,MAX_INT] to be from [0,1] , but that shouldn't be too difficult. From the linked article: The polar form of the Box-Muller

Gaussian filter in scipy

ぐ巨炮叔叔 提交于 2019-12-17 22:39:42
问题 I want to apply a Gaussian filter of dimension 5x5 pixels on an image of 512x512 pixels. I found a scipy function to do that: scipy.ndimage.filters.gaussian_filter(input, sigma, truncate=3.0) How I choose the parameter of sigma to make sure that my Gaussian window is 5x5 pixels? 回答1: Check out the source code here: https://github.com/scipy/scipy/blob/master/scipy/ndimage/filters.py You'll see that gaussian_filter calls gaussian_filter1d for each axis. In gaussian_filter1d , the width of the

Overlay normal curve to histogram in R

独自空忆成欢 提交于 2019-12-17 01:47:06
问题 I have managed to find online how to overlay a normal curve to a histogram in R, but I would like to retain the normal "frequency" y-axis of a histogram. See two code segments below, and notice how in the second, the y-axis is replaced with "density". How can I keep that y-axis as "frequency", as it is in the first plot. AS A BONUS: I'd like to mark the SD regions (up to 3 SD) on the density curve as well. How can I do this? I tried abline , but the line extends to the top of the graph and

multivariate normal distribution given mean vector and covariance matrix

浪尽此生 提交于 2019-12-13 18:12:17
问题 I admit I am being lazy here but is anyone aware of a free math .net library which gives me the output of a normal distribution given a mean vector and a covariance matrix? Thanks. 回答1: Math.NET might work for you. http://www.mathdotnet.com/ http://numerics.mathdotnet.com/probability-distributions/ Multivariate Distributions Dirichlet Inverse Wishart Matrix Normal Multinomial NormalGamma Wishart Function Reference: http://api.mathdotnet.com/Numerics/MathNet.Numerics.Distributions/MatrixNormal

Get confidence limits from Gaussian Process model in Python GPy

青春壹個敷衍的年華 提交于 2019-12-13 15:47:04
问题 I calcualted a Gaussian Process model in Python using GPy: ker0 = GPy.kern.Bias(input_dim=1,variance=1e-2) ... m = GPy.models.GPRegression(x, y, ker0+ker2) I can plot it with m.plot() plt.show and it visualizes the points, the spline and the confidence limits. Now I want to extract the parameters and the confidence limits to use the data in another plot. My question is, how can I access these data. if I print m I get Name : GP regression Objective : 31.9566881665 Number of Parameters : 4

Does Java ThreadLocalRandom.current().nextGaussian() have a limit?

自古美人都是妖i 提交于 2019-12-13 09:56:05
问题 I'm writing some software that requires the generation of random numbers normally distributed around 0, but with a reliable, known limit of +/- 10. Consider the following Java 8 code: int floorMax = 10; int totalRuns = 1000000000; int[] floorCounts = new int[floorMax+1]; for (int i = 0; i < totalRuns; i++) floorCounts[ (int) Math.floor(Math.abs( ThreadLocalRandom.current().nextGaussian() )) ]++; for (int c = 0; c < floorMax; c++) System.out.println( "# of values between " + String.valueOf(c)

Statistical analysis on Bell shaped (Gaussian) curve

无人久伴 提交于 2019-12-13 06:25:43
问题 In my application I am getting images (captured by a high speed camera) containing projections of some light sources on the screen. 1-My first task is to plot a PDF or intensity distribution plot for the light intensity, which should come as bell shape or Gaussian, since at the center the light intensity will be maximum and at the ends it will be diminishing. Like this(just for example, not the exact case for me): In worst cases I will be having a series of light sources illuminated