NETWriter#
- class pgmpy.readwrite.NETWriter(model)[source]#
Bases:
objectBase class for writing network file in net format
- Parameters:
- model: DiscreteBayesianNetwork Instance
Examples
>>> from pgmpy.readwrite import NETWriter >>> from pgmpy.example_models import load_model >>> asia = load_model("bnlearn/asia") >>> writer = NETWriter(asia) >>> writer <pgmpy.readwrite.NET.NETWriter at 0x7feac652c2b0> >>> writer.write("asia.net")
- get_parents()[source]#
Add the parents to NET
- Returns:
- dict: dict of type {variable: a list of parents}
- get_properties()[source]#
Add property to variables in NET
- Returns:
- dict: dict of type {variable: list of properties }
- get_states()[source]#
Add states to variable of NET
- Returns:
- dict: dict of type {variable: a list of states}