Skip to content

Figure out what to do when instantiating a network with perturbation parameters #26

@daemontus

Description

@daemontus

Currently, the output of the following code is a bit counterintuitive:

stg = AsynchronousPerturbationGraph(bn)
for color in stg.mk_unit_colors():
    color.instantiate(bn)

This code fails, because the stg does not actually use bn, but rather a version of bn where all implicit parameters are replaced with explicit parameters, and perturbation parameters are added. We can access this network using stg.unperturbed_network(), but the way the API is designed right now, users don't know this.

Furthermore, with the current implementation of instantiate, it is in general not clear whether it only accepts the network which was used to create the graph, or whether it accepts any network.

However, accepting any network is problematic, because for implicit parameters, we can't reconstruct the regulator ordering based on the symbolic representation along. So I guess we can't accept arbitrary networks anyway.

Low effort solution: Add a note to the error message that if you are using a perturbation graph, you need to use unperturbed_network.

High effort solution: Only allow creating the perturbation graph using networks that don't have implicit parameters (and make the normalization function publicly available). Maybe we should make those normalization methods public anyway?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions