emolib.classifier.machinelearning.density
Class Gaussian

java.lang.Object
  extended by emolib.classifier.machinelearning.density.Gaussian
All Implemented Interfaces:
ClassConditionalDensity

public class Gaussian
extends java.lang.Object
implements ClassConditionalDensity

The Gaussian class models a given dataset with a univariate normal distribution.

This density is defined by two variables: the mean and the standard deviation/variance of the population. For data mining purposes, these parameters may be estimated with the Maximum Likelihood method. Its parameter MLE are the sample mean and the sample variance.

Author:
Alexandre Trilla (atrilla@salle.url.edu)

Constructor Summary
Gaussian()
          Main constructor of this density.
Gaussian(float mean, float std)
          Constructor with parameters.
 
Method Summary
 float getLikelihood(float feature)
          The likelihood probabitity given a feature vector.
 float getMean()
          Function to retrieve the mean of this distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gaussian

public Gaussian()
Main constructor of this density. Constructs a standarized normal distribution.


Gaussian

public Gaussian(float mean,
                float std)
Constructor with parameters. Constructs a normal distribution with the given parameters: the mean and the std.

Parameters:
mean - The mean.
std - The standard deviation.
Method Detail

getMean

public float getMean()
Function to retrieve the mean of this distribution.

Returns:
The mean.

getLikelihood

public float getLikelihood(float feature)
Description copied from interface: ClassConditionalDensity
The likelihood probabitity given a feature vector.

Specified by:
getLikelihood in interface ClassConditionalDensity
Parameters:
feature - The feature.
Returns:
prob The associated probability.