|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.ac.ulg.montefiore.run.jahmm.OpdfInteger
public class OpdfInteger
This class represents a distribution of a finite number of positive integer observations.
| Constructor Summary | |
|---|---|
OpdfInteger(double[] probabilities)
Builds a new probability distribution which operates on integer values. |
|
OpdfInteger(int nbEntries)
Builds a new probability distribution which operates on integer values. |
|
| Method Summary | |
|---|---|
OpdfInteger |
clone()
|
void |
fit(java.util.Collection<? extends ObservationInteger> co)
Fits this observation probability (distribution) function to a (non empty) set of observations. |
void |
fit(java.util.Collection<? extends ObservationInteger> co,
double[] weights)
Fits this observation probability (distribution) function to a weighted (non empty) set of observations. |
void |
fit(ObservationInteger... oa)
Fits this observation probability (distribution) function to a (non empty) set of observations. |
void |
fit(ObservationInteger[] o,
double[] weights)
Fits this observation probability (distribution) function to a weighted (non empty) set of observations. |
ObservationInteger |
generate()
Generates a (pseudo) random observation according to this distribution. |
int |
nbEntries()
Returns how many integers are associated to probabilities by this distribution. |
double |
probability(ObservationInteger o)
Returns the probability (density) of an observation given a distribution. |
java.lang.String |
toString()
|
java.lang.String |
toString(java.text.NumberFormat numberFormat)
Returns a String describing this distribution. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OpdfInteger(int nbEntries)
nbEntries - The number of values to which to associate
probabilities. Observations handled by this
distribution have to be higher or equal than 0 and
strictly smaller than nbEntries.public OpdfInteger(double[] probabilities)
probabilities - Array holding one probability for each possible
argument value (i.e. such that
probabilities[i] is the probability
of the observation i.| Method Detail |
|---|
public int nbEntries()
public double probability(ObservationInteger o)
Opdf
probability in interface Opdf<ObservationInteger>o - An observation.
o takes continuous
values) of o for this function.public ObservationInteger generate()
Opdf
generate in interface Opdf<ObservationInteger>public void fit(ObservationInteger... oa)
Opdf
fit in interface Opdf<ObservationInteger>oa - An array of observations compatible with this function.public void fit(java.util.Collection<? extends ObservationInteger> co)
Opdf
fit in interface Opdf<ObservationInteger>co - A set of observations compatible with this function.
public void fit(ObservationInteger[] o,
double[] weights)
Opdf
fit in interface Opdf<ObservationInteger>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).
public void fit(java.util.Collection<? extends ObservationInteger> co,
double[] weights)
Opdf
fit in interface Opdf<ObservationInteger>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).public OpdfInteger clone()
clone in interface Opdf<ObservationInteger>clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.text.NumberFormat numberFormat)
OpdfString describing this distribution.
toString in interface Opdf<ObservationInteger>numberFormat - A formatter used to convert the numbers (e.g.
probabilities) to strings.
String describing this distribution.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||