Reference Manual: DSL greedyThickThinning
From DSL
This class implements the greedy thick thinning procedure for learning the structure and parameters of the Bayesian network.
Fields
Below there are described fields of this class that allow for defining some details of the learning algorithm.
• enum PriorsType {K2, BDeu}, constants that define type of priors available.
• typedef std::vector<std::pair<int, int> > IntPairVector.
• PriorsType priors = K2, defines type of priors to use.
• int maxParents = 5 , defines maximal number of parents a node can have.
• double netWeight = 1.0, for BDeu priors it defines weight assigned to the uniform priors.
• IntPairVector forcedArcs, vector of pairs of indices (parent, child) denoting arcs that will be present in the graphical structure. Variables indices correspond to the indices of the DSL_dataset.
• IntPairVector forbiddenArcs, vector of pairs of indices (parent, child) denoting arcs that will be absent in the graphical structure. Variables indices correspond to the indices of the DSL_dataset.
• IntPairVector tiers, vector of pairs, where integers in the pair mean (variable, tier number). Tier numbers start from 1. Variables indices correspond to the indices of the DSL_dataset.
Methods
- DSL_greedyThickThinning()
Constructor, that initializes the object with default values of parameters used for learning.
- int Learn(const DSL_dataset &data, DSL_network &net);
This method performs actual learning procedure. The first argument is the input data set. The result of learning procedure is stored in the DSL_network which is the second argument. The method returns DSL_OKAY if learning was successful and an error code otherwise.
