Public Member Functions | Static Public Member Functions | List of all members
test_HybridFactorGraph.TestHybridGaussianFactorGraph Class Reference
Inheritance diagram for test_HybridFactorGraph.TestHybridGaussianFactorGraph:
Inheritance graph
[legend]

Public Member Functions

def estimate_marginals (cls, target, HybridBayesNet proposal_density, N=10000)
 
def test_create (self)
 
def test_evaluate (self)
 
def test_optimize (self)
 
def test_ratio (self)
 
def test_tiny (self)
 
- Public Member Functions inherited from gtsam.utils.test_case.GtsamTestCase
None assertEqualityOnPickleRoundtrip (self, object obj, tol=1e-9)
 
def gtsamAssertEquals (self, actual, expected, tol=1e-9)
 

Static Public Member Functions

def calculate_ratio (HybridBayesNet bayesNet, HybridGaussianFactorGraph fg, HybridValues sample)
 
gtsam.VectorValues measurements (HybridValues sample, indices)
 
HybridBayesNet tiny (int num_measurements=1, float prior_mean=5.0, float prior_sigma=0.5)
 

Detailed Description

Unit tests for HybridGaussianFactorGraph.

Definition at line 28 of file test_HybridFactorGraph.py.

Member Function Documentation

◆ calculate_ratio()

def test_HybridFactorGraph.TestHybridGaussianFactorGraph.calculate_ratio ( HybridBayesNet  bayesNet,
HybridGaussianFactorGraph  fg,
HybridValues  sample 
)
static
Calculate ratio between Bayes net and factor graph.

Definition at line 243 of file test_HybridFactorGraph.py.

◆ estimate_marginals()

def test_HybridFactorGraph.TestHybridGaussianFactorGraph.estimate_marginals (   cls,
  target,
HybridBayesNet  proposal_density,
  N = 10000 
)
Do importance sampling to estimate discrete marginal P(mode).

Definition at line 153 of file test_HybridFactorGraph.py.

◆ measurements()

gtsam.VectorValues test_HybridFactorGraph.TestHybridGaussianFactorGraph.measurements ( HybridValues  sample,
  indices 
)
static
Create measurements from a sample, grabbing Z(i) for indices.

Definition at line 145 of file test_HybridFactorGraph.py.

◆ test_create()

def test_HybridFactorGraph.TestHybridGaussianFactorGraph.test_create (   self)
Test construction of hybrid factor graph.

Definition at line 31 of file test_HybridFactorGraph.py.

◆ test_evaluate()

def test_HybridFactorGraph.TestHybridGaussianFactorGraph.test_evaluate (   self)
Test evaluate with two different prior noise models.

Definition at line 117 of file test_HybridFactorGraph.py.

◆ test_optimize()

def test_HybridFactorGraph.TestHybridGaussianFactorGraph.test_optimize (   self)
Test construction of hybrid factor graph.

Definition at line 56 of file test_HybridFactorGraph.py.

◆ test_ratio()

def test_HybridFactorGraph.TestHybridGaussianFactorGraph.test_ratio (   self)
Given a tiny two variable hybrid model, with 2 measurements, test the
ratio of the bayes net model representing P(z,x,n)=P(z|x, n)P(x)P(n)
and the factor graph P(x, n | z)=P(x | n, z)P(n|z),
both of which represent the same posterior.

Definition at line 249 of file test_HybridFactorGraph.py.

◆ test_tiny()

def test_HybridFactorGraph.TestHybridGaussianFactorGraph.test_tiny (   self)
Test a tiny two variable hybrid model.

Definition at line 172 of file test_HybridFactorGraph.py.

◆ tiny()

HybridBayesNet test_HybridFactorGraph.TestHybridGaussianFactorGraph.tiny ( int   num_measurements = 1,
float   prior_mean = 5.0,
float   prior_sigma = 0.5 
)
static
Create a tiny two variable hybrid model which represents
the generative probability P(Z, x0, mode) = P(Z|x0, mode)P(x0)P(mode).
num_measurements: number of measurements in Z = {z0, z1...}

Definition at line 79 of file test_HybridFactorGraph.py.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:53:19