edu.washington.cs.supple.render.utility
Class BayesianSolver

java.lang.Object
  extended byedu.washington.cs.supple.render.utility.BayesianSolver
All Implemented Interfaces:
FactoredCostSolver

public class BayesianSolver
extends java.lang.Object
implements FactoredCostSolver

Author:
kgajos

Field Summary
protected  Matrix covInverse
           
protected  int d
           
protected  double multiplier
           
protected  int numSamples
           
static double stepSize
           
 
Constructor Summary
BayesianSolver()
           
 
Method Summary
protected  double calculateAverageError(FactoredCostFunctionState state, double mean)
           
protected  void ensureCommonData(FactoredCostFunctionState priorState)
           
protected  double getDensity(FactoredCostFunctionState priorState, FactoredCostFunctionState curState, java.util.Vector constraints)
           
protected  double getLikelihood(FactoredCostFunctionState state, java.util.Vector constraints)
           
protected  double getPriorDensity(FactoredCostFunctionState priorState, FactoredCostFunctionState curState)
           
static void main(java.lang.String[] args)
           
protected  void singleSample(FactoredCostFunctionState priorState, FactoredCostFunctionState curState, java.util.Vector constraints)
           
protected  void solve(FactoredCostFunctionState priorState, FactoredCostFunctionState curState, java.util.Vector constraints)
           
protected  FactoredCostFunctionState test(int numStates, int numSamples, double mean, double stdev, java.util.Vector constraints)
           
protected  void testAccuracy()
           
protected  void testDistribution(java.lang.String outputFileName)
           
 void updateCostFunctionWeights(FactoredCostFunction cf, FactoredCostConstraintGenerator constraintGenerator)
           
 void updateCostFunctionWeights(FactoredCostFunction cf, FactoredCostConstraintGenerator constraintGenerator, FactoredCostFunctionState prior)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stepSize

public static final double stepSize
See Also:
Constant Field Values

numSamples

protected int numSamples

multiplier

protected double multiplier

covInverse

protected Matrix covInverse

d

protected int d
Constructor Detail

BayesianSolver

public BayesianSolver()
Method Detail

updateCostFunctionWeights

public void updateCostFunctionWeights(FactoredCostFunction cf,
                                      FactoredCostConstraintGenerator constraintGenerator)
Specified by:
updateCostFunctionWeights in interface FactoredCostSolver

updateCostFunctionWeights

public void updateCostFunctionWeights(FactoredCostFunction cf,
                                      FactoredCostConstraintGenerator constraintGenerator,
                                      FactoredCostFunctionState prior)
Specified by:
updateCostFunctionWeights in interface FactoredCostSolver

solve

protected void solve(FactoredCostFunctionState priorState,
                     FactoredCostFunctionState curState,
                     java.util.Vector constraints)

singleSample

protected void singleSample(FactoredCostFunctionState priorState,
                            FactoredCostFunctionState curState,
                            java.util.Vector constraints)

getDensity

protected double getDensity(FactoredCostFunctionState priorState,
                            FactoredCostFunctionState curState,
                            java.util.Vector constraints)

getLikelihood

protected double getLikelihood(FactoredCostFunctionState state,
                               java.util.Vector constraints)

ensureCommonData

protected void ensureCommonData(FactoredCostFunctionState priorState)

getPriorDensity

protected double getPriorDensity(FactoredCostFunctionState priorState,
                                 FactoredCostFunctionState curState)

test

protected FactoredCostFunctionState test(int numStates,
                                         int numSamples,
                                         double mean,
                                         double stdev,
                                         java.util.Vector constraints)

calculateAverageError

protected double calculateAverageError(FactoredCostFunctionState state,
                                       double mean)

testAccuracy

protected void testAccuracy()

testDistribution

protected void testDistribution(java.lang.String outputFileName)

main

public static void main(java.lang.String[] args)