-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Discussion] Replace the randomnet horrorscape #139
Comments
net = WTNetwork.random(size=5) # produces a random connected net with 5 nodes
net = WTNetwork.random(net=s_pombe_net) # produces a random network with the same size, mean in-degree and number of canalyzing edges as s_pombe or maybe this would be better?
Or some combination? Just spitballing here. |
@hbsmith That's exactly what I'm looking for. Thanks! Keep it coming folks! |
In my dream world, this would conform to our language about "constrained ensembles". Let's see if I can invent this in a way that would be implementable...
That is, We would ideally want to be able to further constrain existing ensembles, but I imagine this is where the implementation gets hairy. E.g. this would produce the same ensemble as above
Where this would really get cool (and tricky) is if we managed to make the following work (I'm looking at @siyuzhou):
or maybe constrain to ranges if that's easier (?)
and of course all combinations (some of which would presumably produce errors or empty ensembles):
I suppose we could implement just a few constraints that we know how to do easily first, and we could have room to grow in case we managed to figure out the trickier ones. We could also implement @hbsmith's version that starts with a network (which I like) for convenience; e.g. within a network object
|
@bcdaniels This is great. I was thinking along the same lines, but had a different implementation of "composible constraints" in mind. I think you're API would be more intuitive for most folks. Here are some of my thoughts: Network TypeA sticking point of what you've proposed is the network type. Would Implementing ConstraintsWe also have to think about how to compose constraints. The naive way to do that is to have a AdvantagesOne advantage to that is you could have something like
which would apply any function with type DisadvantagesThe biggest disadvantage is the cost; you'll end up generating a lot of networks that fail with no guarantee of success. What if two constraints are incompatible? |
@dglmoore I was also thinking about the cost aspect when reading over @bcdaniels suggestions (which I think are all good ideas). Do we just create a non-constrained ensemble of random networks and then filter them? (returning an error if constraints end up being incompatible, and a warning if there are no random networks that fit them?) Do we use a "smart" way to create random ensembles with specific constraints? Do we reuse those if the constraints get relaxed? (possibly biasing the random ensemble) Just some thoughts that came to mind. |
I took a look at the random network generators in @siyuzhou's approaches using genetic algorithms or neural networks to generate networks is great, but I have two concerns:
|
This is the simplest approach. What we are currently doing is building certain types of networks, e.g networks with a given mean degree, using specialized algorithms and then testing against the additional constraints as we build a given network. For example, once we've created a given logic function for a node that was canalying in the original network, we test it to make sure it is canalying and try again if it isn't. This is a bit more efficient than constructing the entire network.
I'm not sure how you could test the collection of constraints for satisfiability. I'm fairly sure that's either undecidable or very hard. There might be a way for a small set of pre-defined constraints, but in general...? Either way, the best I think we could do is just throw an error if we try a bunch of times and fail.
I think that's the best way to go if we decide try a "composable constraints" approach. We might consider the user's requested set of constraints to choose an optimized algorithm, and fall back to "try-try again" in other cases (or some kind of hybrid).
That's an interesting idea. Relaxing constraints is hard because now you are potentially admitting new networks. However, strengthening constraints might be possible. |
One more thought: there are different kinds of constraints we could impose. To name a few:
The first one could be applied while a network is being built. The second could either be used to create a more efficient generation algorithm, or be checked after an unbiased network is built. The third can only be applied after the entire network is constructed. Any thoughts? |
This is a discussion question. Please comment with any thoughts you may have.
Using the
randomnet
submodule to produce random networks is kind of a nightmare. In an ideal world, what would the perfect API look like to you? Give an example of how you'd like to be able to perform the the following (vague) tasks:Note: we aren't looking for implementations, just suggested API. For example, one possible response to 1 is
or maybe
The text was updated successfully, but these errors were encountered: