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

Gaussian Blur - standard deviation, radius and kernel size

I've implemented a gaussian blur fragment shader in GLSL. I understand the main concepts behind all of it: convolution, separation of x and y using linearity, multiple passes to increase radius... I still have a few questions though: What's the…
LodeRunner
  • 7,975
  • 3
  • 22
  • 24
14
votes
2 answers

How to convert log probability into simple probability between 0 and 1 values using python

I am using Gaussian mixture model for speaker identification. I use this code to predict the speaker for each voice clip. for path in file_paths: path = path.strip() print (path) sr,audio = read(source + path) vector =…
Sandeep
  • 369
  • 1
  • 5
  • 16
14
votes
2 answers

Swift Gaussian Blur an image

I've been developing an app for quite a while now and am soon to finish. I have been blurring some images using the UIImage+ImageEffects.h library, but now I want to switch to Gaussian blurring an UIImage Is there any library or something similar…
Dan Moldovan
  • 3,576
  • 2
  • 13
  • 24
13
votes
4 answers

How to implement the Gaussian mutation operator for a genetic algorithm in Java

I try to learn and implement a simple genetic algorithm library for my project. At this time, evolution, selection of population is ready, and I'm trying to implement a simple good mutation operator like the Gaussian mutation operator (GMO) for my…
13
votes
2 answers

Python Gaussian Kernel density calculate score for new values

this is my code: import numpy as np from scipy.stats.kde import gaussian_kde from scipy.stats import norm from numpy import linspace,hstack from pylab import plot,show,hist import re import json attribute_file="path" attribute_values =…
Usi Usi
  • 2,967
  • 5
  • 38
  • 69
13
votes
1 answer

Python-load data and do multi Gaussian fit

I've been looking for a way to do multiple Gaussian fitting to my data. Most of the examples I've found so far use a normal distribution to make random numbers. But I am interested in looking at the plot of my data and checking if there are 1-3…
astromath
  • 302
  • 1
  • 3
  • 13
13
votes
4 answers

How to force larger steps on scipy.optimize functions?

I have a function compare_images(k, a, b) that compares two 2d-arrays a and b Inside the funcion, I apply a gaussian_filter with sigma=k to a My idea is to estimate how much I must to smooth image a in order for it to be similar to image b The…
user2329994
  • 151
  • 1
  • 5
12
votes
6 answers

Gaussian random distribution in Postgresql

I have a table of let's say 250 URLs : create table url ( id serial, url varchar(64) ) These URLs correspond each to a website. Each of the websites have a different popularity. Let's say that the id=125 (the one centered on the gaussian) is…
SCO
  • 1,832
  • 1
  • 24
  • 45
12
votes
3 answers

The code "df.dropna" in python erases my entire data frame, what is wrong with my code?

I want to drop all NaN variables in one of my columns but when I use df.dropna(axis=0, inplace=True) it erases my entire dataframe. Why is this happening? I've used both df.dropna and df.dropna(axis=0, inplace=True) and it doesn't work to remove…
Piper Ramirez
  • 373
  • 1
  • 3
  • 11
12
votes
3 answers

ImageMagick: Looking for a fast way to blur an image

I am searching for a faster way to blur an image than to use the GaussianBlur. The solution I am looking for can be a command line solution, but I prefer code in perl notation. Actually, we use the Perl image magick API to blur images: # $image is…
Thariama
  • 50,002
  • 13
  • 138
  • 166
12
votes
3 answers

gaussian sum filter for irregular spaced points

I have a set of points (x,y) as two vectors x,y for example: from pylab import * x = sorted(random(30)) y = random(30) plot(x,y, 'o-') Now I would like to smooth this data with a Gaussian and evaluate it only at certain (regularly spaced) points…
Magellan88
  • 2,543
  • 3
  • 24
  • 36
12
votes
3 answers

Why Gaussian radial basis function maps the examples into an infinite-dimensional space?

I've just run through the Wikipedia page about SVMs, and this line caught my eyes: "If the kernel used is a Gaussian radial basis function, the corresponding feature space is a Hilbert space of infinite dimensions."…
12
votes
2 answers

Python: finding the intersection point of two gaussian curves

I have two gaussian plots: x = np.linspace(-5,9,10000) plot1=plt.plot(x,mlab.normpdf(x,2.5,1)) plot2=plt.plot(x,mlab.normpdf(x,5,1)) and I want to find the point at where the two curves intersect. Is there a way of doing this? In particular I want…
user3287841
  • 217
  • 3
  • 4
  • 7
12
votes
2 answers

Calculate the Gaussian filter's sigma using the kernel's size

I find on the OpenCV documentation for cvSmooth that sigma can be calculated from the kernel size as follows: sigma = 0.3(n/2 - 1) + 0.8 I would like to know the theoretical background of this equation. Thank you.
AimingHigh
  • 131
  • 1
  • 1
  • 4
11
votes
1 answer

How can I perform a least-squares fitting over multiple data sets fast?

I am trying to make a gaussian fit over many data points. E.g. I have a 256 x 262144 array of data. Where the 256 points need to be fitted to a gaussian distribution, and I need 262144 of them. Sometimes the peak of the gaussian distribution is…
Michael
  • 203
  • 1
  • 4
  • 10