Moreover, the edge from the vertex with the ID 128 to the vertex with ID 99 is not present in the bipartite subgraph, because edges are only allowed to go from left to right (and not from right to left). The 1908 vertex had no other connection to the graph and was removed as well. Since the only edge connecting that vertex to the graph was the one from 128 to 1908 that edge would violate the bipartite properties of the subgraph, the edge was removed. The resulting bipartite subgraph looks like this:Īs you may have noticed, the vertex with the ID 1908 is not in the bipartite subgraph. The name must not have been previously used for another vertex property on this graph. You can then specify what the new vertex property should be called. When you create the subgraph PGX will automatically create a new boolean vertex property that stores whether a vertex is on the left side or not. Before creating the bipartite subgraph, however, we first need to create a new vertex collection and then fill it with the vertices we want to have on the left-hand side. Given the simple graph example from earlier, we can use PGX to create a bipartite subgraph based on a couple of vertices. This is an example of a bipartite subgraph, without any properties shown: In PGX, vertices that are isolated because all the edges leading to and from it were deleted will not be part of the bipartite subgraph. no edges from a left set vertex to another left set vertex and no edges between a right-hand side vertex to another right-hand side vertex). A bipartite subgraph only has edges between the left set and the other vertices (essentially the right-hand side), but not in between those groups (e.g. The specified vertices will be used as the left-hand side of the bipartite subgraph. The second way to create a subgraph is to specify a set of vertices and create a bipartite subgraph based on those vertices. get_edges ( filter_expr = EdgeFilter ( "src.prop1 = 10" )) Create a Bipartite Subgraph Based on a Vertex List If your graph is not stored on the same machine as the one where PGX runs, make sure that you can access it.Įdge_set = g. To load a graph, you need a graph config stored in an accessible location that points to a graph that is accessible by
Then we will show how to create a bipartite subgraph based on a vertex collection that specifies the left set of the bipartite graph. First, we will introduce filter expressions, which are two different ways to create a subgraph in PGX.
The goal of this guide is to help you understand how to create a subgraph, based on an already loaded graph.
SupervisedGraphWise (Vertex embeddings and classification).Vertex Betweenness Centrality Algorithms.Stochastic Approach for Link-Structure Analysis (SALSA) Algorithms.Conductance Minimization (Soman and Narang Algorithm).All Vertices and Edges on Filtered Path.