|
def | __init__ (self, states_df, alpha, verbose=False, vtx_to_states=None, lam=.5, learn_later=False) |
|
def | find_MB (self, vtx=None) |
|
def | __init__ (self, states_df, alpha, verbose=False, vtx_to_states=None, learn_later=False) |
|
def | learn_struc (self) |
|
def | find_MB (self, vtx=None) |
|
def | find_nbors (self) |
|
def | orient_edges (self) |
|
def | new_filled_nx_graph (self) |
|
def | undo_cycles (self) |
|
def | orient_undecided_edges (self) |
|
def | __init__ (self, is_quantum, states_df, vtx_to_states=None) |
|
def | fill_bnet_with_parents (self, vtx_to_parents) |
|
The MB_lambda_IAMB_Lner (lambda Incremental Association Markov Blanket
Learner) is a subclass of MB_BasedLner. See docstring for MB_BasedLner
for more info about this type of algo.
lambda refers to the fact tha it uses an extra parameter lambda between
zero and one.
See Ref. 1 below for pseudo code on which this class is based.
References
----------
1. An Improved IAMB Algorithm for Markov Blanket Discovery, by Yishi
Zhang, Zigang Zhang, Kaijun Liu, and Gangyi Qian (JCP 2010 Vol.5(11))
Attributes
----------
is_quantum : bool
True for quantum bnets amd False for classical bnets
bnet : BayesNet
a BayesNet in which we store what is learned
states_df : pandas.DataFrame
a Pandas DataFrame with training data. column = node and row =
sample. Each row/sample gives the state of the col/node.
ord_nodes : list[DirectedNode]
a list of DirectedNode's named and in the same order as the column
labels of self.states_df.
alpha : float
threshold used for deciding whether a conditional or unconditional
mutual info is said to be close to zero (independence) or not (
dependence). The error in a data entropy is on the order of ln(n+1)
- ln(n) \approx 1/n where n is the number of samples so 5/n is a
good default value for alpha.
verbose : bool
True for this prints a running commentary to console
vtx_to_MB : dict[str, list[str]]
A dictionary mapping each vertex to a list of the vertices in its
Markov Blanket. (The MB of a node consists of its parents, children
and children's parents, aka spouses).
vtx_to_nbors : dict[str, list[str]]
a dictionary mapping each vertex to a list of its neighbors. The
literature also calls the set of neighbors of a vertex its PC (
parents-children) set.
vtx_to_parents : dict[str, list[str]]
dictionary mapping each vertex to a list of its parents's names
lam : float
extra parameter between 0 and 1. The closer it is to 1, the fewer
elements are added to MB