Gaussian function

# Gaussian function

Overview

Discussion

Encyclopedia

In mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, a Gaussian function (named after Johann Carl Friedrich Gauss
Carl Friedrich Gauss
Johann Carl Friedrich Gauss was a German mathematician and scientist who contributed significantly to many fields, including number theory, statistics, analysis, differential geometry, geodesy, geophysics, electrostatics, astronomy and optics.Sometimes referred to as the Princeps mathematicorum...

) is a function
Function (mathematics)
In mathematics, a function associates one quantity, the argument of the function, also known as the input, with another quantity, the value of the function, also known as the output. A function assigns exactly one output to each input. The argument and the value may be real numbers, but they can...

of the form:

for some real
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...

constants a, b, c > 0, and e ≈ 2.718281828 (Euler's number
E (mathematical constant)
The mathematical constant ' is the unique real number such that the value of the derivative of the function at the point is equal to 1. The function so defined is called the exponential function, and its inverse is the natural logarithm, or logarithm to base...

).

The graph
Graph of a function
In mathematics, the graph of a function f is the collection of all ordered pairs . In particular, if x is a real number, graph means the graphical representation of this collection, in the form of a curve on a Cartesian plane, together with Cartesian axes, etc. Graphing on a Cartesian plane is...

of a Gaussian is a characteristic symmetric "bell curve" shape that quickly falls off towards plus/minus infinity. 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".

Gaussian functions are widely used in statistics
Statistics
Statistics is the study of the collection, organization, analysis, and interpretation of data. It deals with all aspects of this, including the planning of data collection in terms of the design of surveys and experiments....

where they describe the normal distributions, in signal processing
Signal processing
Signal processing is an area of systems engineering, electrical engineering and applied mathematics that deals with operations on or analysis of signals, in either discrete or continuous time...

where they serve to define Gaussian filter
Gaussian filter
In electronics and signal processing, a Gaussian filter is a filter whose impulse response is a Gaussian function. Gaussian filters are designed to give no overshoot to a step function input while minimizing the rise and fall time. This behavior is closely connected to the fact that the Gaussian...

s, in image processing
Image processing
In electrical engineering and computer science, image processing is any form of signal processing for which the input is an image, such as a photograph or video frame; the output of image processing may be either an image or, a set of characteristics or parameters related to the image...

where two-dimensional Gaussians are used for Gaussian blur
Gaussian blur
A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect in graphics software, typically to reduce image noise and reduce detail...

s, and in mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

where they are used to solve heat equation
Heat equation
The heat equation is an important partial differential equation which describes the distribution of heat in a given region over time...

s and diffusion equations and to define the Weierstrass transform
Weierstrass transform
In mathematics, the Weierstrass transform of a function f : R → R, named after Karl Weierstrass, is the function F defined by...

.

## Properties

Gaussian functions arise by applying the exponential function
Exponential function
In mathematics, the exponential function is the function ex, where e is the number such that the function ex is its own derivative. The exponential function is used to model a relationship in which a constant change in the independent variable gives the same proportional change In mathematics,...

A quadratic function, in mathematics, is a polynomial function of the formf=ax^2+bx+c,\quad a \ne 0.The graph of a quadratic function is a parabola whose axis of symmetry is parallel to the y-axis....

. The Gaussian functions are thus those functions whose logarithm
Logarithm
The logarithm of a number is the exponent by which another fixed value, the base, has to be raised to produce that number. For example, the logarithm of 1000 to base 10 is 3, because 1000 is 10 to the power 3: More generally, if x = by, then y is the logarithm of x to base b, and is written...

The parameter c is related to the full width at half maximum
Full width at half maximum
Full width at half maximum is an expression of the extent of a function, given by the difference between the two extreme values of the independent variable at which the dependent variable is equal to half of its maximum value....

(FWHM) of the peak according to

Alternatively, the parameter c can be interpreted by saying that the two inflection point
Inflection point
In differential calculus, an inflection point, point of inflection, or inflection is a point on a curve at which the curvature or concavity changes sign. The curve changes from being concave upwards to concave downwards , or vice versa...

s of the function occur at x = b − c and x = b + c.

The full width at tenth of maximum FWTM for a Gaussian could be of interest and is
.

Gaussian functions are analytic
Analytic function
In mathematics, an analytic function is a function that is locally given by a convergent power series. There exist both real analytic functions and complex analytic functions, categories that are similar in some ways, but different in others...

, and their limit
Limit (mathematics)
In mathematics, the concept of a "limit" is used to describe the value that a function or sequence "approaches" as the input or index approaches some value. The concept of limit allows mathematicians to define a new point from a Cauchy sequence of previously defined points within a complete metric...

as x → ∞ is 0.

Gaussian functions are among those functions that are elementary
Elementary function (differential algebra)
In mathematics, an elementary function is a function of one variable built from a finite number of exponentials, logarithms, constants, and nth roots through composition and combinations using the four elementary operations...

but lack elementary antiderivative
Antiderivative
In calculus, an "anti-derivative", antiderivative, primitive integral or indefinite integralof a function f is a function F whose derivative is equal to f, i.e., F ′ = f...

s; the integral
Integral
Integration is an important concept in mathematics and, together with its inverse, differentiation, is one of the two main operations in calculus...

of the Gaussian function is the error function
Error function
In mathematics, the error function is a special function of sigmoid shape which occurs in probability, statistics and partial differential equations...

. Nonetheless their improper integrals over the whole real line can be evaluated exactly, using the Gaussian integral
Gaussian integral
The Gaussian integral, also known as the Euler-Poisson integral or Poisson integral, is the integral of the Gaussian function e−x2 over the entire real line.It is named after the German mathematician and...

and one obtains

This integral is 1 if and only if a = 1/(c√(2π)), and in this case the Gaussian is the probability density function
Probability density function
In probability theory, a probability density function , or density of a continuous random variable is a function that describes the relative likelihood for this random variable to occur at a given point. The probability for the random variable to fall within a particular region is given by the...

of a normally distributed random variable
Random variable
In probability and statistics, a random variable or stochastic variable is, roughly speaking, a variable whose value results from a measurement on some type of random process. Formally, it is a function from a probability space, typically to the real numbers, which is measurable functionmeasurable...

with expected value
Expected value
In probability theory, the expected value of a random variable is the weighted average of all possible values that this random variable can take on...

μ = b and variance
Variance
In probability theory and statistics, the variance is a measure of how far a set of numbers is spread out. It is one of several descriptors of a probability distribution, describing how far the numbers lie from the mean . In particular, the variance is one of the moments of a distribution...

σ2 = c2. These Gaussians are graphed in the accompanying figure.

Gaussian functions centered at zero minimize the Fourier uncertainty principle.

The product of two Gaussian functions is a Gaussian, and the convolution
Convolution
In mathematics and, in particular, functional analysis, convolution is a mathematical operation on two functions f and g, producing a third function that is typically viewed as a modified version of one of the original functions. Convolution is similar to cross-correlation...

of two Gaussian functions is again a Gaussian, with .

Taking the Fourier transform (unitary, angular frequency convention) of a Gaussian function with parameters a, b = 0 and c yields another Gaussian function, with parameters ac, b = 0 and 1/c. So in particular the Gaussian functions with b = 0 and c = 1 are kept fixed by the Fourier transform (they are eigenfunction
Eigenfunction
In mathematics, an eigenfunction of a linear operator, A, defined on some function space is any non-zero function f in that space that returns from the operator exactly as is, except for a multiplicative scaling factor. More precisely, one has...

s of the Fourier transform with eigenvalue 1).
The fact that the Gaussian function is an eigenfunction of the Continuous Fourier transform
allows to derive the following interesting identity from the Poisson summation formula
Poisson summation formula
In mathematics, the Poisson summation formula is an equation that relates the Fourier series coefficients of the periodic summation of a function to values of the function's continuous Fourier transform. Consequently, the periodic summation of a function is completely defined by discrete samples...

