|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Opdf<O extends Observation>
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 |
---|
double probability(O o)
o
- An observation.
o
takes continuous
values) of o
for this function.O generate()
void fit(O... oa)
oa
- An array of observations compatible with this function.void fit(java.util.Collection<? extends O> co)
co
- A set of observations compatible with this function.void fit(O[] o, double[] weights)
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).void fit(java.util.Collection<? extends O> co, double[] weights)
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).java.lang.String toString(java.text.NumberFormat numberFormat)
String
describing this distribution.
numberFormat
- A formatter used to convert the numbers (e.g.
probabilities) to strings.
String
describing this distribution.Opdf<O> clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |