Conversation
The attributes assigned to edges in simplified networks (potentially) contain multiple values for a single edge. Previously, splitting such networks was not supported as it is not obvious how to deal with such edges. Now, we support splitting simplified networks. An edge that comprises of multiple source-edges before simplification should be partitioned again and its partials distributed over the corresponding bins. Singular edges can be handled as prior. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
When separating simplified edges during network splitting, it is not possible to determine which portion of the a numeric edge attribute belongs to which partial edge. Therefore, they lose their semantics in this case and should be removed. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Keeping all values of the 'relation' edge attribute when simplifying enables a proper separation of the attribute when splitting simplified networks. This change is not in contradiction with #251 (in which the previous simplification strategy was proposed). Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
As discussed in PR#278, removing numeric attributes from some splits while keeping them for others is not benefitial. Hence, we remove them from all splits as soon as one contains non-complete edges. Furthermore, the 'weight' attribute is mandatory and can therefore not be removed. Now, we assume 'weight' to always be equal to the amount of partials that comprise an edge. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
When splifying a network without the 'simplify.multiple.relations'
options set, we must still consider that input networks may already
contain multi-relational edges (as shown in 'showcase.R' when the sample
network is simpified again).
In our recent meetings we concluded that edges with a 'mail' relation
can be simplified together with edges that have a list('mail', 'mail')
relation but not with edges that have a list('mail', 'cochange')
relation. Further, we must ensure that any multi-relational edges can
still be simplified together with multi-relational edges that have the
same relation mix.
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
The previously used "concat" strategy does not work flawlessly with list edge attributes. When simplifying already simplified edges, i.e., edges that have list attributes longer than one, using the "concat" strategy, the result is a top-level list containing sublists from the merged attribute values. Instead, we want a single top-level list that contains all attribute values from the edges that comprise it. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
When splitting multi-partial edges, we only need to remove numeric attributes (from all edges in all bins) when there is at least one edge that has partials that belong to different bins. When for all edges all partials belong to the same bin, we can keep the numeric attributes. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Nomenclature: An "edge attribute" refers to the values of an attribute over all edges of a network, while an "edge attribute value" refers to the value of an edge attribute of a single edge. Previously we decided that edge attributes by default are of list type, yet we did not specify of which type edge attribute values should be. This is especially relevant when an edge attribute value consists of multiple values, i.e., in simplified edges, and the interplay of simplified edges and non-simplified edges when simplifying repeatedly. By default, simplification with the "concat" strategy wraps the values of all source edges into a list. Therefore, we decided that not only edge attributes should be lists, but also edge attribute values. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8mloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
The 'date' edge attribute is of list type by default an additional check is therefore not necessary. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Implement splitting of simplified networks Reviewed-by: Thomas Bock <bockthom@cmu.edu> Reviewed-by: Christian Hechtl <hechtl@cs.uni-saarland.de>
first draft of default function for stemming including preprocessing steps Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
refactor preprocessing steps to be in their own method, add tokenization, lemmatization, keyword search and token count functionalities Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
add new file 'test-data-misc' for tests, incomplete Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
Also change order in 'install.R' Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
Signel test for each step and one for combination Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
One test with only lowercase, one with all preprocessing steps Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
Single test as there is no preprocessing for tokenization Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
One test with only lowercase preprocessing, one with all preprocessing steps Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
multiple tests for different match functions: any, all and a custom function Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
Single test as all functionality is covered Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
Vertices with different names may have identical associated dates, therefore, we must deduplicate both names and dates together instead of independent of each other to ensure a correct one-to-one relation of names and dates. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Without this check, explicitly configuring 'author.name' as an 'edge.attribute' in the network configuration leads to edge lists that have an 'author.name.1' attribute in addition to the 'author.name' attribute. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
The bipartite- and the commit-network do not need to be constructed prior to constructing a multi-network. Parametrizing 'get.networks' to allow specifying which networks to construct therefore improves performance of 'get.multi.networks'. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
This commit includes several minor fixes to the logic of flattening list values in attribute values in 'add.vertex.attribute': - To better retain POSIXct values when flattening nested lists, use do.call(base::c, ..) instead of unlist(..). - Remove a case in which an already flat list is converted into a vector as the vector will be converted in a list later-on anyways. We represent attributes as lists (see PR#274). - Rename 'list.values' parameter in 'add.vertex.attribute' and 'split.and.add.vertex.attribute' to 'flatten.values' to improve readability by reducing unnecessary negations. - Introduce missing parameter descriptions for 'list.values' (now 'flatten.values') parameter Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Date-related edge attributes are supposed to be POSIXct not numeric, therefore, a conversion from unix timestamp to POSIXct must not be necessary. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Returning both the bipartite edge relations in addition to the constructed bipartite network from 'get.networks' is redundant. We remove the former because it is not considered a network. Additionally, we cache the bipartite relations similarly to how the author, artifact and commit network data is cached internally. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Miscellaneous fixes and improvements in network construction Reviewed-by: Thomas Bock <bockthom@cmu.edu>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
There are two interesting cases that the codeface data was missing before. 1) Commits that touch multiple different files / functions, 2) Commits by different authors that are issued at the exact same time. This works towards fixing #284. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Additionally, sort in all cases (even if 'merge' is not called) to acomodate for unsorted input data. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Enhance the codeface data for testing Reviewed-by: Thomas Bock <bockthom@cmu.edu>
Correct implementations of 'get.edgelist.with.timestamp' should retain the structure of listed edges and the POSIXct type of dates. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
When the parameter is TRUE timestamps in the edgelist returned by 'get.edgelist.with.timestamps' will be into vector. Unlisting fails if the input network contains simplified edges. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
As discussed in PR#289, 'graph::scale_edge_linetype' produces a scale with 'palette' = NULL. Upon printing the resulting plot (as done in 'showcase.R') this invalid palette causes the following error: "Cannot convert `x` to discrete palette" We can fix the problem temporarily by creating the scale manually through 'ggplot2::discrete_scale' and setting the palette to the default linetype palette. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Correctly handle date attributes in list format in 'get.edgelist.with.timestamps' Reviewed-by: Thomas Bock <bockthom@cmu.edu>
Signed-off-by: Thomas Bock <bockthom@cmu.edu>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #290 +/- ##
==========================================
+ Coverage 81.69% 82.57% +0.88%
==========================================
Files 16 16
Lines 5146 5378 +232
==========================================
+ Hits 4204 4441 +237
+ Misses 942 937 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thank you very much @maxloeffler for your many years of dedicated contributions to Thank you @Leo-Send for contributing new features to this new release of I will merge right away and release our new version. |
5.1
Added
unlist.timestamps.if.possibleparameter toget.edgelist.with.timestampswhich allows callers to request a conversion of the timestamps from list to vector if possible, i.e., when there are no simplified edges in the network (PR Correctly handle date attributes in list format in 'get.edgelist.with.timestamps' #289, 39bf1dd)Changed/Improved
event.info.1andevent.info.2(PR Internally cache network data instead of networks to reduce redundancy in network construction #282, 1b156c1)event.info.1andevent.info.2on network edges (PR Internally cache network data instead of networks to reduce redundancy in network construction #282, 1b156c1)network.typeparameter toget.networksin which the caller can specify the types of networks to be constructed. This improves performance in cases where not all network types are needed, such as when building multi-networks (PR Miscellaneous fixes and improvements in network construction #285, bc2efd6, e9a0c16)list.attributesparameter inadd.vertex.attributeandsplit.and.add.vertex.attributetoflatten.valueswith inverted semantics and introduce documentation for it to improve comprehensibility (PR Miscellaneous fixes and improvements in network construction #285, 7dab04a)author.nameinstead ofauthor.idwhen reading it from a file (PR Enhance the codeface data for testing #286, 61b538b)Fixed
construct.edge.list.from.key.value.listthat could cause a crash when constructing a network where different vertices have identical associated timestamps (PR Miscellaneous fixes and improvements in network construction #285, d694a68)author.name.1attribute (PR Miscellaneous fixes and improvements in network construction #285, 105fec1)add.vertex.attribute, i.e., that they are not converted to numeric values (PR Miscellaneous fixes and improvements in network construction #285, 7dab04a, 4924ac2)get.edgelist.with.timestampsto work correctly on networks with dates in default (list) format (PR Correctly handle date attributes in list format in 'get.edgelist.with.timestamps' #289, 35b34bf)