:

## Two-dimensional Gaussian function

In two dimensions, the power to which e is raised in the Gaussian function may be any bivariate conic section, including circles, ellipses, and hyperbolas. Depending on which curve is used, the resulting Gaussian will have level sets that are circles, ellipses, or even hyperbolas.

A particular example of a two-dimensional Gaussian function is

Here the coefficient A is the amplitude, xo,yo is the center and σx, σy are the x and y spreads of the blob. The figure on the right was created using A = 1, xo = 0, yo = 0, σx = σy = 1.

In general, a two-dimensional elliptical Gaussian function is expressed as

where the matrix

is positive-definite
Positive-definite matrix
In linear algebra, a positive-definite matrix is a matrix that in many ways is analogous to a positive real number. The notion is closely related to a positive-definite symmetric bilinear form ....

.

Using this formulation, the figure on the right can be created using A = 1, (xo, yo) = (0, 0), a = c = 1/2, b = 0.

### Meaning of parameters for the general equation

For the general form of the equation the coefficient A is the height of the peak and (xoyo) is the center of the blob.

If we set

then we rotate the blob by a clockwise angle (for counterclockwise rotation invert the signs in the b coefficient). This can be seen in the following examples:

Using the following Octave
GNU Octave
GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command-line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB...

code one can easily see the effect of changing the parameters

A = 1;
x0 = 0; y0 = 0;

sigma_x = 1;
sigma_y = 2;

for theta = 0:pi/100:pi
a = cos(theta)^2/2/sigma_x^2 + sin(theta)^2/2/sigma_y^2;
b = -sin(2*theta)/4/sigma_x^2 + sin(2*theta)/4/sigma_y^2 ;
c = sin(theta)^2/2/sigma_x^2 + cos(theta)^2/2/sigma_y^2;

[X, Y] = meshgrid(-5:.1:5, -5:.1:5);
Z = A*exp( - (a*(X-x0).^2 + 2*b*(X-x0).*(Y-y0) + c*(Y-y0).^2)) ;
end

Such functions are often used in image processing
Image processing
In electrical engineering and computer science, image processing is any form of signal processing for which the input is an image, such as a photograph or video frame; the output of image processing may be either an image or, a set of characteristics or parameters related to the image...

and in computational models of visual system
Visual system
The visual system is the part of the central nervous system which enables organisms to process visual detail, as well as enabling several non-image forming photoresponse functions. It interprets information from visible light to build a representation of the surrounding world...

function -- see the articles on scale space
Scale space
Scale-space theory is a framework for multi-scale signal representation developed by the computer vision, image processing and signal processing communities with complementary motivations from physics and biological vision...

Affine shape adaptation is a methodology for iteratively adapting the shape of the smoothing kernels in an affine group of smoothing kernels to the local image structure in neighbourhood region of a specific image point...

.

Also see multivariate normal distribution.

## Multi-dimensional Gaussian function

In an -dimensional space a Gaussian function can be defined as
where is a column of coordinates, is a positive-definite
Positive-definite matrix
In linear algebra, a positive-definite matrix is a matrix that in many ways is analogous to a positive real number. The notion is closely related to a positive-definite symmetric bilinear form ....

matrix, and denotes transposition.

The integral of a Gaussian function over the whole -dimensional space is given as
It can be easily calculated by diagonalizing the matrix and changing the integration variables to the eigenvectors of .

More generally a shifted Gaussian function is defined as
where is the shift vector and the matrix can be assumed to be symmetric, . The following integrals with this function can be calculated with the same technique,

## Gaussian profile estimation

A number of fields such as stellar photometry
Photometry (astronomy)
Photometry is a technique of astronomy concerned with measuring the flux, or intensity of an astronomical object's electromagnetic radiation...

, Gaussian beam
Gaussian beam
In optics, a Gaussian beam is a beam of electromagnetic radiation whose transverse electric field and intensity distributions are well approximated by Gaussian functions. Many lasers emit beams that approximate a Gaussian profile, in which case the laser is said to be operating on the fundamental...

characterization, and emission/absorption line spectroscopy work with sampled Gaussian functions and need to accurately estimate the height, position, and width parameters of the function. These are , , and for a 1D Gaussian function, , , and for a 2D Gaussian function. These most common method for estimating the profile parameters is to take the logarithm of the data and fit a parabola to the resulting data set. While this provides a simple least squares
Least squares
The method of least squares is a standard approach to the approximate solution of overdetermined systems, i.e., sets of equations in which there are more equations than unknowns. "Least squares" means that the overall solution minimizes the sum of the squares of the errors made in solving every...

fitting procedure, the resulting algorithm is biased by excessively weighting small data values, and this can produce large errors in the profile estimate. One can partially compensate for this through weighted least squares estimation, in which the small data values are given small weights, but this too can be biased by allowing the tail of the Gaussian to dominate the fit. In order to remove the bias, one can instead use an iterative procedure in which the weights are updated at each iteration (see Iteratively reweighted least squares).

Once one has an algorithm for estimating the Gaussian function parameters, it is also important to know how accurate those estimates are. While an estimation algorithm can provide numerical estimates for the variance of each parameter (i.e. the variance of the estimated height, position, and width of the function), one can use Cramer-Rao bound theory to obtain an analytical expression for the lower bound on the parameter variances, given some assumptions about the data.
1. The noise in the measured profile is either i.i.d. Gaussian, or the noise is Poisson-distributed
Poisson distribution
In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time and/or space if these events occur with a known average rate and independently of the time since...

.
2. The spacing between each sampling (i.e. the distance between pixels measuring the data) is uniform.
3. The peak is "well-sampled", so that less than 10% of the area or volume under the peak (area if a 1D Gaussian, volume if a 2D Gaussian) lies outside the measurement region.
4. The width of the peak is much larger than the distance between sample locations (i.e. the detector pixels must be at least 5 times smaller than the Gaussian FWHM).

When these assumptions are satisfied, the following covariance matrix K applies for the 1D profile parameters , , and under i.i.d. Gaussian noise and under Poisson noise:

where is the width of the pixels used to sample the function, is the quantum efficiency of the detector, and indicates the standard deviation of the measurement noise. Thus, the individual variances for the parameters are, in the Gaussian noise case,

and in the Poisson noise case,

For the 2D profile parameters giving the amplitude , position , and width of the profile, the following covariance matrices apply:

where the individual parameter variances are given by the diagonal elements of the covariance matrix.

## Discrete Gaussian

One may ask for a discrete analog to the Gaussian;
this is necessary in discrete applications,
particularly digital signal processing
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...

.
A simple answer is to sample the continuous Gaussian, yielding the sampled Gaussian kernel. However, this discrete function does not have the discrete analogs of the properties of the continuous function, and can lead to undesired effects, such as in scale space implementation.

An alternative approach is to use discrete Gaussian kernel:
where denotes the modified Bessel functions of integer order.

This is the discrete analog of the continuous Gaussian in that it is the solution to the discrete diffusion equation (discrete space, continuous time), just as the continuous Gaussian is the solution to the continuous diffusion equation.

## Applications

Gaussian functions appear in many contexts in the natural sciences, the social sciences
Social sciences
Social science is the field of study concerned with society. "Social science" is commonly used as an umbrella term to refer to a plurality of fields outside of the natural sciences usually exclusive of the administrative or managerial sciences...

, mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, and engineering
Engineering
Engineering is the discipline, art, skill and profession of acquiring and applying scientific, mathematical, economic, social, and practical knowledge, in order to design and build structures, machines, devices, systems, materials and processes that safely realize improvements to the lives of...

. Some examples include:
• In statistics
Statistics
Statistics is the study of the collection, organization, analysis, and interpretation of data. It deals with all aspects of this, including the planning of data collection in terms of the design of surveys and experiments....

and probability theory
Probability theory
Probability theory is the branch of mathematics concerned with analysis of random phenomena. The central objects of probability theory are random variables, stochastic processes, and events: mathematical abstractions of non-deterministic events or measured quantities that may either be single...

, Gaussian functions appear as the density function of the normal distribution, which is a limiting probability distribution
Probability distribution
In probability theory, a probability mass, probability density, or probability distribution is a function that describes the probability of a random variable taking certain values....

of complicated sums, according to the central limit theorem
Central limit theorem
In probability theory, the central limit theorem states conditions under which the mean of a sufficiently large number of independent random variables, each with finite mean and variance, will be approximately normally distributed. The central limit theorem has a number of variants. In its common...

.
• Gaussian functions are the Green's function
Green's function
In mathematics, a Green's function is a type of function used to solve inhomogeneous differential equations subject to specific initial conditions or boundary conditions...

for the (homogeneous and isotropic) diffusion equation (and, which is the same thing, to the heat equation
Heat equation
The heat equation is an important partial differential equation which describes the distribution of heat in a given region over time...

), a partial differential equation
Partial differential equation
In mathematics, partial differential equations are a type of differential equation, i.e., a relation involving an unknown function of several independent variables and their partial derivatives with respect to those variables...

that describes the time evolution of a mass-density under diffusion
Diffusion
Molecular diffusion, often called simply diffusion, is the thermal motion of all particles at temperatures above absolute zero. The rate of this movement is a function of temperature, viscosity of the fluid and the size of the particles...

. Specifically, if the mass-density at time t=0 is given by a Dirac delta, which essentially means that the mass is initially concentrated in a single point, then the mass-distribution at time t will be given by a Gaussian function, with the parameter a being linearly related to 1/√t and c being linearly related to √t. More generally, if the initial mass-density is φ(x), then the mass-density at later times is obtained by taking the convolution
Convolution
In mathematics and, in particular, functional analysis, convolution is a mathematical operation on two functions f and g, producing a third function that is typically viewed as a modified version of one of the original functions. Convolution is similar to cross-correlation...

of φ with a Gaussian function. The convolution of a function with a Gaussian is also known as a Weierstrass transform
Weierstrass transform
In mathematics, the Weierstrass transform of a function f : R → R, named after Karl Weierstrass, is the function F defined by...

.
• A Gaussian function is the wave function of the ground state
Ground state
The ground state of a quantum mechanical system is its lowest-energy state; the energy of the ground state is known as the zero-point energy of the system. An excited state is any state with energy greater than the ground state...

of the quantum harmonic oscillator
Quantum harmonic oscillator
The quantum harmonic oscillator is the quantum-mechanical analog of the classical harmonic oscillator. Because an arbitrary potential can be approximated as a harmonic potential at the vicinity of a stable equilibrium point, it is one of the most important model systems in quantum mechanics...

.
• The molecular orbital
Molecular orbital
In chemistry, a molecular orbital is a mathematical function describing the wave-like behavior of an electron in a molecule. This function can be used to calculate chemical and physical properties such as the probability of finding an electron in any specific region. The term "orbital" was first...

s used in computational chemistry
Computational chemistry
Computational chemistry is a branch of chemistry that uses principles of computer science to assist in solving chemical problems. It uses the results of theoretical chemistry, incorporated into efficient computer programs, to calculate the structures and properties of molecules and solids...

can be linear combination
Linear combination
In mathematics, a linear combination is an expression constructed from a set of terms by multiplying each term by a constant and adding the results...

s of Gaussian functions called Gaussian orbital
Gaussian orbital
In computational chemistry and molecular physics, Gaussian orbitals are functions used as atomic orbitals in the LCAO method for the computation of electron orbitals in molecules and numerous properties that depend on these.- Rationale :The principal reason for the use of Gaussian basis functions...

Basis set (chemistry)
A basis set in chemistry is a set of functions used to create the molecular orbitals, which are expanded as a linear combination of such functions with the weights or coefficients to be determined. Usually these functions are atomic orbitals, in that they are centered on atoms. Otherwise, the...

).
• Mathematically, the derivative
Derivative
In calculus, a branch of mathematics, the derivative is a measure of how a function changes as its input changes. Loosely speaking, a derivative can be thought of as how much one quantity is changing in response to changes in some other quantity; for example, the derivative of the position of a...

