be.ac.ulg.montefiore.run.jahmm
Interface Opdf<O extends Observation>

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
OpdfDiscrete, OpdfGaussian, OpdfGaussianMixture, OpdfInteger, OpdfMultiGaussian

public interface Opdf<O extends Observation>
extends java.lang.Cloneable, java.io.Serializable

Objects implementing this interface represent an observation probability (distribution) function.

An Opdf can represent a probability function (if the observations can take discrete values) or a probability distribution (if the observations are continous).


Method Summary
 Opdf<O> clone()
           
 void fit(java.util.Collection<? extends O> co)
          Fits this observation probability (distribution) function to a (non empty) set of observations.
 void fit(java.util.Collection<? extends O> co, double[] weights)
          Fits this observation probability (distribution) function to a weighted (non empty) set of observations.
 void fit(O... oa)
          Fits this observation probability (distribution) function to a (non empty) set of observations.
 void fit(O[] o, double[] weights)
          Fits this observation probability (distribution) function to a weighted (non empty) set of observations.
 O generate()
          Generates a (pseudo) random observation according to this distribution.
 double probability(O o)
          Returns the probability (density) of an observation given a distribution.
 java.lang.String toString(java.text.NumberFormat numberFormat)
          Returns a String describing this distribution.
 

Method Detail

probability

double probability(O o)
Returns the probability (density) of an observation given a distribution.

Parameters:
o - An observation.
Returns:
The probability (density, if o takes continuous values) of o for this function.

generate

O generate()
Generates a (pseudo) random observation according to this distribution.

Returns:
An observation.

fit

void fit(O... oa)
Fits this observation probability (distribution) function to a (non empty) set of observations. The meaning to give to fits should be has the maximum likelihood if possible.

Parameters:
oa - An array of observations compatible with this function.

fit

void fit(java.util.Collection<? extends O> co)
Fits this observation probability (distribution) function to a (non empty) set of observations. The meaning to give to fits should be has the maximum likelihood if possible.

Parameters:
co - A set of observations compatible with this function.

fit

void fit(O[] o,
         double[] weights)
Fits this observation probability (distribution) function to a weighted (non empty) set of observations. Equations (53) and (54) of Rabiner's A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition explain how the weights can be used.

Parameters:
o - An array of observations compatible with this factory.
weights - The weight associated to each observation (such that weight.length == o.length and the sum of all the elements equals 1).

fit

void fit(java.util.Collection<? extends O> co,
         double[] weights)
Fits this observation probability (distribution) function to a weighted (non empty) set of observations. Equations (53) and (54) of Rabiner's A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition explain how the weights can be used.

Parameters:
co - A set of observations compatible with this factory.
weights - The weight associated to each observation (such that weight.length == o.length and the sum of all the elements equals 1).

toString

java.lang.String toString(java.text.NumberFormat numberFormat)
Returns a String describing this distribution.

Parameters:
numberFormat - A formatter used to convert the numbers (e.g. probabilities) to strings.
Returns:
A String describing this distribution.

clone

Opdf<O> clone()


Copyright © 2004,2005 Jean-Marc François.