Skip to content

Contradiction about deterministic factor nodes? #437

@kobus78

Description

@kobus78

Referring to the page: https://docs.rxinfer.ml/stable/manuals/model-specification/

Statement 1:

Note:
The RxInfer.jl package uses the ~ operator for modelling both stochastic and deterministic relationships between random variables. However, GraphPPL.jl also allows to use := operator for deterministic relationships.

Statement 2:

In contrast to other probabilistic programming languages in Julia, RxInfer does not allow use of = operator for creating deterministic relationships between (latent)variables. Instead, we can use := operator for this purpose. For example:

t ~ Normal(mean = 0.0, variance = 1.0)
x := exp(t) # x is linked deterministically to t
y ~ Normal(mean = x, variance = 1.0)

Questions:

What is the best practice when defining deterministic factor nodes? It seems wrong to use = (but I have used code in the past that worked when I used =). Is the best practice to use := or ~ as well? It seems to me that one wants to make it real obvious when we have a deterministic factor node. Why not enforce the use of := ?

Thanks for helping.
Kobus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions