Questions tagged [gaussian]

For issues related to any of the uses of the Gaussian function. Don't forget to add additional tags to clarify the context.

The graph of a Gaussian is a characteristic symmetric "bell curve" shape that quickly falls off towards plus/minus infinity. The 1-D Gaussian is defined as (taken from wikipedia):

gaussian function from wikipedia

The parameter a is the height of the curve's peak, b is the position of the centre of the peak, and c controls the width of the "bell".

In multiple dimensions, the Gaussian is defined as the product of 1D curves along each dimension.

Gaussian functions are widely used in statistics where they describe the normal distributions, in signal processing where they serve to define Gaussian filters, in image processing where two-dimensional Gaussians are used for Gaussian blurs, in mathematics and physics where they are used to solve heat equations and diffusion equations, to formulate the propagation of optical beams (Gaussian beams), to from a basis set of wavefunctions, to define the Weierstrass transform, and many more.

1812 questions
6
votes
2 answers

2D gaussian distribution does not sum to one?

I built a wrapped bivariate gaussian distribution in Python using the equation given here: http://www.aos.wisc.edu/~dvimont/aos575/Handouts/bivariate_notes.pdf However, I don't understand why my distribution fails to sum to 1 despite having…
neither-nor
  • 1,245
  • 2
  • 17
  • 30
6
votes
2 answers

How to fit a double Gaussian distribution in Python?

I am trying to obtain a double Gaussian distribution for data (link) using Python. The raw data is of the form: For the given data, I would like to obtain two Gaussian profiles for the peaks seen in figure. I tried it with the following code…
Tom Kurushingal
  • 6,086
  • 20
  • 54
  • 86
6
votes
5 answers

How to plot a 2d gaussian with different sigma?

I am trying to make and plot a 2d gaussian with two different standard deviations. They give the equation on mathworld: http://mathworld.wolfram.com/GaussianFunction.html but I can't seem to get a proper 2D array which centers it around zero. I got…
Coolcrab
  • 2,655
  • 9
  • 39
  • 59
6
votes
2 answers

How would I produce random numbers between two values with a Gaussian distribution

Very new to Python, doing some exercises in a book. I need to produce 800 random numbers between 200 and 600, with a Gaussian distribution. I've got this far: x = pylab.zeros(800,float) for x in range (0,800): y = random.gauss(550,30) However,…
Versace
  • 175
  • 1
  • 3
  • 11
6
votes
4 answers

Gauss(-Legendre) quadrature in python

I'm trying to use Gaussian quadrature to approximate the integral of a function. (More info here: http://austingwalters.com/gaussian-quadrature/). The first function is on the interval [-1,1]. The second function is generalized to [a,b] by change…
newpythonuser
  • 133
  • 3
  • 3
  • 7
6
votes
1 answer

Relation between sigma and bandwidth in gaussian_filter and gaussian_kde

Applying the functions scipy.ndimage.filters.gaussian_filter and scipy.stats.gaussian_kde over a given set of data can give very similar results if the sigma and bw_method parameters in each function respectively are chosen adequately. For example,…
Gabriel
  • 40,504
  • 73
  • 230
  • 404
6
votes
1 answer

Correct implementation of Gaussian blur via FFT

I have read a lot of questions on SO about Gaussian blur and FFT, but there aren't answer how to implement steps of it (but there are comments like "it's your homework"). I want to know, how to properly pad the kernel and use FFT and IFFT on kernel…
Guy Fawkes
  • 2,313
  • 2
  • 22
  • 39
6
votes
1 answer

Relation between sigma and radius on the Gaussian blur

I have seen the following relation between sigma and the radius in a gaussian blur (from http://en.wikipedia.org/wiki/Talk%3AGaussian_blur#Radius_again and also from the implementation of some programs, for example…
José D.
  • 4,175
  • 7
  • 28
  • 47
6
votes
3 answers

Un-normalized Gaussian curve on histogram

I have data which is of the gaussian form when plotted as histogram. I want to plot a gaussian curve on top of the histogram to see how good the data is. I am using pyplot from matplotlib. Also I do NOT want to normalize the histogram. I can do the…
Abhinav Kumar
  • 1,613
  • 5
  • 20
  • 33
6
votes
2 answers

Interpolating data in R

Let's suppose I have a 3 by 5 matrix in R: 4 5 5 6 8 3 4 4 5 6 2 3 3 3 4 I would like to interpolate in between these values to create a matrix of size 15 by 25. I would also like to specify if the interpolation is linear, gaussian,…
CodeGuy
  • 28,427
  • 76
  • 200
  • 317
6
votes
2 answers

iOS Gaussian distribution of random numbers

Possible Duplicate: Generating a random Gaussian double in Objective-C/C Is there any way of getting a random number not from a uniform distribution, but from a Gaussian (Normal, Bell Curve) distribution in iOS? All the random number generators I…
syzygy
  • 1,356
  • 3
  • 16
  • 28
5
votes
5 answers

How is the gaussian filter algorithm work in OpenCV

I write my own gaussian filter but it is really slow. OpenCV's Gaussian algorithm is much faster, 20 times than my gaussian filter. I want to rewrite OpenCV's Gaussian algorithm in my project, and I don't want to include opencv in my project.…
user25749
  • 4,825
  • 14
  • 61
  • 83
5
votes
7 answers

Gaussian Elimination in Matlab

I am using the matlab code from this book: http://books.google.com/books/about/Probability_Markov_chains_queues_and_sim.html?id=HdAQdzAjl60C Here is the Code: function [pi] = GE(Q) A = Q'; n = size(A); for i=1:n-1 for j=i+1:n …
sosruko
  • 1,069
  • 2
  • 11
  • 13
5
votes
1 answer

Reproducing R's gaussian process maximum likelihood regression in Python

I have implemented a function in R to estimate the Gaussian Process parameters of a basic sin function. Unfortunately the project has to be made in Python and I have been trying to reproduce the behavior of R library's hetGP in python using SKlearn…
Alexandre Senges
  • 1,474
  • 1
  • 13
  • 22
5
votes
2 answers

ImportError: cannot import name 'GaussianProcess' from 'sklearn.gaussian_process'

I was trying to kaggle kernel of Bayesian Hyperparam Optimization of RF. And I couldn't import sklearn.gaussian_process.GaussianProcess. Please help this poor scikit-learn newbie. from sklearn.gaussian_process import GaussianProcess as…
이희웅
  • 55
  • 1
  • 5