Skip to content

Instantly share code, notes, and snippets.

@heukirne
Last active July 19, 2018 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heukirne/be398491708304b384e1b651806a8574 to your computer and use it in GitHub Desktop.
Save heukirne/be398491708304b384e1b651806a8574 to your computer and use it in GitHub Desktop.
import networkx as nx
import pandas as pd
X = frequency[['dose','freq']].values.astype(float) 
medication_graph = nx.from_numpy_matrix(self.sim_matrix) 
pr = nx.pagerank(medication_graph, alpha=0.9, max_iter=1000, personalization=dict(sfrequency['count']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment