thunlp / cane Goto Github PK
View Code? Open in Web Editor NEWSource code and datasets of "CANE: Context-Aware Network Embedding for Relation Modeling"
License: MIT License
Source code and datasets of "CANE: Context-Aware Network Embedding for Relation Modeling"
License: MIT License
在zhihu数据集上的准确性只有38%
不知道理解的对不对,请指教,谢谢!
when i ran on the 'wiki', it said that, IndexError: index 2330 is out of bounds for axis 0 with size 2317.
Thanks
Wei
您好!请问在代码里,生成了每个节点的相互关注表示,但是最后求了平均,写入了embed,txt文件,并求出AUC,但是论文里最后进行节点分类时,却说求平均操作是为了获得context-free embedding,请问,这是什么原因呢,是不是代码里的嵌入是为了算分类的嵌入?还是我理解错了?
tf0.12 are rarely used and hard to install
hi, i find that there are some nodes have no group id,how to deal with this?
thanks in advance.
1000000
start training.......
Traceback (most recent call last):
File "train.py", line 39, in
text1,text2,text3=data.text[node1],data.text[node2],data.text[node3]
IndexError: index 10000 is out of bounds for axis 0 with size 10000
但是将graph.txt中带有10000的数据去掉之后就不会报错。请问这是什么原因。
When I am running your code for cora dataset with 15% sampled edges and rho1=1.0, rho2=1.0 & rho3=0.3 I am getting an AUC of 0.8495803744351195 which doesn't matches the paper. What should I do?
您好,我是用你们的代码跑你们提供的数据集,结果和论文中的差别比较大,请问可能是什么问题?
论文中提到最后的节点表示向量应该是结构嵌入与文本嵌入相结合的形式,但代码中在train.py进行写入时只写入了TA,TB代表的结构嵌入,而没有写入文本嵌入,所以导致即使设定了最后的表示向量是200维,但写入后的文件仍然只有100维。不知道我说的对吗,或者我哪块理解有问题。
Please check the effect of temp/test_graph.txt and temp/embed. TXT files can be added?
hi,how do we create the matrix A in the model? thanks in advance
请问代码中的参数设置是怎么对应的?文中关于cora数据集的设置是1.0, 0.3, 0.3 这个是和代码中的rho1 rho2 rho3对应的吗?感谢~
1.zhihu数据集中的graph.txt是怎么构建的。
2.感觉每个节点生成的embedding是多个,程序运行完是一个节点一个embedding,不是很明白,求解。
3. 运行Hepth数据集报错:
Traceback (most recent call last):
File "train.py", line 77, in
convA,convB,TA,TB = sess.run([model.convA,model.convB,model.N_A,model.N_B],feed_dict=feed_dict)
File "/home/cyh/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
File "/home/cyh/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 943, in _run
% (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (39,) for Tensor u'read_inputs/n2:0', which has shape '(64,)'
您好~凃学长,想请问您关于您在GitHub上提交的代码是否仅仅是基于文本嵌入的那部分,并未涉及到基于结构的嵌入呢?
tf.batch_matmul() function was removed in latest version of tensorflow?
tf.mul() was replaced by tf.multiply()
tf.pack was replaced by tf.stack()
so if latest version tensorflow was used, these functions should be replaced
changing tf.batch_matmul() to tf.matmul() may be complicated, parameters are different,
cane.py at line 51
r1=tf.batch_matmul(ha_mul_rand,hB,adj_y=True) was replaced by
r1=tf.matmul(ha_mul_rand, bB, transpose_a=False, transpose_b = True)
could you please post the intermediate running time outputs to the repo?
after I git-clone this repo and run the command python train.py
some errors report:
Traceback (most recent call last):
File "train.py", line 14, in
data=dataSet(text_path,graph_path)
File "/home/ldl/acl17-CANE/code/DataSet.py", line 12, in init
text_file,graph_file=self.load(text_path,graph_path)
File "/home/ldl/acl17-CANE/code/DataSet.py", line 21, in load
text_file=open(text_path,'rb').readlines()
IOError: [Errno 2] No such file or directory: 'data.txt'
and when I copy the datasets/zhihu/* to the code folder and run again
also:
Traceback (most recent call last):
File "train.py", line 14, in
data=dataSet(text_path,graph_path)
File "/home/ldl/acl17-CANE/code/DataSet.py", line 14, in init
self.edges=self.load_edges(graph_file)
File "/home/ldl/acl17-CANE/code/DataSet.py", line 29, in load_edges
edges.append(map(int,i.strip().split('\t')))
ValueError: invalid literal for int() with base 10: '1 2'
so I want to know how to run the code.
Hello, could you please provide the test code about how your group gets the result in ACL paper. We can learn more if the test file and code also provided.
您在论文中提到,对于数据集划分使用百分比,您对比算法也提到了node2vec,我想问下在数据集划分过程中考虑了训练集中包含所有的顶点吗,能否给出这部分划分的代码,我一直很迷惑
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.