Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
daemontus opened this issue Sep 19, 2024 · 0 comments

Comments

@daemontus
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant