deep-polyu / aane_python Goto Github PK
View Code? Open in Web Editor NEWAccelerated Attributed Network Embedding, SDM 2017
Accelerated Attributed Network Embedding, SDM 2017
Given the whole N nodes, you do five-fold cross-validation, i.e., four-fold nodes for training, denoted as the training group T1. We denote the test nodes as T2.
When "Training Percentage # nodes for embedding = 100%", all the four-fold nodes (T1) are used. We build a graph by including nodes in T1 and T2, and the edges between them. We embedding the constructed graph to learn H. And use embedding representations of T1 to train the classifier.
When "Training Percentage # nodes for embedding = 50%", 50% of the nodes in T1 are used to construct the new graph along with T2.
Thanks.
Thanks a lot for sharing the code. I have been trying to implement your paper from scratch to understand ADMM. Your code is very helpful in understanding the paper and getting insights from your solution.
To understand your solution better, I try to evaluate the objective function as follows:
### A: attribute matrix
### W: weight matrix
S = A.transpose() * sparse.diags(np.ravel(np.power(A.power(2).sum(1), -0.5)))
S = S.toarray()
def objective(H, S):
n = S.shape[0]
len_H = H.shape[0]
wid_H = H.shape[1]
term1 = 0
for i in range(n):
for j in range(n):
tmp = (S[i][j] - np.matmul(H[i], H[j].T))
term1 += tmp * tmp
term2 = 0
for i in range(len_H):
for j in range(wid_H):
term2 += np.linalg.norm(H[i] - H[j]) * W[i,j]
term2 = term2 * lambd
sol = term1 + term2
return sol
blog_catalog = sio.loadmat('BlogCatalog.mat', struct_as_record=True)
### For fast iteration, only consider 20x20 size of W and A
W = blog_catalog['Network']
W = W[:20,:20]
A = blog_catalog['Attributes']
A = A[:20,:20]
d = 3 #dimension of H (embedding representation)
e = 0.001
lambd = 0.05
rho = 5
max_iter = np.arange(50)
objectives_author = []
for i in max_iter:
H_author = AANE(W, A, d, lambd, rho, i,'Att').function()
objectives_author.append(objective(H_author, S))
However, I see that the objective function increases with the number of iterations as shown in the figure below:
Can you please give me some insights on this problem?
This python implementation is fast on mac os, but slow on Linux. It is because scipy.sparse.linalg.svds is used. Will fix it in the future.
can we have yelp data set? thank you for it.
emb_matrix = AANE_fun(data_net_matrix, data_attr_matrix, d = 128 )
when I use AANE to get the data_attr_net_matrix embedding matrix, is wrong.
I try to run the Runme.py, in which the BlogCatalog set is trained. But when I used the embedding for node classification, the performance was terrible. The micro f1 was around 0.2, Why?
Hi,
Thanks for the code.
I tried your code on standard cora dataset. It gives me very poor results.
I could not understand the possible reasons. Could you provide some input.
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.