ParameterType - Type of parameter that changes the behavior of the conditional distribution.ConditionalType - Type of parameterized distribution that generates observations.PriorType - Assumed underlying distribution of parameters of the conditional distribution.public abstract class AbstractBayesianParameter<ParameterType,ConditionalType extends ClosedFormDistribution<?>,PriorType extends Distribution<ParameterType>> extends AbstractNamed implements BayesianParameter<ParameterType,ConditionalType,PriorType>
| Modifier and Type | Field and Description |
|---|---|
protected ConditionalType |
conditionalDistribution
Distribution from which to pull the parameters.
|
name| Constructor and Description |
|---|
AbstractBayesianParameter()
Creates a new instance of AbstractBayesianParameter
|
AbstractBayesianParameter(ConditionalType conditionalDistribution,
java.lang.String name,
PriorType parameterPrior)
Creates a new instance of AbstractBayesianParameter
|
| Modifier and Type | Method and Description |
|---|---|
AbstractNamed |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
ConditionalType |
getConditionalDistribution()
Getter for conditionalDistribution
|
PriorType |
getParameterPrior()
Getter for parameterPrior
|
protected void |
setConditionalDistribution(ConditionalType conditionalDistribution)
Setter for conditionalDistribution
|
protected void |
setParameterPrior(PriorType parameterPrior)
Setter for parameterPrior
|
void |
updateConditionalDistribution(java.util.Random random)
Updates the conditional distribution by sampling from the prior
distribution and assigning through the DistributionParameter.
|
getName, setName, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetValuegetValueprotected ConditionalType extends ClosedFormDistribution<?> conditionalDistribution
public AbstractBayesianParameter()
public AbstractBayesianParameter(ConditionalType conditionalDistribution, java.lang.String name, PriorType parameterPrior)
conditionalDistribution - Distribution from which to pull the parameters.name - The parameter's nameparameterPrior - Distribution of values that the parameter is assumed to take.public AbstractNamed clone()
AbstractCloneableSerializableObject class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone() to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone() as the basis for your implementation.clone in interface CloneableSerializableclone in class AbstractNamedpublic ConditionalType getConditionalDistribution()
getConditionalDistribution in interface DistributionParameter<ParameterType,ConditionalType extends ClosedFormDistribution<?>>protected void setConditionalDistribution(ConditionalType conditionalDistribution)
conditionalDistribution - Distribution from which to pull the parameters.public PriorType getParameterPrior()
getParameterPrior in interface BayesianParameter<ParameterType,ConditionalType extends ClosedFormDistribution<?>,PriorType extends Distribution<ParameterType>>protected void setParameterPrior(PriorType parameterPrior)
parameterPrior - Distribution of values that the parameter is assumed to take.public void updateConditionalDistribution(java.util.Random random)
BayesianParameterupdateConditionalDistribution in interface BayesianParameter<ParameterType,ConditionalType extends ClosedFormDistribution<?>,PriorType extends Distribution<ParameterType>>random - Random number generator to use in sampling.