public interface Model<O>
extends org.apache.hadoop.io.Writable
Modifier and Type | Method and Description |
---|---|
void |
computeParameters()
Compute a new set of posterior parameters based upon the Observations that
have been observed since my creation
|
long |
getNumObservations()
Return the number of observations that this model has seen since its
parameters were last computed
|
long |
getTotalObservations()
Return the number of observations that this model has seen over its
lifetime
|
void |
observe(Model<O> x)
Observe the given model, retaining information about its observations
|
void |
observe(O x)
Observe the given observation, retaining information about it
|
void |
observe(O x,
double weight)
Observe the given observation, retaining information about it
|
double |
pdf(O x)
Return the probability that the observation is described by this model
|
Model<VectorWritable> |
sampleFromPosterior() |
double pdf(O x)
x
- an Observation from the posteriorvoid observe(O x)
x
- an Observation from the posteriorvoid observe(O x, double weight)
x
- an Observation from the posteriorweight
- a double weighting factorvoid observe(Model<O> x)
x
- a Model<0>void computeParameters()
long getNumObservations()
long getTotalObservations()
Model<VectorWritable> sampleFromPosterior()
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.