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

This module implements the BGe (Bayesian Gaussian Equivalent) score for evaluating Bayesian networks.
 
The BGe score is used to compute the marginal likelihood of a Bayesian network given data. It supports operations
such as computing the score for the entire graph, individual nodes, and edges. The implementation includes
parameters for regularization and scoring.
 
Classes:
    BGeScore: Implements the BGe score computation.

 
Modules
       
numpy
pandas

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

 
class BGeScore(structure_learning.scores.score.Score)
    BGeScore(data: Union[structure_learning.data.data.Data, pandas.core.frame.DataFrame])
 
BGe (Bayesian Gaussian Equivalent) Score
 
 
Method resolution order:
BGeScore
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])
Initialise BGe instance.
 
Parameters:
    data (Data | pandas.DataFrame): data
compute(self, graph: structure_learning.data_structures.graph.Graph)
Compute the BGE for the data
 
Returns:
    (dict): score and parameters
compute_node_with_edges(self, node: str, parents: list, node_index_map: dict)
Compute the BGE for edge(s)
 
Parameter:
    node (str): node label
    parents (list (str)): node labels of parent nodes
 
Returns:
    (dict): score and parameters

Data descriptors defined here:
am
parameters
reg_coefficients

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
lgamma = <ufunc 'loggamma'>