Using methods from ReactiveMP

In the Julia programming language (in contrast to Python for example) the most common way of loading a module is:

using ReactiveMP

A nice explanation about how modules/packages work in Julia can be found in the official documentation.

In a nutshell, Julia automatically resolves all name collisions and there is no a lot of benefit of importing specific names, e.g.:

import ReactiveMP: mean

One of the reasons for that is that Julia uses multiple-dispatch capabilities to merge names automatically and will indicate (with a warning) if something went wrong or names have unresolvable collisions on types. As a small example of this feature consider the following small import example:

import ReactiveMP: mean as mean_from_reactivemp
import Distributions: mean as mean_from_distributions

mean_from_reactivemp === mean_from_distributions
true

Even though we import mean function from two different packages they actually refer to the same object. Worth noting that this is not always the case - Julia will print a warning in case it finds unresolvable conflicts and usage of such functions will be disallowed unless user import them specifically. Read more about this in the section of the Julia's documentation.

# It is easier to let Julia resolve names automatically
# Julia will not overwrite `mean` that is coming from both packages
using ReactiveMP, Distributions
mean(Normal(0.0, 1.0)) # `Normal` is an object from `Distributions.jl`
0.0
mean(NormalMeanVariance(0.0, 1.0)) # `NormalMeanVariance` is an object from `ReactiveMP.jl`
0.0

List of available methods

Below you can find a list of exported methods from ReactiveMP.jl. All methods (even private) can be always accessed with ReactiveMP. prefix, e.g ReactiveMP.mean.

Note

Some exported names are (for legacy reasons) intended for private usage only. As a result some of these methods do not have a proper associated documentation with them. We constantly improve ReactiveMP.jl library and continue to add better documentation for many exported methods, but a small portion of these methods could be removed from this list in the future.

foreach(println, names(ReactiveMP))
@average_energy
@call_marginalrule
@call_rule
@marginalrule
@node
@rule
@symmetrical
AND
AR
ARMeta
ARsafe
ARunsafe
AbstractApproximationMethod
AbstractFormConstraint
AbstractMessage
AbstractPipelineStage
AbstractVariable
Adam
AdditiveCouplingLayer
AsyncPipelineStage
Autoregressive
AverageEnergy
BIFM
BIFMHelper
BIFMMeta
Bernoulli
BernoulliNaturalParameters
Beta
CVI
CVIApproximation
Categorical
ClampEigenValuesCorrection
CompanionMatrix
CompanionMatrixTransposed
CompiledFlowModel
CompositeFormConstraint
CompositePipelineStage
ConstVariable
ConstraintsSpecification
Contingency
ContinuousMultivariateLogPdf
ContinuousUnivariateLogPdf
CustomProdStrategy
DataVariable
DefaultConstraints
DefaultMeta
DeltaFn
DeltaFnNode
DeltaMeta
Deterministic
DifferentialEntropy
Dirichlet
DiscontinuePipelineStage
DistProduct
EmptyPipelineStage
ExponentialLinearQuadratic
FactorBoundFreeEnergy
FactorNodeCreationOptions
FactorNodesCollection
FixedCorrection
Flow
FlowMeta
FlowModel
FoldLeftProdStrategy
FoldRightProdStrategy
FormConstraintCheckEach
FormConstraintCheckLast
FormConstraintCheckPickDefault
FullFactorisation
GCV
GCVMetadata
Gamma
GammaDistributionsFamily
GammaInverse
GammaMixture
GammaMixtureNode
GammaNaturalParameters
GammaShapeRate
GammaShapeScale
GaussHermiteCubature
GaussLaguerreQuadrature
GaussianDistributionsFamily
GaussianMeanPrecision
GaussianMeanVariance
GaussianMixture
GaussianMixtureNode
GaussianWeighteMeanPrecision
GenericLogPdfVectorisedProduct
IMPLY
ImportanceSamplingApproximation
IncludeAll
InputLayer
InverseWishart
JointGaussian
JointNormal
KernelGCV
KernelGCVMetadata
LaplaceApproximation
Linearization
LoggerPipelineStage
Marginal
Marginalisation
MatrixDirichlet
MeanField
Message
MetaSpecification
MomentMatching
MultivariateGaussianDistributionsFamily
MultivariateNormalDistributionsFamily
MultivariateNormalNaturalParameters
MvGaussianMeanCovariance
MvGaussianMeanPrecision
MvGaussianWeightedMeanPrecision
MvNormalMeanCovariance
MvNormalMeanPrecision
MvNormalMeanScalePrecision
MvNormalWeightedMeanPrecision
NOT
NaturalParameters
NoCorrection
NormalDistributionsFamily
NormalMeanPrecision
NormalMeanVariance
NormalMixture
NormalMixtureNode
NormalWeightedMeanPrecision
OR
PermutationLayer
PermutationMatrix
PlanarFlow
PointMass
Poisson
Probit
ProbitMeta
ProdAnalytical
ProdAnalyticalRuleAvailable
ProdAnalyticalRuleUnknown
ProdFinal
ProdGeneric
ProdPreserveType
ProdPreserveTypeLeft
ProdPreserveTypeRight
RadialFlow
RandomVariable
RandomVariableCreationOptions
ReactiveMP
SampleList
SampleListMeta
SkipClamped
SkipClampedAndInitial
SkipInitial
StandardBasisVector
Stochastic
TinyCorrection
Transition
UT
Uniform
Uninformative
UnivariateGaussianDistributionsFamily
UnivariateNormalDistributionsFamily
UnivariateNormalNaturalParameters
Unscented
UnscentedTransform
UnspecifiedConstraints
UnspecifiedFormConstraint
UnspecifiedMeta
VariableBoundEntropy
VariablesCollection
VariationalMessage
Wishart
apply_pipeline_stage
approximation_name
approximation_short_name
as_marginal
as_message
as_naturalparams
as_variable
cholinv
cholsqrt
compile
constrain_form
constvar
convert_eltype
cov
datavar
default_form_check_strategy
default_prod_constraint
degree
diageye
dot
entropy
factorisation
functional_dependencies
functionalform
getapproximation
getconst
getconstant
getdata
getlayers
getmarginal
getmarginals
getmodel
getnode_ids
getnodes
getpointmass
getrandom
getvardict
ghcubature
hasconstvar
hasdatavar
hasrandomvar
huge
interfaces
invcov
is_clamped
is_initial
is_marginalisation
is_moment_matching
is_point_mass_form_constraint
isconnected
isdeterministic
isproper
isstochastic
laplace
localmarginalnames
localmarginals
logdetcov
lognormalizer
logpdf
make_form_constraint
make_node
marginalrule
mean
mean_cov
mean_invcov
mean_precision
mean_std
mean_var
median
metadata
mode
multiply_messages
name
naturalparams
nr_params
pdf
probvec
prod_analytical_rule
promote_variate_type
randomvar
rate
resolve_prod_constraint
rule
scale
score
sdtype
setmarginal!
setmarginals!
setmessage!
setmessages!
shape
skipindex
srcubature
std
tiny
update!
vague
value_support
var
variate_form
weightedmean
weightedmean_cov
weightedmean_invcov
weightedmean_precision
weightedmean_std
weightedmean_var