Update
This commit is contained in:
parent
44b1495b4c
commit
680a27c4ec
88234
data/facebook_combined.txt
Normal file
88234
data/facebook_combined.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
if __name__ == '__main__':
|
||||
data = pd.read_csv('./data/web-Stanford.txt', sep="\t", header=None, skiprows=4)
|
||||
data = pd.read_csv('./data/testmini.txt', sep=" ", header=None, skiprows=4)
|
||||
G = nx.DiGraph()
|
||||
for i in range(len(data)):
|
||||
G.add_node(data.iloc[i][0])
|
||||
|
@ -2,12 +2,11 @@ import networkx as nx
|
||||
import pandas as pd
|
||||
|
||||
if __name__ == '__main__':
|
||||
data = pd.read_csv('./data/web-Stanford.txt', sep="\t", header=None, skiprows=4)
|
||||
data = pd.read_csv('./data/testmini.txt', sep=" ", header=None, skiprows=4)
|
||||
G = nx.DiGraph()
|
||||
for i in range(len(data)):
|
||||
G.add_node(data.iloc[i][0])
|
||||
G.add_node(data.iloc[i][1])
|
||||
G.add_edge(data.iloc[i][0], data.iloc[i][1])
|
||||
|
||||
pr = nx.pagerank(G, alpha=0.9)
|
||||
print(pr)
|
Loading…
Reference in New Issue
Block a user