gov.sandia.cognition.statistics.bayesian
Class ImportanceSampling.DefaultUpdater<ObservationType,ParameterType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.bayesian.ImportanceSampling.DefaultUpdater<ObservationType,ParameterType>
Type Parameters:
ObservationType - Type of observation
ParameterType - Type of parameters to infer
All Implemented Interfaces:
ImportanceSampling.Updater<ObservationType,ParameterType>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
ImportanceSampling<ObservationType,ParameterType>

public static class ImportanceSampling.DefaultUpdater<ObservationType,ParameterType>
extends AbstractCloneableSerializable
implements ImportanceSampling.Updater<ObservationType,ParameterType>

Default ImportanceSampling Updater that uses a BayesianParameter to compute the quantities of interest.

See Also:
Serialized Form

Field Summary
protected  BayesianParameter<ParameterType,? extends ProbabilityFunction<ObservationType>,? extends ProbabilityFunction<ParameterType>> conjuctive
          Defines the parameter that connects the conditional and prior distributions.
 
Constructor Summary
ImportanceSampling.DefaultUpdater()
          Default constructor.
ImportanceSampling.DefaultUpdater(BayesianParameter<ParameterType,? extends ProbabilityFunction<ObservationType>,? extends ProbabilityFunction<ParameterType>> conjuctive)
          Creates a new instance of DefaultUpdater
 
Method Summary
 double computeLogImportanceValue(ParameterType parameter)
          Computes the parameter's importance weight.
 double computeLogLikelihood(ParameterType parameter, Iterable<? extends ObservationType> data)
          Computes the log likelihood of the data given the parameter
 BayesianParameter<ParameterType,? extends ProbabilityFunction<ObservationType>,? extends ProbabilityFunction<ParameterType>> getConjuctive()
          Getter for conjunctive
 ParameterType makeProposal(Random random)
          Samples from the parameter prior
 void setConjuctive(BayesianParameter<ParameterType,? extends ProbabilityFunction<ObservationType>,? extends ProbabilityFunction<ParameterType>> conjuctive)
          Setter for conjunctive
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

conjuctive

protected BayesianParameter<ParameterType,? extends ProbabilityFunction<ObservationType>,? extends ProbabilityFunction<ParameterType>> conjuctive
Defines the parameter that connects the conditional and prior distributions.

Constructor Detail

ImportanceSampling.DefaultUpdater

public ImportanceSampling.DefaultUpdater()
Default constructor.


ImportanceSampling.DefaultUpdater

public ImportanceSampling.DefaultUpdater(BayesianParameter<ParameterType,? extends ProbabilityFunction<ObservationType>,? extends ProbabilityFunction<ParameterType>> conjuctive)
Creates a new instance of DefaultUpdater

Parameters:
conjuctive - Defines the parameter that connects the conditional and prior distributions.
Method Detail

computeLogLikelihood

public double computeLogLikelihood(ParameterType parameter,
                                   Iterable<? extends ObservationType> data)
Description copied from interface: ImportanceSampling.Updater
Computes the log likelihood of the data given the parameter

Specified by:
computeLogLikelihood in interface ImportanceSampling.Updater<ObservationType,ParameterType>
Parameters:
parameter - Parameter to consider
data - Data to consider
Returns:
log likelihood of the data given the parameter

computeLogImportanceValue

public double computeLogImportanceValue(ParameterType parameter)
Description copied from interface: ImportanceSampling.Updater
Computes the parameter's importance weight.

Specified by:
computeLogImportanceValue in interface ImportanceSampling.Updater<ObservationType,ParameterType>
Parameters:
parameter - Parameter to consider
Returns:
Importance value

makeProposal

public ParameterType makeProposal(Random random)
Description copied from interface: ImportanceSampling.Updater
Samples from the parameter prior

Specified by:
makeProposal in interface ImportanceSampling.Updater<ObservationType,ParameterType>
Parameters:
random - Random number generator.
Returns:
Location of the proposed sample

getConjuctive

public BayesianParameter<ParameterType,? extends ProbabilityFunction<ObservationType>,? extends ProbabilityFunction<ParameterType>> getConjuctive()
Getter for conjunctive

Returns:
Defines the parameter that connects the conditional and prior distributions.

setConjuctive

public void setConjuctive(BayesianParameter<ParameterType,? extends ProbabilityFunction<ObservationType>,? extends ProbabilityFunction<ParameterType>> conjuctive)
Setter for conjunctive

Parameters:
conjuctive - Defines the parameter that connects the conditional and prior distributions.