![]() |
aGrUM
0.14.2
|
The class for computing the set of graph changes (over a subgraph) transmitted to learning algorithms. More...
#include <agrum/agrum.h>
#include <agrum/core/OMPThreads.h>
#include <agrum/core/set.h>
#include <agrum/graphs/diGraph.h>
#include <agrum/learning/structureUtils/IGraphChangesGenerator4DiGraph.h>
#include <agrum/learning/structureUtils/graphChange.h>
#include <agrum/learning/structureUtils/graphChangesGeneratorOnSubDiGraph_tpl.h>
Go to the source code of this file.
Classes | |
class | gum::learning::GraphChangesGeneratorOnSubDiGraph< STRUCT_CONSTRAINT > |
The basic class for computing the next graph changes possible in a structure learning algorithm. More... | |
Namespaces | |
gum | |
gum is the global namespace for all aGrUM entities | |
gum::learning | |
The class for computing the set of graph changes (over a subgraph) transmitted to learning algorithms.
Structure learning algorithm try different modifications of the graph. Class GraphChangesGeneratorOnSubDiGraph provides a simple way to compute those that we wish to perform when we wish to limit the set of changes over a subgraph of the graph we learn. For instance, we may wish to relearn an already partially learnt structure just around nodes A,B,C. In this case, we can set the set of target nodes of the GraphChangesGeneratorOnSubDiGraph to {A,B,C} and the set of starting nodes as all the nodes of the graph. In this case, only the arcs whose heads are A, B or C will be trnasmitted to the learning algorithm.
Basically, the idea is to use method setGraph at the beginning of the structure learning in order to initialize the possible set of operators. Then, parse this set using a for ( auto iter = operator_set.begin (); iter != operator_set.end (); ++iter ) loop and compute the scores induced by these changes. When this is done, flush the operator set by calling method clearChanges. Then iterate changes and after each new change applied, used again the iterator for loop, and so on. Note that, whenever you execute method modifyGraph, this will automatically flush the current list of changes and put into the list only the changes that are affected by the graph modification.
Definition in file graphChangesGeneratorOnSubDiGraph.h.