-
Notifications
You must be signed in to change notification settings - Fork 46
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
Change in handling multilayer to allow for single intra-layer partition object #34
Open
wweir827
wants to merge
72
commits into
vtraag:master
Choose a base branch
from
wweir827:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
… partition object
… partition object
… partition object
modified MutableVertexPartition to make methods virtual
Both these vectors represent properties of the underlying graph (not the partition) as should be instantiated as such.
… for directed vs not
Reverted changes to MutableVertexPartition.h, removed raising of Python exceptions in C++ helper functions, and corrected some references to nonexistent variables. init_admin(), move_node(), diff_move(), and quality() have not been changed and remain broken.
# Conflicts: # src/VertexPartition.py # src/python_partition_interface.cpp
inserted divide by m in modularity calculation
…o handle caching of neighbors and edge weights by layer for each vertex
# Conflicts: # src/RBConfigurationVertexPartitionWeightedLayers.cpp # tests/test_RBCVPweightedlayers.py
Before, much of the multi-layer data would not be initialized if all nodes were assigned to the same layer (i.e. layer count of 1).
…eLayers removed print lines updated diff quality to account for 2* node_size.
…incorporate edge layer weights into the conglomerated graph made layer_vec argument unnecessary for construction (default is to treat everything as sinlge layer) modified function getting graph edges, weights, and nodes from the c++ side to create agglomerated version that returns edge weights by layers
…currently no need to do this) fixed python facing method to get layer_weights
…r the layer valued versions
RBConfigurationVertexPartitionWeightedLayers optimization is roughly 100% faster now (i.e. it will take about half the time it used to). Also removed an extraneous function in GraphHelper and changed the use of IGRAPH_OUT to IGRAPH_IN in weight_from_comm.
The following files were not significantly changed and have been reverted to their state in vtraag/louvain-igraph's master branch: - ModularityVertexPartition.h - Optimiser.h - MutableVertexPartition.cpp - python_optimiser_interface.cpp - RBConfigurationVertexPartition.cpp
…t PyLong_Check from failing
handle list values using PyNumber_AsSsize_t instead of PyLong_AsLong raises python index error if unable to convert them.
…ayers changed PyLong Check to PyNumber Check for same compatibility
@rabisgon, I was thinking: the improvements you make here for running multilayer stuff could actually more easily implemented in the Leiden algorithm in |
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.
We have made some modifications to allow for running multilayer case with only two partition objects : a single igraph with all intralayer edges, and an interlayer igraph. For the intralayer VertexPartition object, the graph and a vector denoting the layer membership for each node is passed for creation. Having a fixed number of partition objects keeps the run time from ballooning for networks with many layers (as shown in the figure below).
To do this, we have modified GraphHelper to keep track of what portion of a given edge is within a layer in a vectorized weight. This allows us to calculate a layer specific null model contribution as is required in the multimodularity framework. We have also overridden several of the methods of MutableVertexPartition.cpp to allow for appropriate book keeping when creating condensed graphs.