@PublicationReference(author="Wikipedia",title="Conjugate Prior",type=WebPage,year=2009,url="http://en.wikipedia.org/wiki/Conjugate_prior") @PublicationReference(author={"Byron J. Gajewski","Stephen D. Simon","Susan E. Carlson"},title="Predicting accrual in clinical trials with Bayesian posterior predictive distributions",type=Journal,year=2008,publication="Statistics in Medicine",notes="They derive the predictive posterior for an inverse gamma, but we\'re using a gamma, so we have to invert the scale parameter.") public class ExponentialBayesianEstimator extends AbstractConjugatePriorBayesianEstimator<java.lang.Double,java.lang.Double,ExponentialDistribution,GammaDistribution> implements ConjugatePriorBayesianEstimatorPredictor<java.lang.Double,java.lang.Double,ExponentialDistribution,GammaDistribution>
Modifier and Type | Class and Description |
---|---|
static class |
ExponentialBayesianEstimator.Parameter
Bayesian parameter describing this conjugate relationship.
|
parameter
Modifier | Constructor and Description |
---|---|
|
ExponentialBayesianEstimator()
Default constructor.
|
protected |
ExponentialBayesianEstimator(BayesianParameter<java.lang.Double,ExponentialDistribution,GammaDistribution> parameter)
Creates a new instance of ExponentialBayesianEstimator
|
|
ExponentialBayesianEstimator(ExponentialDistribution conditional,
GammaDistribution prior)
Creates a new instance of ExponentialBayesianEstimator
|
|
ExponentialBayesianEstimator(GammaDistribution prior)
Creates a new instance of ExponentialBayesianEstimator
|
Modifier and Type | Method and Description |
---|---|
double |
computeEquivalentSampleSize(GammaDistribution belief)
Computes the equivalent sample size of using the given prior.
|
ExponentialBayesianEstimator.Parameter |
createParameter(ExponentialDistribution conditional,
GammaDistribution prior)
Creates a parameter linking the conditional and prior distributions
|
ParetoDistribution |
createPredictiveDistribution(GammaDistribution posterior)
Creates the predictive distribution of new data given the posterior.
|
void |
update(GammaDistribution belief,
java.lang.Double data)
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 ExponentialBayesianEstimator()
public ExponentialBayesianEstimator(GammaDistribution prior)
prior
- Default conjugate prior.public ExponentialBayesianEstimator(ExponentialDistribution conditional, GammaDistribution prior)
prior
- Default conjugate prior.conditional
- Conditional distribution of the conjugate prior.protected ExponentialBayesianEstimator(BayesianParameter<java.lang.Double,ExponentialDistribution,GammaDistribution> parameter)
parameter
- Bayesian parameter describing this conjugate relationship.public ExponentialBayesianEstimator.Parameter createParameter(ExponentialDistribution conditional, GammaDistribution prior)
ConjugatePriorBayesianEstimator
createParameter
in interface ConjugatePriorBayesianEstimator<java.lang.Double,java.lang.Double,ExponentialDistribution,GammaDistribution>
conditional
- Distribution from which observations are generatedprior
- Distribution that generates parameters for the conditionalpublic void update(GammaDistribution belief, java.lang.Double data)
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.Double,GammaDistribution>
belief
- The object to update.data
- The new data for the learning algorithm to use to update
the object.public double computeEquivalentSampleSize(GammaDistribution belief)
ConjugatePriorBayesianEstimator
computeEquivalentSampleSize
in interface ConjugatePriorBayesianEstimator<java.lang.Double,java.lang.Double,ExponentialDistribution,GammaDistribution>
belief
- Prior belief to measure.public ParetoDistribution createPredictiveDistribution(GammaDistribution posterior)
BayesianEstimatorPredictor
createPredictiveDistribution
in interface BayesianEstimatorPredictor<java.lang.Double,java.lang.Double,GammaDistribution>
posterior
- Posterior distribution from which to compute the predictive posterior.