e78ff4e8d17073979c997576faf94cec3d4e0152,tests/data/test_stellargraph.py,,example_stellar_graph_1,#Any#,39
Before Change
G.add_edges_from(elist, label="default")
// Add some numeric node attributes
if set_numeric:
for v in G.nodes():
G.node[v][set_numeric] = v * np.ones(10)
else:
// Add some node attributes
G.node[1]["a1"] = 1
G.node[3]["a1"] = 1
G.node[1]["a2"] = 1
G.node[4]["a2"] = 1
G.node[3]["a3"] = 1
return G
def example_hin_1(set_numeric=False, for_nodes=[]):
After Change
def example_stellar_graph_1(feature_name=None):
G = nx.Graph()
elist = [(1, 2), (2, 3), (1, 4), (3, 2)]
G.add_nodes_from([1, 2, 3, 4], label="default")
G.add_edges_from(elist, label="default")
// Add some numeric node attributes
if feature_name:
for v in G.nodes():
G.node[v][feature_name] = v * np.ones(10)
return StellarGraph(G, node_features=feature_name)
else:
return StellarGraph(G)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: stellargraph/stellargraph
Commit Name: e78ff4e8d17073979c997576faf94cec3d4e0152
Time: 2018-09-09
Author: docherty@gmail.com
File Name: tests/data/test_stellargraph.py
Class Name:
Method Name: example_stellar_graph_1
Project Name: pgmpy/pgmpy
Commit Name: 97b2ccec94583a7876566a340f06e84a63340272
Time: 2015-03-26
Author: pratyaksh@me.com
File Name: pgmpy/inference/ExactInference.py
Class Name: VariableElimination
Method Name: induced_graph
Project Name: stellargraph/stellargraph
Commit Name: e78ff4e8d17073979c997576faf94cec3d4e0152
Time: 2018-09-09
Author: docherty@gmail.com
File Name: tests/data/test_stellargraph.py
Class Name:
Method Name: example_hin_1