load_bif#

causalbase.io.load_bif(path)[source]#

Read a BIF (.bif or .bif.gz) file into a DiscreteBN.

Parameters:
pathstr or pathlib.Path

Path to the file; a name ending in .gz is decompressed.

Returns:
DiscreteBN

The network, its variables in the order the file declares them.

Raises:
FileNotFoundError

If path does not exist.

ValueError

If the file is not a valid BIF network (see parse_bif()).