-
Notifications
You must be signed in to change notification settings - Fork 41
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
GraphSpace - Diff for Graphs #417
Open
jahandaniyal
wants to merge
108
commits into
Murali-group:master
Choose a base branch
from
jahandaniyal:DIFF-02
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.
Open
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
…phSpace into version_feature
Implement graph intersection and graph difference function for two graphs. Additionally, expose API Endpoints to serve requests from GraphSpace. Intersection and Difference are basic functionalities for graph comparison. In this patch, only 2 graphs are being considered for comparison. Two new API endpoints - 1 for graphs compare page and another to accept GET requests from GraphSpace UI. Do resource hungry computation in PostGREs DB using SQLAlchemy ORM as much as possible. This helps in improving performance as computation over large datasets is not particularly efficient in Python when compared to RDMS. Serialise data from PostGREs and send as JSON to GraphSpace.
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.
Purpose
The Diff interface in GraphSpace allows a user to Compare TWO graphs to find interesting features which are common to both graphs or features unique to one graph but not the other. This feature currently supports 2 operations - Graph Intersection and Graph Difference. The same access rules regarding My graph, Public and Shared graphs also apply to Compare Graph feature. Users can only compare graphs they access to - graphs owned privately by other users cannot be accessed unless it is shared to them or made public.
Feature Details
There are 2 ways users can access this feature -
Compare Graph Tab
Graph diff can be accessed from Graphs index page as shown in the figure below.
Users don't need to be logged in to use this feature but they can only compare public graphs in this case.
Auto Generated Link
Users of Graphspace can also use the auto-generated links to directly run the Graph Diff feature. An example link could be - http://graphspace.org/compare?graph_1=1&graph_2=2&operation=intersection
Graph Intersection
This feature reveals elements (Nodes and Edges) which are common in both Graph.
If there are two graphs with names A, and B - then intersection of A & B is represented as shown in the figure below.
Graph Difference
This feature reveals elements (Nodes and Edges) which are present in one of the Graphs but not the other.
If there are two graphs with names A, and B - then intersection of A & B is represented as shown in the figure below. Difference will only consist of elements unique to Graph A.
Compare Graph Page
Compare graph page in Graphspace consists of 2 sections-
Parameter Selection
In this section, User will select the graphs to compare and the operation (intersection or difference) they want to perform.
Graph selection is supported by way of a dropdown menu. This menu may contain at least one or all of the following graph groups - My Graphs, Shared Graphs, and Public Graphs.
Add More Graphs
Users can add more graphs to compare by clicking on the Add Graphs button.
A modal popup allows users to select multiple graph for comparison operation.
Searching graphs is possible from the dropdown menu. This feature will helpful when there are many graphs available tComparing Graphso a particular user.
Operation can be selected in similar way using the dropdown menu.
By default a coloring scheme is selected for the User, however the user may modify the coloring scheme to suit their needs.
Color scheme can also be changed dynamically anytime after the compare operation has been performed.
Graph Visualization
This section displays the result of Graph Compare operation.
Information is displayed through 3 distinct tabs -
Visualization Tab
It renders the selected graphs and the observed elements (depending on the operation performed it could common elements or the difference) on a Cytoscape.js canvas.
The coloring scheme selected by the User is used to highlight the different graphs.
User can change this coloring scheme at any time using the 3 color pickers from Selection Area.
Nodes
This tab displays the nodes found after executing the comparison operation in a tabular form similar to the Nodes table in Graphs page.
Edges
Displays the edges found after executing the comparison operation in a tabular form similar to the Eddges table in Graphs page.
Benchmarks for 5-Graph Comparison:
Average case:
0.0405609607697 seconds
Worst Case (71 Nodes - 128 Edges):
0.0503243256577 seconds
Open Questions and Pre-Merge TODOs