Commit 4d0695ed by Gaspard Ducamp

[PyAGrum/doc] Bayesian networks doc completed

parent 99eef22f
Pipeline #13619282 passed with stage
in 4 minutes 54 seconds
......@@ -563,9 +563,10 @@ Warnings
%feature("docstring") gum::BayesNet::ids
"
Warnings
--------
A Faire
Returns
-------
list :
The lisf variables ids.
"
%feature("docstring") gum::BayesNet::loadBIF
......@@ -686,30 +687,46 @@ FatalError raised if file is not valid
%feature("docstring") gum::BayesNet::minimalCondSet
"
Warnings
--------
A Faire
"
Returns, given one or many targets and a list of variables, the minimal set of those needed to calculate the target/targets.
%feature("docstring") gum::BayesNet::moralGraph
"
Warnings
--------
A Faire
Parameters
----------
target : int
The id of the target
targets : list
The ids of the targets
list : list
The list of available variables
Returns
-------
Set
The minimal set of variables
"
%feature("docstring") gum::BayesNet::names
"
Warnings
--------
A Faire
Returns
-------
list
The names of the BayesNet variables
"
%feature("docstring") gum::BayesNet::nodeId
"
Parameters
----------
var : pyAgrum.DiscreteVariable
a variable
Returns
-------
int
the id of the variable
Warnings
--------
A Faire
IndexError raised if the BayesNet does not contain the variable
"
%feature("docstring") gum::BayesNet::parents
......@@ -727,9 +744,24 @@ Set
%feature("docstring") gum::BayesNet::reverseArc
"
Reverses an arc while preserving the same joint distribution.
Parameters
----------
tail
(int) the id of the tail variable
head
(int) the id of the head variable
tail
(str) the name of the tail variable
head
(str) the name of the head variable
arc : pyAgrum.Arc
an arc
Warnings
--------
A Faire
InvalidArc raised if the arc does not exsit or if its reversal would induce a directed cycle.
"
%feature("docstring") gum::BayesNet::saveBIF
......@@ -798,16 +830,38 @@ name : str
%feature("docstring") gum::BayesNet::variable
"
Parameters
----------
id : int
a variable's id
name : str
a variable's name
Returns
-------
pyAgrum.DiscreteVariable
the variable
Warnings
--------
A Faire
IndexError if the BayesNet does not contain the variable
"
%feature("docstring") gum::BayesNet::variableFromName
"
Parameters
----------
name : str
a variable's name
Returns
-------
pyAgrum.DiscreteVariable
the variable
Warnings
--------
A Faire
IndexError if the BayesNet does not contain the variable
"
%feature("docstring") gum::BayesNet::variableNodeMap
......
%ignore gum::DAGmodel::property;
%ignore gum::DAGmodel::propertyWithDefault;
%ignore gum::DAGmodel::setProperty;
%feature("docstring") gum::DAGmodel::log10DomainSize
"
in DAGmodel
Warnings
--------
A Faire
Returns
-------
double
The log10 domain size of the joint probability for the model.
"
%feature("docstring") gum::DAGmodel::completeInstantiation
"
in DAGmodel
Get an instantiation over all the variables of the model.
Warnings
--------
A Faire
Parameters
----------
i : pyAgrum.instantiation
the instantiation to complete
"
%feature("docstring") gum::DAGmodel::dag
"
in DAGmodel
Warnings
--------
A Faire
Returns
-------
pyAgrum.DAG
a constant reference to the dag of this BayesNet.
"
%feature("docstring") gum::DAGmodel::empty
"
in DAGmodel
Warnings
--------
A Faire
Returns
-------
bool
True if the model is empty
"
%feature("docstring") gum::DAGmodel::hasSameStructure
"
in DAGmodel
Parameters
----------
pyAgrum.DAGmodel
a direct acyclic model
Warnings
--------
A Faire
Returns
-------
bool
True if all the named node are the same and all the named arcs are the same
"
%feature("docstring") gum::DAGmodel::property
"
in DAGmodel
Warnings
--------
A Faire
N'est plus référencée
"
%feature("docstring") gum::DAGmodel::propertyWithDefault
"
in DAGmodel
Warnings
--------
A Faire
N'est plus référencée
"
%feature("docstring") gum::DAGmodel::setProperty
"
in DAGmodel
Warnings
--------
A Faire
N'est plus référencée
"
%feature("docstring") gum::DAGmodel::size
......@@ -96,4 +96,14 @@ List
Warnings
--------
InvalidDirectedCycle raised if this graph contains cycles
"
%feature("docstring") gum::DAGmodel::moralGraph
"
Returns the moral graph of the BayesNet, formed by adding edges between all pairs of nodes that have a common child, and then making all edges in the graph undirected.
Returns
-------
pyAgrum.UndiGraph
The moral graph
"
\ No newline at end of file
%feature("docstring") gum::IBayesNet::dim
"
Returns the dimension (the number of free parameters) in this bayes net.
Returns the dimension (the number of free parameters) in this BayesNet.
dim(G)=∑i∈nodes((ri−1)⋅qi) where ri is the number of instantiations of node i and qi is the number of instantiations of its parents.
in IBayesNet
in IBayesNet
Warnings
--------
A Faire
Returns
-------
int
the dimension of the BayesNet
"
%feature("docstring") gum::IBayesNet::jointProbability
"
in IBayesNet
Parameters
----------
i : pyAgrum.instantiation
an instantiation of the variables
Returns
-------
double
a parameter of the joint probability for the BayesNet
Warnings
--------
A Faire
a variable not present in the instantiation is assumed to be instantiated to 0
"
%feature("docstring") gum::IBayesNet::log2JointProbability
"
in IBayesNet
Parameters
----------
i : pyAgrum.instantiation
an instantiation of the variables
Returns
-------
double
a parameter of the log joint probability for the BayesNet
Warnings
--------
A Faire
a variable not present in the instantiation is assumed to be instantiated to 0
"
%feature("docstring") gum::IBayesNet::maxNonOneParam
"
in IBayesNet
Warnings
--------
A Faire
Returns
-------
double
The biggest value (not equal to 1) in the CPTs of the BayesNet
"
%feature("docstring") gum::IBayesNet::maxParam
"
in IBayesNet
Warnings
--------
A Faire
Returns
-------
double
the biggest value in the CPTs of the BayesNet
"
%feature("docstring") gum::IBayesNet::maxVarDomainSize
"
in IBayesNet
Warnings
--------
A Faire
Returns
-------
int
the biggest domain size among the variables of the BayesNet
"
%feature("docstring") gum::IBayesNet::minNonZeroParam
"
in IBayesNet
Warnings
--------
A Faire
Returns
-------
double
the smallest value (not equal to 0) in the CPTs of the BayesNet
"
%feature("docstring") gum::IBayesNet::minParam
"
in IBayesNet
Warnings
--------
A Faire
Returns
-------
double
the smallest value in the CPTs of the BayesNet
"
%feature("docstring") gum::IBayesNet::toDot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment