Comments (3)
I talked to @ecklbarb about the construction of multi-edge-type networks, e.g., supporting several author.relation
entries in the network configuration. We came up with a solution that, as we hope, will add solutions for the following problems in the end: multi-edge-type networks, combination of networks, and, therefore, multi-artifact networks (see #15).
Multi-edge-type networks
To support a network-configuration entry such as author.relation = c("mail", "cochange")
, we need to carry out the following steps:
-
Change the allowed number of arguments for the
author.relation
key toInf
here:
https://github.com/se-passau/codeface-extraction-r/blob/0e90d6152c854766ec0f40496745508cf0e228fa/util-conf.R#L651-L656 -
Split the function
construct.network.from.list
into two parts here:-
The first part of the function is the construction of an edgelist and a set of vertices. From the new function, we need to return a list of the following shape which is compatible with
igraph::as.data.frame()
:network.df = list( edges = edge.list, vertices = data.frame(name = nodes.processed) )
This way, we can transform the list to a network easily, using the function
igraph::graph.data.frame()
. -
The second part of the function is the reliable construction of a network from the returned list of edges and vertices. We need to be sure to include the corner-cases we handle right now.
-
-
In the function
get.author.network
, we need to build the network by looping over all givenauthor.relation
entries given through the network configuration.
https://github.com/se-passau/codeface-extraction-r/blob/0e90d6152c854766ec0f40496745508cf0e228fa/util-networks.R#L493-L536There, we need to perform following steps to ensure the construction of the right network:
- Get the edgelist and the set of vertices for all configured relations.
- Merge the edge lists and the sets of vertices. We should rely here on the function
merge
, which should provide all functionality we need for the join operation. We need a separate function for that. - Call the new function from point 2.ii to construct a network from the merged edgelists and vertices.
Combination of networks
When we implement point 3.ii in a public function somewhere in the networks module (e.g., right next to add.edges.for.bipartite.relation
or so), we have easy play for the combination of networks here: We just need to add a function with a similar signature that just takes two (or more) networks as parameters and then performs the following steps:
- Call
igraph::as.data.frame()
to obtain lists as described in point 2.i above. - Merge the result using the function from 3.ii.
- Call the function from point 2.ii above.
Multi-artifact networks
As the combination of networks also works for differing artifacts, we are safe here.
Transfer for other types of networks
These steps need to be performed also for artifact networks (solving the main idea from #15 this way), bipartite networks, and multi networks. We have to be careful with the bipartite relation especially.
from coronet.
We have to remember to adapt the simplify function to the multi-edge-type networks. Each edge type should be left after the simplification.
from coronet.
I suggest that we add the further improvements in another issue (i.e., merging of edge lists instead of networks here and here; and simplification on edge lists instead of networks here) and close this issue after merging of PR #115 for better bookkeeping.
from coronet.
Related Issues (20)
- Add input validation for setter functions
- Handle empty user correctly
- Filter "deleted user" correctly
- Missing data in `get.first.activity.data` leads to an error
- Tidy-up and optimize source-code inconsistencies
- Enhance `metrics.vertex.degrees` to also be able to compute in-degrees and out-degrees
- Simplified artifact networks have double of their intended edge weights HOT 1
- Test suite fails when using "igraph" versions >= 1.4.0 HOT 1
- Create edges for `artifact relation` `issue` HOT 2
- Tests for functionality in util-networks-misc.R
- Generate coverage reports for our test suite and integrate it into our CI HOT 2
- Error message logging in `metrics.smallwordness` is broken
- Fix edge-attribute handling when simpliyfing networks HOT 8
- Make warnings more uniform HOT 1
- Allow to specify `split.basis` by stating multiple data sources and start splitting according to the earliest data source HOT 4
- Wrong bins attribute after sliding-window-based network splitting & inconsistent behavior of `construct.ranges` HOT 6
- Update deprecated function calls from other packages HOT 10
- `construct.ranges` for cumulative ranges
- Handle mail data of projects that use multiple mailing lists correctly
- Splitting behavior: What to do with elements that occurred before the predefined splitting bins? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coronet.