s of the Gaussian function can be represented using Hermite functions. The n-th derivative of the Gaussian is the Gaussian function itself multiplied by the n-th Hermite polynomial, up to scale. For example the first-derivative of the Gaussian is simply the Gaussian multiplied by x.
• Consequently, Gaussian functions are also associated with the vacuum state
Vacuum state
In quantum field theory, the vacuum state is the quantum state with the lowest possible energy. Generally, it contains no physical particles...

in quantum field theory
Quantum field theory
Quantum field theory provides a theoretical framework for constructing quantum mechanical models of systems classically parametrized by an infinite number of dynamical degrees of freedom, that is, fields and many-body systems. It is the natural and quantitative language of particle physics and...

.
• Gaussian beam
Gaussian beam
In optics, a Gaussian beam is a beam of electromagnetic radiation whose transverse electric field and intensity distributions are well approximated by Gaussian functions. Many lasers emit beams that approximate a Gaussian profile, in which case the laser is said to be operating on the fundamental...

s are used in optical and microwave systems.
• In scale space
Scale space
Scale-space theory is a framework for multi-scale signal representation developed by the computer vision, image processing and signal processing communities with complementary motivations from physics and biological vision...

representation, Gaussian functions are used as smoothing kernels for generating multi-scale representations in computer vision
Computer vision
Computer vision is a field that includes methods for acquiring, processing, analysing, and understanding images and, in general, high-dimensional data from the real world in order to produce numerical or symbolic information, e.g., in the forms of decisions...

and image processing
Image processing
In electrical engineering and computer science, image processing is any form of signal processing for which the input is an image, such as a photograph or video frame; the output of image processing may be either an image or, a set of characteristics or parameters related to the image...

. Specifically, derivatives of Gaussians (Hermite functions) are used as a basis for defining a large number of types of visual operations.
• Gaussian functions are used to define some types of artificial neural network
Artificial neural network
An artificial neural network , usually called neural network , is a mathematical model or computational model that is inspired by the structure and/or functional aspects of biological neural networks. A neural network consists of an interconnected group of artificial neurons, and it processes...

s.
• In fluorescence microscopy a 2D Gaussian function is used to approximate the Airy disk, describing the intensity distribution produced by a point source
Point source
A point source is a localised, relatively small source of something.Point source may also refer to:*Point source , a localised source of pollution**Point source water pollution, water pollution with a localized source...

.
• In signal processing
Signal processing
Signal processing is an area of systems engineering, electrical engineering and applied mathematics that deals with operations on or analysis of signals, in either discrete or continuous time...

they serve to define Gaussian filter
Gaussian filter
In electronics and signal processing, a Gaussian filter is a filter whose impulse response is a Gaussian function. Gaussian filters are designed to give no overshoot to a step function input while minimizing the rise and fall time. This behavior is closely connected to the fact that the Gaussian...

s, such as in image processing
Image processing
In electrical engineering and computer science, image processing is any form of signal processing for which the input is an image, such as a photograph or video frame; the output of image processing may be either an image or, a set of characteristics or parameters related to the image...

where 2D Gaussians are used for Gaussian blur
Gaussian blur
A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect in graphics software, typically to reduce image noise and reduce detail...

s. In digital signal processing
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...

, one uses a discrete Gaussian kernel, which may be defined by sampling a Gaussian, or in a different way.
• In geostatistics
Geostatistics
Geostatistics is a branch of statistics focusing on spatial or spatiotemporal datasets. Developed originally to predict probability distributions of ore grades for mining operations, it is currently applied in diverse disciplines including petroleum geology, hydrogeology, hydrology, meteorology,...

they have been used for understanding the variability between the patterns of a complex training image. They are used with kernel methods to cluster the patterns in the feature space.