Module Index : Topics : Keywords
 
 
structure_learning.scores.bdeu
index
/Users/165421/Documents/code/structure_learning/src/structure_learning/scores/bdeu.py

This module implements the BDeuScore class, which calculates the Bayesian Dirichlet equivalent uniform (BDeu) score for a given graph structure.
 
The BDeu score is used in Bayesian network structure learning to evaluate the fit of a graph to a dataset. It considers the conditional probabilities of nodes given their parents and incorporates a prior distribution controlled by the alpha parameter.
 
Classes:
    BDeuScore: Computes the BDeu score for a graph structure based on the provided data.

 
Modules
       
numpy
pandas

 
Classes
       
structure_learning.scores.score.Score(abc.ABC)
BDeuScore

 
class BDeuScore(structure_learning.scores.score.Score)
    BDeuScore(data: Union[structure_learning.data.data.Data, pandas.core.frame.DataFrame], alpha=10)
 
BDeu Score
 
 
Method resolution order:
BDeuScore
structure_learning.scores.score.Score
abc.ABC
builtins.object

Methods defined here:
__init__(self, data: Union[structure_learning.data.data.Data, pandas.core.frame.DataFrame], alpha=10)
Initialise BDeuScore instance.
 
Parameters:
    data (pandas.DataFrame): data
compute(self, graph: structure_learning.data_structures.graph.Graph)
Compute BDeu score.
 
Parameter:
    graph (Graph):      Graph object
Returns:
    (float): BDeu score
compute_node_with_edges(self, node: str, parents: list, node_index_map: dict = None)
Adapted from https://github.com/pgmpy/pgmpy/blob/dev/pgmpy/estimators/StructureScore.py

Data and other attributes defined here:
__abstractmethods__ = frozenset()

Methods inherited from structure_learning.scores.score.Score:
compute_node(self, graph: structure_learning.data_structures.graph.Graph, node: str)
Implements a score function (e.g. BGe, Marginal Likelihood, etc) for a specific node

Readonly properties inherited from structure_learning.scores.score.Score:
node_labels

Data descriptors inherited from structure_learning.scores.score.Score:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
data

 
Data
        Union = typing.Union
gammaln = <ufunc 'gammaln'>