pyvene.data_generators.causal_model.CausalModel

pyvene.data_generators.causal_model.CausalModel#

class CausalModel(variables, values, parents, functions, timesteps=None, equiv_classes=None, pos={})[source]#

Bases: object

__init__(variables, values, parents, functions, timesteps=None, equiv_classes=None, pos={})[source]#

Methods

__init__(variables, values, parents, functions)

add_variable(variable, values, parents, ...)

find_live_paths(intervention)

generate_counterfactual_dataset(size, ...[, ...])

generate_equiv_classes()

generate_factual_dataset(size[, sampler, ...])

generate_timesteps()

get_partial_filter(partial_setting)

get_path_maxlen_filter(lengths)

get_specific_path_filter(start, end)

input_to_tensor(setting)

marginalize(target)

output_to_tensor(setting)

print_setting(total_setting[, font, node_size])

print_structure([pos, font, node_size])

run_forward([intervention])

run_interchange(input, source_interventions)

sample_input([mandatory])

sample_input_tree_balanced([output_var, ...])

sample_intervention([mandatory])