Feature: improvements and refactors to p2p functions#41
Merged
Conversation
New method for simulating p2p data
Major breaking changes to `network_p2p()` so that it is also capable of performing community detection. This will supersede `network_leiden()` and `network_louvain()`.
Closed
For this to be more informative on what is actually being run
Undocumented arguments
All rows are released, instead of just keeping the first row per permutation.
The updated summary table shows the top values of each combination of attribute, with three rows shown per community.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch introduces some improvements to existing p2p-related functions, including refactoring the existing
network_p2p().Changes
The changes made in this PR are:
p2p_data_sim()as a function for simulating person-to-person query data.network_p2p()to perform community detection (Refactor: simplify API so thatnetwork_p2p()can handle community detection #38). This now supersedesnetwork_leiden()andnetwork_louvain().network_describe()- now percentages reflect the % of the Community is represented by line description. AlsosummaryTablenow reflects the top rows of all attribute combinations. (Enhancement: improve output of the "describe" function #45)New API for
network_p2pImplement community detection from a single function:
The
displayargument allows three valid values:hrvar,leiden, orlouvain. The last two methods will implement community detection, whereashrvarsimply return outputs that are very similar to the originalnetwork_p2p()function.Handling corner cases:
There are two return options where
hrvarwill not be able to return anything:return = "sankey"andreturn = "describe". The function currently returns a message informing the user that they should choose a community detection method using thedisplayargument.Plotting from console instead of saving as PDF:
Users can now choose to plot in console by setting the
pathargument toNULL.Two options for plotting methods:
It is now possible to coerce the function use the faster plotting method (with
igraph) or the higher quality but less scalable plotting method (withggraph), using thesize_thresholdargument. Users can set assize_thresholdto 0 to coerce to a fast plotting method every time, andInfto always use the default plotting method.Smart path return:
At the moment, there is a path return for the three functions, with different defaults. There should be a smart path return capability where the default file name returned provides the most useful information, e.g. community detection method, time stamp, size, etc.
Check
(OPTIONAL) Note
This fixes #38, #43, and #45.