-
Notifications
You must be signed in to change notification settings - Fork 36
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
Dyadic attributes and graph manipulation #567
Comments
Thumbs up for a network feature. |
@CarterButts , what do you think? In principle, we can test the |
Putting that in There actually is a standard way to ensure that the behavior in question is followed: one can store both the graph and the dyadic values as edge attributes, which will then be handled automagically if the network changes. We usually wouldn't do this, because of the overhead from a sparse representation of a non-sparse covariate (you would be adding edges for every non-zero dyad), and the overhead usually isn't worth it. But this does tell By contrast, it makes a lot of sense to think about building more intelligence into |
Hence the proposal to add the
It's not just the overhead; it's also what you do with the network afterwards, whether in |
Ah, I'd misunderstood what you intended with I think that's part of the issue, in the end: there's already a way to do this in the general case, and so anything else one implements is just going to be recreating something equivalent to a network object all over again. I'm also unconvinced that there's a problem to be solved in the first place, since it has always been up to the user to prepare their data before passing it to Given that this is not something for which there has been an evident need in the past, what is the argument for why this is now an important feature? |
Terms that operate on a subgraph, mainly. That includes |
The problem:
Approaches
network
APIIntroduce the concept of a dyad attribute (
%d%
?) that functions such asadd.nodes()
,permute.vertexIDs()
, andget.inducedSubgraph()
understand and modify accordingly. This is probably the most seamless and elegant way. @CarterButts , what do you think?%ergmlhs%
APIIt's up to the user to provide
ergm()
with a list of network attributes subject to adjustment. Then, something along the lines ofcould inform the
S()
operator that a subgraph should be taken. This could be automated by providing a%d%<-.network()
method that sets the network attribute and updates the%ergmlhs%
metadata.Vertex name matching
edgecov()
anddyadcov()
could be more clever. Firstly, if the dyadic covariate dimension does not match the current network size, they should at the very least detect that. They could then see if, e.g., the dyadic covariate matrix has row and column names, which could then be used to map onto the current vertex names.The text was updated successfully, but these errors were encountered: