| | |
- abc.ABC(builtins.object)
-
- Score
class Score(abc.ABC) |
| |
Score(data: Union[structure_learning.data.data.Data, pandas.core.frame.DataFrame])
Base class for graph scores for structure learning using MCMC.
Inheriting classes must implement the following methods:
compute() -> dict
compute_node() -> dict |
| |
- Method resolution order:
- Score
- abc.ABC
- builtins.object
Methods defined here:
- __init__(self, data: Union[structure_learning.data.data.Data, pandas.core.frame.DataFrame])
- Initialises the Score abstract class.
All classes that inherit from this class must implement the compute method.
Parameters:
data (pd.DataFrame): dataset
graph (nx.DiGraph, optional): graph structure.
Defaults to None. The graph must be a DAG.
- compute(self, graph: structure_learning.data_structures.graph.Graph)
- Implements a score function (e.g. BGe, Marginal Likelihood, etc)
- 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
- compute_node_with_edges(self, node: str, parents: list = None, node_index_map: dict = None)
- Implements a score function (e.g. BGe, Marginal Likelihood, etc) for a specific node and parents
Readonly properties defined here:
- node_labels
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
- data
Data and other attributes defined here:
- __abstractmethods__ = frozenset({'compute', 'compute_node_with_edges'})
| |