| |
- display_cpt(tabularcpd: pgmpy.factors.discrete.CPD.TabularCPD) -> pandas.core.frame.DataFrame
- Displays a CPD to a Jupyter cell output including a formatted explanation and a DataFram of the probabilities
Args:
tabularcpd (tabularcpd): The TabularCPD to be displayed.
Returns:
pd.DataFrame: The conditional probability table formatted as a DataFrame
- display_query(query: pgmpy.factors.discrete.DiscreteFactor.DiscreteFactor, phi_or_p: str = 'phi', print_state_names: bool = True) -> pandas.core.frame.DataFrame
- Converts a DiscreteFactor (a pgmpy query object) output into a DataFrame
Args:
phi_or_p (str, optional): 'phi': When used for Factors. 'p': When used for CPDs. Defaults to "phi".
print_state_names (bool, optional): If True, the user defined state names are displayed.. Defaults to True.
Returns:
pd.DataFrame: The output DataFrame
Notes:
Modified from _str in DiscreteFactor.py (right click on TabularCPD and choose Goto Definition)
|