@PublicationReference(author="Jeff Grynaviski",title="Bayesian Analysis of the Normal Distribution, Part II",type=Misc,year=2009,url="http://home.uchicago.edu/~grynav/bayes/ABSLec8.ppt") @PublicationReference(author="Wikipedia",title="Conjugate Prior",type=WebPage,year=2009,url="http://en.wikipedia.org/wiki/Conjugate_prior") public class UnivariateGaussianMeanVarianceBayesianEstimator extends AbstractConjugatePriorBayesianEstimator<java.lang.Double,Vector,UnivariateGaussian,NormalInverseGammaDistribution> implements ConjugatePriorBayesianEstimatorPredictor<java.lang.Double,Vector,UnivariateGaussian,NormalInverseGammaDistribution>
Modifier and Type | Class and Description |
---|---|
static class |
UnivariateGaussianMeanVarianceBayesianEstimator.Parameter
Parameter for this conjugate prior estimator.
|
parameter
Modifier | Constructor and Description |
---|---|
|
UnivariateGaussianMeanVarianceBayesianEstimator()
Creates a new instance of UnivariateGaussianMeanVarianceBayesianEstimator
|
protected |
UnivariateGaussianMeanVarianceBayesianEstimator(BayesianParameter<Vector,UnivariateGaussian,NormalInverseGammaDistribution> parameter)
Creates a new instance of UnivariateGaussianMeanVarianceBayesianEstimator
|
|
UnivariateGaussianMeanVarianceBayesianEstimator(NormalInverseGammaDistribution prior)
Creates a new instance of UnivariateGaussianMeanVarianceBayesianEstimator
|
|
UnivariateGaussianMeanVarianceBayesianEstimator(UnivariateGaussian conditional,
NormalInverseGammaDistribution prior)
Creates a new instance of UnivariateGaussianMeanVarianceBayesianEstimator
|
Modifier and Type | Method and Description |
---|---|
double |
computeEquivalentSampleSize(NormalInverseGammaDistribution belief)
Computes the equivalent sample size of using the given prior.
|
UnivariateGaussianMeanVarianceBayesianEstimator.Parameter |
createParameter(UnivariateGaussian conditional,
NormalInverseGammaDistribution prior)
Creates a parameter linking the conditional and prior distributions
|
StudentTDistribution |
createPredictiveDistribution(NormalInverseGammaDistribution posterior)
Creates the predictive distribution of new data given the posterior.
|
void |
update(NormalInverseGammaDistribution target,
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. |
void |
update(NormalInverseGammaDistribution prior,
java.lang.Iterable<? extends java.lang.Double> data)
The
update method updates an object of ResultType using
the given new Iterable containing some number of type DataType ,
using some form of "learning" algorithm. |
clone, createConditionalDistribution, createInitialLearnedObject, getInitialBelief, getParameter, setParameter
learn, learn
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createConditionalDistribution, getParameter
learn
clone
createInitialLearnedObject
public UnivariateGaussianMeanVarianceBayesianEstimator()
public UnivariateGaussianMeanVarianceBayesianEstimator(NormalInverseGammaDistribution prior)
prior
- Conjugate priorpublic UnivariateGaussianMeanVarianceBayesianEstimator(UnivariateGaussian conditional, NormalInverseGammaDistribution prior)
conditional
- Conditional distributionprior
- Conjugate priorprotected UnivariateGaussianMeanVarianceBayesianEstimator(BayesianParameter<Vector,UnivariateGaussian,NormalInverseGammaDistribution> parameter)
parameter
- Parameter that describes the relationship between the conditional and
conjugate priorpublic UnivariateGaussianMeanVarianceBayesianEstimator.Parameter createParameter(UnivariateGaussian conditional, NormalInverseGammaDistribution prior)
ConjugatePriorBayesianEstimator
createParameter
in interface ConjugatePriorBayesianEstimator<java.lang.Double,Vector,UnivariateGaussian,NormalInverseGammaDistribution>
conditional
- Distribution from which observations are generatedprior
- Distribution that generates parameters for the conditionalpublic void update(NormalInverseGammaDistribution target, 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,NormalInverseGammaDistribution>
target
- The object to update.data
- The new data for the learning algorithm to use to update
the object.public void update(NormalInverseGammaDistribution prior, java.lang.Iterable<? extends java.lang.Double> data)
IncrementalLearner
update
method updates an object of ResultType
using
the given new Iterable containing some number of type DataType
,
using some form of "learning" algorithm.update
in interface IncrementalLearner<java.lang.Double,NormalInverseGammaDistribution>
update
in class AbstractBatchAndIncrementalLearner<java.lang.Double,NormalInverseGammaDistribution>
prior
- The object to update.data
- The Iterable containing data for the learning algorithm to use to
update the object.public double computeEquivalentSampleSize(NormalInverseGammaDistribution belief)
ConjugatePriorBayesianEstimator
computeEquivalentSampleSize
in interface ConjugatePriorBayesianEstimator<java.lang.Double,Vector,UnivariateGaussian,NormalInverseGammaDistribution>
belief
- Prior belief to measure.public StudentTDistribution createPredictiveDistribution(NormalInverseGammaDistribution posterior)
BayesianEstimatorPredictor
createPredictiveDistribution
in interface BayesianEstimatorPredictor<java.lang.Double,Vector,NormalInverseGammaDistribution>
posterior
- Posterior distribution from which to compute the predictive posterior.