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
9
votes
1 answer

When using scipy.stats.multivariate_normal.pdf having the error:operands could not be broadcast together with shapes (1,8) (21,)

I want to calculate the multivariate gaussian density function for a data set I have on python. My dataset has 21 variables and there 75 data points. I have calculated the covariance matrix (cov) for this which is a 21*21 array, and the mean array,…
jan93
  • 179
  • 1
  • 2
  • 10
9
votes
3 answers

Mean of empty slice and Degrees of freedom <=0

This code below is suppose to run a bayes classifier for a full covariance gaussian (http://courses.ee.sun.ac.za/Pattern_Recognition_813/lectures/lecture03/node2.html), but I get two errors when I run the code. They are: RuntimeWarning: Mean of…
user3002936
  • 119
  • 1
  • 1
  • 5
9
votes
2 answers

gaussian blur with FFT

im trying to implement a gaussian blur with the use of FFT and could find here the following recipe. This means that you can take the Fourier transform of the image and the filter, multiply the (complex) results, and then take the inverse …
Paul
  • 241
  • 3
  • 4
9
votes
2 answers

tweak intensity of blur effect inside UIVisualEffectView in Swift

I'm using this code to create a blur effect inside my view: let blur = UIVisualEffectView(effect: UIBlurEffect(style: UIBlurEffectStyle.Light)) blur.frame = CGRectMake(180, 10, 200, 750) myView.addSubview(blur) is there any way to tweak the…
Claus
  • 5,662
  • 10
  • 77
  • 118
9
votes
7 answers

Anyone can tell me why we always use the gaussian distribution in Machine learning?

For example, we always assumed that the data or signal error is a Gaussian distribution? why?
laotao
  • 103
  • 1
  • 1
  • 4
8
votes
1 answer

Generating a random Gaussian double in Objective-C/C

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?
Rory Harvey
  • 2,579
  • 2
  • 22
  • 27
8
votes
3 answers

python: ValueError: too many values to unpack (expected 2) data from excell

I want to take data from excel and plot 2D kernel density estimate in python, but it says "ValueError: too many values to unpack (expected 2)". how to fix it? following the coding: # libraries import matplotlib.pyplot as plt from scipy.stats import…
EZF
  • 81
  • 1
  • 2
  • 3
8
votes
2 answers

Gaussian random number generator

I'm trying to implement a gaussian distributed random number generator in the interval [0,1]. float rand_gauss (void) { float v1,v2,s; do { v1 = 2.0 * ((float) rand()/RAND_MAX) - 1; v2 = 2.0 * ((float) rand()/RAND_MAX) - 1; s =…
user173973
8
votes
1 answer

How to use python to separate two gaussian curves?

I measured the fluorescence intensity of thousands of particles and made the histogram, which showed two adjacent gaussian curves. How to use python or its package to separate them into two Gaussian curves and make two new plots? Thank you.
Steve Xu
  • 489
  • 1
  • 7
  • 12
8
votes
1 answer

Gaussian Process scikit-learn - Exception

I want to use Gaussian Processes to solve a regression task. My data is as follow : each X vector has a length of 37, and each Y vector has a length of 8. I'm using the sklearnpackage in Python but trying to use gaussian processes leads to an…
Julian
  • 556
  • 1
  • 8
  • 27
8
votes
2 answers

Python - Kriging (Gaussian Process) in scikit_learn

I am considering using this method to interpolate some 3D points I have. As an input I have atmospheric concentrations of a gas at various elevations over an area. The data I have appears as values every few feet of vertical elevation for several…
Cliff S
  • 81
  • 1
  • 1
  • 2
8
votes
1 answer

Finding the derivative of a 2D function using FFT properties

I'm trying to use the FFT properties to get the i-th derivative of a 2D function - specifically a 2D Gaussian function. I would also like to do this numerically in MATLAB. Actually, I don't have a clue of what I'm doing, but I've read a lot on the…
Keydash
  • 83
  • 1
  • 4
8
votes
2 answers

Generating 3D Gaussian distribution in Python

I want to generate a Gaussian distribution in Python with the x and y dimensions denoting position and the z dimension denoting the magnitude of a certain quantity. The distribution has a maximum value of 2e6 and a standard deviation sigma=0.025. In…
Jonny
  • 1,270
  • 5
  • 19
  • 31
8
votes
5 answers

How can I estimate gaussian (mixture) density from a set of weighted samples?

Assume I have a set of weighted samples, where each samples has a corresponding weight between 0 and 1. I'd like to estimate the parameters of a gaussian mixture distribution that is biased towards the samples with higher weight. In the usual…
Christian
  • 2,214
  • 4
  • 26
  • 37
8
votes
1 answer

Is there any Difference of Gaussians function in Matlab?

I am new to Image Processing, and in my experiment I am having difficulty with Difference of Gaussians. Various implementation were given to me but I don't understand them and their parameters. Here are my formulas Should I implement this…
Sedat KURT
  • 478
  • 4
  • 9
  • 20