ashish7129 / graph_sampling Goto Github PK
View Code? Open in Web Editor NEWGraph Sampling is a python package containing various approaches which samples the original graph according to different sample sizes.
License: MIT License
Graph Sampling is a python package containing various approaches which samples the original graph according to different sample sizes.
License: MIT License
Installation failed
I followed your instructions:
I tried the second way
1.download the zip file and move to its directory.
2.pip install Sampling
3.See error:
--macOS python2.7
Is your Improvement Request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
complete_graph.nodes[n]['id'] = n ? why?
sampled_graph.add_node(chosen_node)
sampled_graph.add_edge(curr_node, chosen_node)
The 'chosen_node' and 'curr_node' are both 'id' and not real values.
Cause the RW to walk according to the id of the node, not the true value of the node.
In the implementation of MHRW
while(len(self.G1.nodes()) < size):
if(len(node_list) > 0):
child_node = node_list.pop()
p = round(random.uniform(0,1),4)
if(child_node not in dictt):
related_listt = list(G.neighbors(child_node))
degree_c = G.degree(child_node)
dictt[child_node] = child_node
if(p <= min(1,degree_p/degree_c) and child_node in list(G.neighbors(parent_node))):
self.G1.add_edge(parent_node,child_node)
parent_node = child_node
degree_p = degree_c
node_list.clear()
node_list.update(related_listt)
else:
del dictt[child_node]
The probability of walking from parent_node to child_node seems to be min(1,degree_p/degree_c)
but in the paper the probability should be parent_node.deg() * min(1,degree_p/degree_c)
, which is not consistent
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.