benedekrozemberczki / splitter Goto Github PK
View Code? Open in Web Editor NEWA Pytorch implementation of "Splitter: Learning Node Representations that Capture Multiple Social Contexts" (WWW 2019).
License: GNU General Public License v3.0
A Pytorch implementation of "Splitter: Learning Node Representations that Capture Multiple Social Contexts" (WWW 2019).
License: GNU General Public License v3.0
Hi, I'm trying to test the splitter embedding and encountered this issue of not being able to find the community
module, which is being imported in ego_splittying.py
. And I think I've installed all the required packages.
Line 3 in b5b330f
When i run this model in different datasets (e.g blogcatalog), Some of the dimensions of the vector are greater than or less than negative 1, for example, (1.0,-7.087762355804443,-26.554523468017578,4.721840858459473, ...)
I'm getting the same error.
Traceback (most recent call last):
File "/home/shady/Projects/GML/SPLITTER/Splitter/src/main.py", line 24, in <module>
main()
File "/home/shady/Projects/GML/SPLITTER/Splitter/src/main.py", line 19, in main
trainer.fit()
File "/home/shady/Projects/GML/SPLITTER/Splitter/src/splitter.py", line 229, in fit
self.setup_model()
File "/home/shady/Projects/GML/SPLITTER/Splitter/src/splitter.py", line 159, in setup_model
self.egonet_splitter.personality_map)
File "/home/shady/Projects/GML/SPLITTER/Splitter/src/splitter.py", line 52, in initialize_weights
persona_embedding = np.array([base_node_embedding[n] for _, n in mapping.items()])
File "/home/shady/Projects/GML/SPLITTER/Splitter/src/splitter.py", line 52, in <listcomp>
persona_embedding = np.array([base_node_embedding[n] for _, n in mapping.items()])
IndexError: index 8637 is out of bounds for axis 0 with size 8637
The dataset is sorted and also IDs start from zero with no index and header. Also, it just happens on the CA-HepTh dataset and not others which is strange.
To solve this issue just rename the parser file, it detects it as the python's parser.
Hello, I followed the instruction to install all the required python packages but when I ran 'python3 src/main.py', I got the following error. Could you please let me know how I can fix it? Thank you!
Traceback (most recent call last):
File "src/main.py", line 24, in
main()
File "src/main.py", line 17, in main
graph = graph_reader(args.edge_path)
File "/Users/machunyu/KoslickiLab/Splitter/src/utils.py", line 26, in graph_reader
graph.remove_edges_from(nx.selfloop_edges(graph))
AttributeError: module 'networkx' has no attribute 'selfloop_edges'
Hello! I am new in this work ,but when I try to run the code , the error "an unexpected keyword argument 'iter" occured in the function def learn_base_embedding(self)
in walkers.py. It seems that the parameter 'iter' in
model = Word2Vec(self.paths, size=self.args.dimensions, window=self.args.window_size, min_count=1, sg=1, workers=self.args.workers, iter=1)
is wrong ?
I dont know much about this work in details. however, while implementing i am running into sample larger than population
. I think in src/walker.py it should be
def small_walk(self, start_node):
"""
Doing a truncated random walk.
:param start_node: Start node for random walk.
:return walk: Truncated random walk with fixed maximal length.
"""
walk = [start_node]
while len(walk) < self.args.walk_length:
if len(nx.neighbors(self.graph,walk[-1])) ==0:
break
walk = walk + [random.sample(nx.neighbors(self.graph,walk[-1]),1)[0]]
return walk
Instead of
def small_walk(self, start_node):
"""
Doing a truncated random walk.
:param start_node: Start node for random walk.
:return walk: Truncated random walk with fixed maximal length.
"""
walk = [start_node]
while len(walk) < self.args.walk_length:
walk = walk + [random.sample(nx.neighbors(self.graph,walk[-1]),1)[0]]
if len(nx.neighbors(self.graph,walk[-1])) ==0:
break
return walk
I'm getting this error while running your code:
File "C:\Users\ANJALI\environments\splitter\src\splitter.py", line 41, in <listcomp>
persona_embedding = np.array([base_node_embedding[original_node] for node, original_node in mapping.items()])
IndexError: index 599 is out of bounds for axis 0 with size 599
The number of nodes in my graph are 599. What is the cause for this error?
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.