![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
The miic learning algorithm. More...
#include <Miic.h>
Public Attributes | |
Signaler3< Size, double, double > | onProgress |
Progression, error and time. More... | |
Signaler1< std::string > | onStop |
Criteria messageApproximationScheme. More... | |
Public Member Functions | |
Miic & | operator= (const Miic &from) |
copy operator More... | |
Miic & | operator= (Miic &&from) |
move operator More... | |
Constructors / Destructors | |
Miic () | |
default constructor More... | |
Miic (int maxLog) | |
default constructor with maxLog More... | |
Miic (const Miic &from) | |
copy constructor More... | |
Miic (Miic &&from) | |
move constructor More... | |
~Miic () override | |
destructor More... | |
Accessors / Modifiers | |
MixedGraph | learnMixedStructure (CorrectedMutualInformation<> &mutualInformation, MixedGraph graph) |
learns the structure of an Essential Graph More... | |
DAG | learnStructure (CorrectedMutualInformation<> &I, MixedGraph graph) |
learns the structure of a Bayesian network, i.e. a DAG, by first learning an Essential graph and then directing the remaining edges. More... | |
template<typename GUM_SCALAR = double, typename GRAPH_CHANGES_SELECTOR , typename PARAM_ESTIMATOR > | |
BayesNet< GUM_SCALAR > | learnBN (GRAPH_CHANGES_SELECTOR &selector, PARAM_ESTIMATOR &estimator, DAG initial_dag=DAG()) |
learns the structure and the parameters of a BN More... | |
const std::vector< Arc > | latentVariables () const |
get the list of arcs hiding latent variables More... | |
void | setMiicBehaviour () |
Sets the orientation phase to follow the one of the MIIC algorithm. More... | |
void | set3of2Behaviour () |
Sets the orientation phase to follow the one of the 3off2 algorithm. More... | |
void | addConstraints (HashTable< std::pair< NodeId, NodeId >, char > constraints) |
Set a ensemble of constraints for the orientation phase. More... | |
Getters and setters | |
void | setEpsilon (double eps) |
Given that we approximate f(t), stopping criterion on |f(t+1)-f(t)|. More... | |
double | epsilon () const |
Returns the value of epsilon. More... | |
void | disableEpsilon () |
Disable stopping criterion on epsilon. More... | |
void | enableEpsilon () |
Enable stopping criterion on epsilon. More... | |
bool | isEnabledEpsilon () const |
Returns true if stopping criterion on epsilon is enabled, false otherwise. More... | |
void | setMinEpsilonRate (double rate) |
Given that we approximate f(t), stopping criterion on d/dt(|f(t+1)-f(t)|). More... | |
double | minEpsilonRate () const |
Returns the value of the minimal epsilon rate. More... | |
void | disableMinEpsilonRate () |
Disable stopping criterion on epsilon rate. More... | |
void | enableMinEpsilonRate () |
Enable stopping criterion on epsilon rate. More... | |
bool | isEnabledMinEpsilonRate () const |
Returns true if stopping criterion on epsilon rate is enabled, false otherwise. More... | |
void | setMaxIter (Size max) |
Stopping criterion on number of iterations. More... | |
Size | maxIter () const |
Returns the criterion on number of iterations. More... | |
void | disableMaxIter () |
Disable stopping criterion on max iterations. More... | |
void | enableMaxIter () |
Enable stopping criterion on max iterations. More... | |
bool | isEnabledMaxIter () const |
Returns true if stopping criterion on max iterations is enabled, false otherwise. More... | |
void | setMaxTime (double timeout) |
Stopping criterion on timeout. More... | |
double | maxTime () const |
Returns the timeout (in seconds). More... | |
double | currentTime () const |
Returns the current running time in second. More... | |
void | disableMaxTime () |
Disable stopping criterion on timeout. More... | |
void | enableMaxTime () |
Enable stopping criterion on timeout. More... | |
bool | isEnabledMaxTime () const |
Returns true if stopping criterion on timeout is enabled, false otherwise. More... | |
void | setPeriodSize (Size p) |
How many samples between two stopping is enable. More... | |
Size | periodSize () const |
Returns the period size. More... | |
void | setVerbosity (bool v) |
Set the verbosity on (true) or off (false). More... | |
bool | verbosity () const |
Returns true if verbosity is enabled. More... | |
ApproximationSchemeSTATE | stateApproximationScheme () const |
Returns the approximation scheme state. More... | |
Size | nbrIterations () const |
Returns the number of iterations. More... | |
const std::vector< double > & | history () const |
Returns the scheme history. More... | |
void | initApproximationScheme () |
Initialise the scheme. More... | |
bool | startOfPeriod () |
Returns true if we are at the beginning of a period (compute error is mandatory). More... | |
void | updateApproximationScheme (unsigned int incr=1) |
Update the scheme w.r.t the new error and increment steps. More... | |
Size | remainingBurnIn () |
Returns the remaining burn in. More... | |
void | stopApproximationScheme () |
Stop the approximation scheme. More... | |
bool | continueApproximationScheme (double error) |
Update the scheme w.r.t the new error. More... | |
Getters and setters | |
std::string | messageApproximationScheme () const |
Returns the approximation scheme message. More... | |
Public Types | |
enum | ApproximationSchemeSTATE : char { ApproximationSchemeSTATE::Undefined, ApproximationSchemeSTATE::Continue, ApproximationSchemeSTATE::Epsilon, ApproximationSchemeSTATE::Rate, ApproximationSchemeSTATE::Limit, ApproximationSchemeSTATE::TimeLimit, ApproximationSchemeSTATE::Stopped } |
The different state of an approximation scheme. More... | |
Protected Attributes | |
double | current_epsilon_ |
Current epsilon. More... | |
double | last_epsilon_ |
Last epsilon value. More... | |
double | current_rate_ |
Current rate. More... | |
Size | current_step_ |
The current step. More... | |
Timer | timer_ |
The timer. More... | |
ApproximationSchemeSTATE | current_state_ |
The current state. More... | |
std::vector< double > | history_ |
The scheme history, used only if verbosity == true. More... | |
double | eps_ |
Threshold for convergence. More... | |
bool | enabled_eps_ |
If true, the threshold convergence is enabled. More... | |
double | min_rate_eps_ |
Threshold for the epsilon rate. More... | |
bool | enabled_min_rate_eps_ |
If true, the minimal threshold for epsilon rate is enabled. More... | |
double | max_time_ |
The timeout. More... | |
bool | enabled_max_time_ |
If true, the timeout is enabled. More... | |
Size | max_iter_ |
The maximum iterations. More... | |
bool | enabled_max_iter_ |
If true, the maximum iterations stopping criterion is enabled. More... | |
Size | burn_in_ |
Number of iterations before checking stopping criteria. More... | |
Size | period_size_ |
Checking criteria frequency. More... | |
bool | verbosity_ |
If true, verbosity is enabled. More... | |
Protected Member Functions | |
void | findBestContributor_ (NodeId x, NodeId y, const std::vector< NodeId > &ui, const MixedGraph &graph, CorrectedMutualInformation<> &mutualInformation, Heap< CondRanking, GreaterPairOn2nd > &rank) |
finds the best contributor node for a pair given a conditioning set More... | |
std::vector< Ranking > | unshieldedTriples_ (const MixedGraph &graph, CorrectedMutualInformation<> &mutualInformation, const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet) |
gets the list of unshielded triples in the graph in decreasing value of |I'(x, y, z|{ui})| More... | |
std::vector< ProbabilisticRanking > | unshieldedTriplesMiic_ (const MixedGraph &graph, CorrectedMutualInformation<> &mutualInformation, const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet, HashTable< std::pair< NodeId, NodeId >, char > &marks) |
gets the list of unshielded triples in the graph in decreasing value of |I'(x, y, z|{ui})|, prepares the orientation matrix for MIIC More... | |
std::vector< ProbabilisticRanking > | updateProbaTriples_ (const MixedGraph &graph, std::vector< ProbabilisticRanking > probaTriples) |
Gets the orientation probabilities like MIIC for the orientation phase. More... | |
bool | propagatesRemainingOrientableEdges_ (MixedGraph &graph, NodeId xj) |
Propagates the orientation from a node to its neighbours. More... | |
void | propagatesOrientationInChainOfRemainingEdges_ (MixedGraph &graph) |
heuristic for remaining edges when everything else has been tried More... | |
bool | isForbidenArc_ (NodeId x, NodeId y) const |
bool | isOrientable_ (const MixedGraph &graph, NodeId xi, NodeId xj) const |
Main phases | |
void | initiation_ (CorrectedMutualInformation<> &mutualInformation, MixedGraph &graph, HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet, Heap< CondRanking, GreaterPairOn2nd > &rank) |
Initiation phase. More... | |
void | iteration_ (CorrectedMutualInformation<> &mutualInformation, MixedGraph &graph, HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet, Heap< CondRanking, GreaterPairOn2nd > &rank) |
Iteration phase. More... | |
void | orientation3off2_ (CorrectedMutualInformation<> &mutualInformation, MixedGraph &graph, const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet) |
Orientation phase from the 3off2 algorithm, returns a CPDAG. More... | |
void | orientationLatents_ (CorrectedMutualInformation<> &mutualInformation, MixedGraph &graph, const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet) |
Modified version of the orientation phase that tries to propagate orientations from both orientations in case of a bidirected arc, not used. More... | |
void | orientationMiic_ (CorrectedMutualInformation<> &mutualInformation, MixedGraph &graph, const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet) |
Orientation phase from the MIIC algorithm, returns a mixed graph that may contain circles. More... | |
The miic learning algorithm.
The miic class implements the miic algorithm based on https://doi.org/10.1371/journal.pcbi.1005662. It starts by eliminating edges that correspond to independent variables to build the skeleton of the graph, and then directs the remaining edges to get an essential graph. Latent variables can be detected using bi-directed arcs.
The variant 3off2 is also implemented as proposed by Affeldt and al. in https://doi.org/10.1186/s12859-015-0856-x. Only the orientation phase differs from miic, with a different ranking method and different propagation rules.
|
stronginherited |
The different state of an approximation scheme.
Enumerator | |
---|---|
Undefined | |
Continue | |
Epsilon | |
Rate | |
Limit | |
TimeLimit | |
Stopped |
Definition at line 64 of file IApproximationSchemeConfiguration.h.
gum::learning::Miic::Miic | ( | ) |
default constructor
Definition at line 44 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
explicit |
default constructor with maxLog
Definition at line 47 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
gum::learning::Miic::Miic | ( | const Miic & | from | ) |
copy constructor
Definition at line 50 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
gum::learning::Miic::Miic | ( | Miic && | from | ) |
move constructor
Definition at line 55 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
override |
destructor
Definition at line 60 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
staticprivate |
checks for directed paths in a graph, consider double arcs like edges
graph | MixedGraph in which to search the path |
n1 | tail of the path |
n2 | head of the path |
Definition at line 974 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
staticprivate |
checks for directed paths in a graph, considering double arcs like edges, not considering arc as a directed path.
graph | MixedGraph in which to search the path |
n1 | tail of the path |
n2 | head of the path |
countArc | bool to know if we |
Definition at line 960 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
Definition at line 1173 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
private |
Definition at line 1008 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
private |
Definition at line 1101 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
void gum::learning::Miic::addConstraints | ( | HashTable< std::pair< NodeId, NodeId >, char > | constraints | ) |
Set a ensemble of constraints for the orientation phase.
Definition at line 956 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
Update the scheme w.r.t the new error.
Test the stopping criterion that are enabled.
error | The new error value. |
OperationNotAllowed | Raised if state != ApproximationSchemeSTATE::Continue. |
Definition at line 208 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns the current running time in second.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 115 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Disable stopping criterion on epsilon.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 53 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Disable stopping criterion on max iterations.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 94 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Disable stopping criterion on timeout.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 118 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Disable stopping criterion on epsilon rate.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 74 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Enable stopping criterion on epsilon.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 56 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Enable stopping criterion on max iterations.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 97 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Enable stopping criterion on timeout.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 121 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Enable stopping criterion on epsilon rate.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 77 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns the value of epsilon.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 50 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
protected |
finds the best contributor node for a pair given a conditioning set
x | first node |
y | second node |
ui | conditioning set |
mutualInformation | A mutual information instance that will do the computations and has loaded the database. |
graph | containing the assessed nodes |
rank | the heap of ranks of the algorithm |
Definition at line 574 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
virtualinherited |
Returns the scheme history.
OperationNotAllowed | Raised if the scheme did not performed or if verbosity is set to false. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 157 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Initialise the scheme.
Definition at line 168 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
protected |
Initiation phase.
We go over all edges and test if the variables are marginally independent. If they are, the edge is deleted. If not, the best contributor is found.
mutualInformation | A mutual information instance that will do the computations and has loaded the database. |
graph | the MixedGraph we start from for the learning |
sepSet | the separation set for independent couples, here set to {} |
rank | the heap of ranks of the algorithm |
Definition at line 144 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
virtualinherited |
Returns true if stopping criterion on epsilon is enabled, false otherwise.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 60 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns true if stopping criterion on max iterations is enabled, false otherwise.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 101 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns true if stopping criterion on timeout is enabled, false otherwise.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 125 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns true if stopping criterion on epsilon rate is enabled, false otherwise.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 81 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
Definition at line 1181 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
protected |
Definition at line 835 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
protected |
Iteration phase.
As long as we find important nodes for edges, we go over them to see if we can assess the conditional independence of the variables.
mutualInformation | A mutual information instance that will do the computations and has loaded the database. |
graph | the MixedGraph returned from the previous phase |
sepSet | the separation set for independent couples, built during the iterations of the phase |
rank | the heap of ranks of the algorithm |
Definition at line 177 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
const std::vector< Arc > gum::learning::Miic::latentVariables | ( | ) | const |
get the list of arcs hiding latent variables
Definition at line 941 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
BayesNet< GUM_SCALAR > gum::learning::Miic::learnBN | ( | GRAPH_CHANGES_SELECTOR & | selector, |
PARAM_ESTIMATOR & | estimator, | ||
DAG | initial_dag = DAG() |
||
) |
learns the structure and the parameters of a BN
selector | A selector class that computes the best changes that can be applied and that enables the user to get them very easily. Typically, the selector is a GraphChangesSelector4DiGraph<SCORE, STRUCT_CONSTRAINT, GRAPH_CHANGES_GENERATOR>. |
estimator | A estimator. |
names | The variables names. |
modal | the domain sizes of the random variables observed in the database |
translator | The cell translator to use. |
initial_dag | the DAG we start from for our learning |
Definition at line 945 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
MixedGraph gum::learning::Miic::learnMixedStructure | ( | CorrectedMutualInformation<> & | mutualInformation, |
MixedGraph | graph | ||
) |
learns the structure of an Essential Graph
learns the structure of a MixedGraph
mutualInformation | A mutual information instance that will do the computations and has loaded the database. |
graph | the MixedGraph we start from for the learning |
Definition at line 106 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
DAG gum::learning::Miic::learnStructure | ( | CorrectedMutualInformation<> & | I, |
MixedGraph | graph | ||
) |
learns the structure of a Bayesian network, i.e. a DAG, by first learning an Essential graph and then directing the remaining edges.
learns the structure of an Bayesian network, ie a DAG, from an Essential graph.
I | A mutual information instance that will do the computations and has loaded the database |
graph | the MixedGraph we start from for the learning |
Definition at line 768 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
virtualinherited |
Returns the criterion on number of iterations.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 91 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns the timeout (in seconds).
Implements gum::IApproximationSchemeConfiguration.
Definition at line 112 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Returns the approximation scheme message.
Definition at line 38 of file IApproximationSchemeConfiguration_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns the value of the minimal epsilon rate.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 71 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns the number of iterations.
OperationNotAllowed | Raised if the scheme did not perform. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 148 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
copy operator
Definition at line 63 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
move operator
Definition at line 69 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
protected |
Orientation phase from the 3off2 algorithm, returns a CPDAG.
mutualInformation | A mutual information instance that will do the computations and has loaded the database. |
graph | the MixedGraph returned from the previous phase |
sepSet | the separation set for independent couples, built during the previous phase |
Definition at line 226 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
protected |
Modified version of the orientation phase that tries to propagate orientations from both orientations in case of a bidirected arc, not used.
varient trying to propagate both orientations in a bidirected arc
mutualInformation | A mutual information instance that will do the computations and has loaded the database. |
graph | the MixedGraph returned from the previous phase |
sepSet | the separation set for independent couples, built during the previous phase |
Definition at line 371 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
protected |
Orientation phase from the MIIC algorithm, returns a mixed graph that may contain circles.
varient using the orientation protocol of MIIC
mutualInformation | A mutual information instance that will do the computations and has loaded the database. |
graph | the MixedGraph returned from the previous phase |
sepSet | the separation set for independent couples, built during the previous phase |
Definition at line 501 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
virtualinherited |
Returns the period size.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 134 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
protected |
heuristic for remaining edges when everything else has been tried
Definition at line 868 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
protected |
Propagates the orientation from a node to its neighbours.
Definition at line 910 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
inherited |
Returns the remaining burn in.
Definition at line 191 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
void gum::learning::Miic::set3of2Behaviour | ( | ) |
Sets the orientation phase to follow the one of the 3off2 algorithm.
Definition at line 954 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
virtualinherited |
Given that we approximate f(t), stopping criterion on |f(t+1)-f(t)|.
If the criterion was disabled it will be enabled.
eps | The new epsilon value. |
OutOfLowerBound | Raised if eps < 0. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 42 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Stopping criterion on number of iterations.
If the criterion was disabled it will be enabled.
max | The maximum number of iterations. |
OutOfLowerBound | Raised if max <= 1. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 84 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Stopping criterion on timeout.
If the criterion was disabled it will be enabled.
timeout | The timeout value in seconds. |
OutOfLowerBound | Raised if timeout <= 0.0. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 105 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
void gum::learning::Miic::setMiicBehaviour | ( | ) |
Sets the orientation phase to follow the one of the MIIC algorithm.
Definition at line 952 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
virtualinherited |
Given that we approximate f(t), stopping criterion on d/dt(|f(t+1)-f(t)|).
If the criterion was disabled it will be enabled
rate | The minimal epsilon rate. |
OutOfLowerBound | if rate<0 |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 63 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
How many samples between two stopping is enable.
p | The new period value. |
OutOfLowerBound | Raised if p < 1. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 128 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Set the verbosity on (true) or off (false).
v | If true, then verbosity is turned on. |
Implements gum::IApproximationSchemeConfiguration.
Definition at line 137 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Returns true if we are at the beginning of a period (compute error is mandatory).
Definition at line 178 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
Returns the approximation scheme state.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 143 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Stop the approximation scheme.
Definition at line 200 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
protected |
gets the list of unshielded triples in the graph in decreasing value of |I'(x, y, z|{ui})|
Definition at line 650 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
protected |
gets the list of unshielded triples in the graph in decreasing value of |I'(x, y, z|{ui})|, prepares the orientation matrix for MIIC
Definition at line 687 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
inherited |
Update the scheme w.r.t the new error and increment steps.
incr | The new increment steps. |
Definition at line 187 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
protected |
Gets the orientation probabilities like MIIC for the orientation phase.
Definition at line 728 of file Miic.cpp.
References gum::learning::genericBNLearner::Database::Database().
|
virtualinherited |
Returns true if verbosity is enabled.
Implements gum::IApproximationSchemeConfiguration.
Definition at line 139 of file approximationScheme_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protectedinherited |
Number of iterations before checking stopping criteria.
Definition at line 413 of file approximationScheme.h.
|
protectedinherited |
Current epsilon.
Definition at line 368 of file approximationScheme.h.
|
protectedinherited |
Current rate.
Definition at line 374 of file approximationScheme.h.
|
protectedinherited |
The current state.
Definition at line 383 of file approximationScheme.h.
|
protectedinherited |
The current step.
Definition at line 377 of file approximationScheme.h.
|
protectedinherited |
If true, the threshold convergence is enabled.
Definition at line 392 of file approximationScheme.h.
|
protectedinherited |
If true, the maximum iterations stopping criterion is enabled.
Definition at line 410 of file approximationScheme.h.
|
protectedinherited |
If true, the timeout is enabled.
Definition at line 404 of file approximationScheme.h.
|
protectedinherited |
If true, the minimal threshold for epsilon rate is enabled.
Definition at line 398 of file approximationScheme.h.
|
protectedinherited |
Threshold for convergence.
Definition at line 389 of file approximationScheme.h.
|
protectedinherited |
The scheme history, used only if verbosity == true.
Definition at line 386 of file approximationScheme.h.
|
protectedinherited |
Last epsilon value.
Definition at line 371 of file approximationScheme.h.
|
protectedinherited |
The maximum iterations.
Definition at line 407 of file approximationScheme.h.
|
protectedinherited |
The timeout.
Definition at line 401 of file approximationScheme.h.
|
protectedinherited |
Threshold for the epsilon rate.
Definition at line 395 of file approximationScheme.h.
Progression, error and time.
Definition at line 58 of file IApproximationSchemeConfiguration.h.
|
inherited |
Criteria messageApproximationScheme.
Definition at line 61 of file IApproximationSchemeConfiguration.h.
|
protectedinherited |
Checking criteria frequency.
Definition at line 416 of file approximationScheme.h.
|
protectedinherited |
The timer.
Definition at line 380 of file approximationScheme.h.
|
protectedinherited |
If true, verbosity is enabled.
Definition at line 419 of file approximationScheme.h.