A conditional of gaussian conditionals indexed by discrete variables, as part of a Bayes Network.
a density over continuous variables given discrete/continuous parents.
This is the result of the elimination of a continuous variable in a hybrid scheme, such that the remaining variables are discrete+continuous.
Represents the conditional density P(X | M, Z) where X is the set of continuous random variables, M is the selection of discrete variables corresponding to a subset of the Gaussian variables and Z is parent of this node .
The probability P(x|y,z,...) is proportional to \( \sum_i k_i \exp - \frac{1}{2} |R_i x - (d_i - S_i y - T_i z - ...)|^2 \) where i indexes the components and k_i is a component-wise normalization constant.
- Symbolic factors, used to represent a graph structure, implemented in
|
|
| HybridGaussianConditional ()=default |
| | Default constructor, mainly for serialization.
|
| | HybridGaussianConditional (const DiscreteKey &discreteParent, const std::vector< GaussianConditional::shared_ptr > &conditionals) |
| | Construct from one discrete key and vector of conditionals.
|
| | HybridGaussianConditional (const DiscreteKey &discreteParent, Key key, const std::vector< std::pair< Vector, double > > ¶meters) |
| | Constructs a HybridGaussianConditional with means mu_i and standard deviations sigma_i.
|
| | HybridGaussianConditional (const DiscreteKey &discreteParent, Key key, const Matrix &A, Key parent, const std::vector< std::pair< Vector, double > > ¶meters) |
| | Constructs a HybridGaussianConditional with conditional means A × parent + b_i and standard deviations sigma_i.
|
| | HybridGaussianConditional (const DiscreteKey &discreteParent, Key key, const Matrix &A1, Key parent1, const Matrix &A2, Key parent2, const std::vector< std::pair< Vector, double > > ¶meters) |
| | Constructs a HybridGaussianConditional with conditional means A1 × parent1 + A2 × parent2 + b_i and standard deviations sigma_i.
|
| | HybridGaussianConditional (const DiscreteKeys &discreteParents, const Conditionals &conditionals) |
| | Construct from multiple discrete keys and conditional tree.
|
| | HybridGaussianConditional (const DiscreteKeys &discreteParents, const FactorValuePairs &pairs, bool pruned=false) |
| | Construct from multiple discrete keys M and a tree of factor/scalar pairs, where the scalar is assumed to be the the negative log constant for each assignment m, up to a constant.
|
| bool | equals (const HybridFactor &lf, double tol=1e-9) const override |
| | Test equality with base HybridFactor.
|
| void | print (const std::string &s="HybridGaussianConditional\n", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| | Print utility.
|
|
GaussianConditional::shared_ptr | choose (const DiscreteValues &discreteValues) const |
| | Return the conditional Gaussian for the given discrete assignment.
|
|
GaussianConditional::shared_ptr | operator() (const DiscreteValues &discreteValues) const |
| | Syntactic sugar for choose.
|
|
size_t | nrComponents () const |
| | Returns the total number of continuous components.
|
|
KeyVector | continuousParents () const |
| | Returns the continuous keys among the parents.
|
| double | negLogConstant () const override |
| | Return log normalization constant in negative log space.
|
|
std::shared_ptr< HybridGaussianFactor > | likelihood (const VectorValues &given) const |
| | Create a likelihood factor for a hybrid Gaussian conditional, return a hybrid Gaussian factor on the parents.
|
| const Conditionals | conditionals () const |
| | Get Conditionals DecisionTree (dynamic cast from factors).
|
| double | logProbability (const HybridValues &values) const override |
| | Compute the logProbability of this hybrid Gaussian conditional.
|
| double | evaluate (const HybridValues &values) const override |
| | Calculate probability density for given values.
|
|
double | operator() (const HybridValues &values) const |
| | Evaluate probability density, sugar.
|
| HybridGaussianConditional::shared_ptr | prune (const DiscreteConditional &discreteProbs) const |
| | Prune the decision tree of Gaussian factors as per the discrete discreteProbs.
|
|
bool | pruned () const |
| | Return true if the conditional has already been pruned.
|
| std::shared_ptr< Factor > | restrict (const DiscreteValues &discreteValues) const override |
| | Restrict to the given discrete values.
|
|
| HybridGaussianFactor ()=default |
| | Default constructor, mainly for serialization.
|
| | HybridGaussianFactor (const DiscreteKey &discreteKey, const std::vector< GaussianFactor::shared_ptr > &factors) |
| | Construct a new HybridGaussianFactor on a single discrete key, providing the factors for each mode m as a vector of factors ϕ_m(x).
|
| | HybridGaussianFactor (const DiscreteKey &discreteKey, const std::vector< GaussianFactorValuePair > &factorPairs) |
| | Construct a new HybridGaussianFactor on a single discrete key, including a scalar error value for each mode m.
|
| | HybridGaussianFactor (const DiscreteKeys &discreteKeys, const FactorValuePairs &factorPairs) |
| | Construct a new HybridGaussianFactor on a several discrete keys M, including a scalar error value for each assignment m.
|
| bool | equals (const HybridFactor &lf, double tol=1e-9) const override |
| | equals
|
| void | print (const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override |
| | print
|
|
GaussianFactorValuePair | operator() (const DiscreteValues &assignment) const |
| | Get factor at a given discrete assignment.
|
| AlgebraicDecisionTree< Key > | errorTree (const VectorValues &continuousValues) const override |
| | Compute error of the HybridGaussianFactor as a tree.
|
| double | error (const HybridValues &hybridValues) const override |
| | Compute the log-likelihood, including the log-normalizing constant.
|
|
const FactorValuePairs & | factors () const |
| | Getter for GaussianFactor decision tree.
|
| virtual HybridGaussianProductFactor | asProductFactor () const |
| | Helper function to return factors and functional to create a DecisionTree of Gaussian Factor Graphs.
|
| std::shared_ptr< Factor > | restrict (const DiscreteValues &discreteValues) const override |
| | Restrict the factor to the given discrete values.
|
|
| HybridFactor ()=default |
| | Default constructor creates empty factor.
|
| | HybridFactor (const KeyVector &keys) |
| | Construct hybrid factor from continuous keys.
|
| | HybridFactor (const DiscreteKeys &discreteKeys) |
| | Construct hybrid factor from discrete keys.
|
| | HybridFactor (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys) |
| | Construct a new Hybrid Factor object.
|
|
bool | isDiscrete () const |
| | True if this is a factor of discrete variables only.
|
|
bool | isContinuous () const |
| | True if this is a factor of continuous variables only.
|
|
bool | isHybrid () const |
| | True is this is a Discrete-Continuous factor.
|
|
size_t | nrContinuous () const |
| | Return the number of continuous variables in this factor.
|
|
const DiscreteKeys & | discreteKeys () const |
| | Return the discrete keys for this factor.
|
|
const KeyVector & | continuousKeys () const |
| | Return only the continuous keys for this factor.
|
|
virtual | ~Factor ()=default |
| | Default destructor.
|
|
bool | empty () const |
| | Whether the factor is empty (involves zero variables).
|
|
Key | front () const |
| | First key.
|
|
Key | back () const |
| | Last key.
|
|
const_iterator | find (Key key) const |
| | find
|
|
const KeyVector & | keys () const |
| | Access the factor's involved variable keys.
|
|
const_iterator | begin () const |
| | Iterator at beginning of involved variable keys.
|
|
const_iterator | end () const |
| | Iterator at end of involved variable keys.
|
| size_t | size () const |
| virtual void | printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| | print only keys
|
|
bool | equals (const This &other, double tol=1e-9) const |
| | check equality
|
| KeyVector & | keys () |
|
iterator | begin () |
| | Iterator at beginning of involved variable keys.
|
|
iterator | end () |
| | Iterator at end of involved variable keys.
|
|
void | print (const std::string &s="Conditional", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| | print with optional formatter
|
|
bool | equals (const This &c, double tol=1e-9) const |
| | check equality
|
|
size_t | nrFrontals () const |
| | return the number of frontals
|
|
size_t | nrParents () const |
| | return the number of parents
|
|
Key | firstFrontalKey () const |
| | Convenience function to get the first frontal key.
|
|
Frontals | frontals () const |
| | return a view of the frontal keys
|
|
Parents | parents () const |
| | return a view of the parent keys
|
|
double | operator() (const HybridValues &x) const |
| | Evaluate probability density, sugar.
|
|
HybridGaussianFactor::const_iterator | beginFrontals () const |
| | Iterator pointing to first frontal key.
|
|
HybridGaussianFactor::const_iterator | endFrontals () const |
| | Iterator pointing past the last frontal key.
|
|
HybridGaussianFactor::const_iterator | beginParents () const |
| | Iterator pointing to the first parent key.
|
|
HybridGaussianFactor::const_iterator | endParents () const |
| | Iterator pointing past the last parent key.
|