Update algorithm
This commit is contained in:
parent
322353f034
commit
27c055193d
@ -3,13 +3,13 @@ import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
if __name__ == '__main__':
|
||||
data = pd.read_csv('./data/testmini.txt', sep=" ", header=None, skiprows=4)
|
||||
data = pd.read_csv('./data/web-Stanford.txt', sep="\t", 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.85)
|
||||
N = len(G)
|
||||
d = 0.9
|
||||
rank = {}
|
||||
|
Loading…
Reference in New Issue
Block a user