@PublicationReference(author="William M. Bolstad", title="Introduction to Bayesian Statistics: Second Edition", type=Book, year=2007, pages=185, notes={"Bolstad primarily uses INVERSE shape parameter on gamma!","So we must invert his calculations for shape!"}) public class PoissonBayesianEstimator extends AbstractConjugatePriorBayesianEstimator<java.lang.Number,java.lang.Double,PoissonDistribution,GammaDistribution> implements ConjugatePriorBayesianEstimatorPredictor<java.lang.Number,java.lang.Double,PoissonDistribution,GammaDistribution>
Modifier and Type | Class and Description |
---|---|
static class |
PoissonBayesianEstimator.Parameter
Parameter of this conjugate prior relationship.
|
parameter
Modifier | Constructor and Description |
---|---|
|
PoissonBayesianEstimator()
Creates a new instance of PoissonBayesianEstimator
|
protected |
PoissonBayesianEstimator(BayesianParameter<java.lang.Double,PoissonDistribution,GammaDistribution> parameter)
Creates a new instance
|
|
PoissonBayesianEstimator(GammaDistribution belief)
Creates a new instance of PoissonBayesianEstimator
|
|
PoissonBayesianEstimator(PoissonDistribution conditional,
GammaDistribution prior)
Creates a new instance of PoissonBayesianEstimator
|
Modifier and Type | Method and Description |
---|---|
double |
computeEquivalentSampleSize(GammaDistribution belief)
Computes the equivalent sample size of using the given prior.
|
PoissonBayesianEstimator.Parameter |
createParameter(PoissonDistribution conditional,
GammaDistribution prior)
Creates a parameter linking the conditional and prior distributions
|
NegativeBinomialDistribution |
createPredictiveDistribution(GammaDistribution posterior)
Creates the predictive distribution of new data given the posterior.
|
void |
update(GammaDistribution belief,
java.lang.Number value)
The
update method updates an object of ResultType using
the given new data of type DataType , using some form of
"learning" algorithm. |
clone, createConditionalDistribution, createInitialLearnedObject, getInitialBelief, getParameter, setParameter
learn, learn, update
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createConditionalDistribution, getParameter
learn
clone
createInitialLearnedObject, update
public PoissonBayesianEstimator()
public PoissonBayesianEstimator(GammaDistribution belief)
belief
- Conjugate prior belief.public PoissonBayesianEstimator(PoissonDistribution conditional, GammaDistribution prior)
prior
- Default conjugate prior.conditional
- Conditional distribution of the conjugate prior.protected PoissonBayesianEstimator(BayesianParameter<java.lang.Double,PoissonDistribution,GammaDistribution> parameter)
parameter
- Bayesian hyperparameter relationship between the conditional
distribution and the conjugate prior distribution.public PoissonBayesianEstimator.Parameter createParameter(PoissonDistribution conditional, GammaDistribution prior)
ConjugatePriorBayesianEstimator
createParameter
in interface ConjugatePriorBayesianEstimator<java.lang.Number,java.lang.Double,PoissonDistribution,GammaDistribution>
conditional
- Distribution from which observations are generatedprior
- Distribution that generates parameters for the conditionalpublic double computeEquivalentSampleSize(GammaDistribution belief)
ConjugatePriorBayesianEstimator
computeEquivalentSampleSize
in interface ConjugatePriorBayesianEstimator<java.lang.Number,java.lang.Double,PoissonDistribution,GammaDistribution>
belief
- Prior belief to measure.public void update(GammaDistribution belief, java.lang.Number value)
IncrementalLearner
update
method updates an object of ResultType
using
the given new data of type DataType
, using some form of
"learning" algorithm.update
in interface IncrementalLearner<java.lang.Number,GammaDistribution>
belief
- The object to update.value
- The new data for the learning algorithm to use to update
the object.public NegativeBinomialDistribution createPredictiveDistribution(GammaDistribution posterior)
BayesianEstimatorPredictor
createPredictiveDistribution
in interface BayesianEstimatorPredictor<java.lang.Number,java.lang.Double,GammaDistribution>
posterior
- Posterior distribution from which to compute the predictive posterior.