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 ReactiveMPA 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: meanOne 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
import BayesBase: mean as mean_from_bayes_basemean_from_reactivemp === mean_from_distributionstruemean_from_reactivemp === mean_from_bayes_basetrueEven though we import mean function from 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, BayesBase, ExponentialFamilymean(Normal(0.0, 1.0)) # `Normal` is an object from `Distributions.jl`0.0mean(NormalMeanVariance(0.0, 1.0)) # `NormalMeanVariance` is an object from `ReactiveMP.jl`0.0List 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.
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
@logscale
@marginalrule
@node
@rule
AND
AR
ARMeta
ARsafe
ARunsafe
AbstractApproximationMethod
AbstractFormConstraint
AbstractMessage
Adam
AdditiveCouplingLayer
AddonLogScale
AddonMemory
Autoregressive
AverageEnergy
BIFM
BIFMHelper
BIFMMeta
BinomialPolya
BinomialPolyaMeta
CTMeta
CTransition
CVI
CVIProjection
CVISamplingStrategy
CompanionMatrix
CompanionMatrixTransposed
CompiledFlowModel
CompositeFormConstraint
ConstVariable
ContinuousTransition
ContinuousTransitionMeta
DataVariable
DataVariableActivationOptions
DefaultFunctionalDependencies
DeferredMessage
DeltaFn
DeltaFnNode
DeltaMeta
Deterministic
DifferentialEntropy
DiscreteTransition
FactorBoundFreeEnergy
FactorNode
Flow
FlowMeta
FlowModel
FormConstraintCheckEach
FormConstraintCheckLast
FormConstraintCheckPickDefault
ForwardDiffGrad
FullSampling
GCV
GCVMetadata
GammaMixture
GammaMixtureNode
GaussHermiteCubature
GaussLaguerreQuadrature
GaussianMixture
GaussianMixtureNode
HalfNormal
IMPLY
ImportanceSamplingApproximation
InputArgumentsAnnotations
InputLayer
InverseWishart
LaplaceApproximation
Linearization
LogScaleAnnotations
Marginal
Marginalisation
MeanBased
Message
Mixture
MixtureNode
MomentMatching
MultinomialPolya
MultinomialPolyaMeta
MvNormalMeanScaleMatrixPrecision
MvNormalMeanScalePrecision
NOT
NodeFunctionRuleFallback
NormalMixture
NormalMixtureNode
OR
PermutationLayer
PermutationMatrix
PlanarFlow
Poisson
Probit
ProbitMeta
ProdCVI
ProductInputArgumentsRecord
RadialFlow
RandomVariable
RandomVariableActivationOptions
ReactiveMP
RequireEverythingFunctionalDependencies
RequireMarginalFunctionalDependencies
RequireMessageFunctionalDependencies
RuleInputArgumentsRecord
SoftDot
StandardBasisVector
Stochastic
UT
Uninformative
Unscented
UnscentedTransform
UnspecifiedFormConstraint
VariableBoundEntropy
approximation_name
approximation_short_name
as_marginal
as_message
compile
compose_Nks
constrain_form
constvar
datavar
default_form_check_strategy
default_prod_constraint
diageye
dot
factorisation
factornode
functional_dependencies
functionalform
get_rule_input_arguments
getannotations
getapproximation
getdata
getinterfaces
getlayers
getlogscale
getmodel
ghcubature
huge
is_clamped
is_initial
isdeterministic
isstochastic
laplace
localmarginalnames
localmarginals
logistic_stick_breaking
marginalrule
new_observation!
nr_params
randomvar
rule
score
sdtype
skipindex
softdot
srcubature
tiny
update!