sunshinelium / bi-tgcf Goto Github PK
View Code? Open in Web Editor NEWCross Domain Recommendation via Bi-directional Transfer Graph Collaborative Filtering Networks
Cross Domain Recommendation via Bi-directional Transfer Graph Collaborative Filtering Networks
for k in range(0, self.n_layers):
if self.layer_fun == 'gcf':
ego_embeddings_s = one_graph_layer_gcf(A_fold_hat_s, ego_embeddings_s, weights_s, k)
ego_embeddings_t = one_graph_layer_gcf(A_fold_hat_t, ego_embeddings_t, weights_t, k)
if k >= self.n_layers - self.n_interaction and self.n_interaction > 0:
if self.fuse_type_in == 'la2add':
ego_embeddings_s, ego_embeddings_t = self.s_t_la2add_layer(ego_embeddings_s, ego_embeddings_t,
self.lambda_s, self.lambda_t,
self.domain_laplace)
norm_embeddings_s = tf.math.l2_normalize(ego_embeddings_s, axis=1)
norm_embeddings_t = tf.math.l2_normalize(ego_embeddings_t, axis=1)
if self.connect_way == 'concat':
all_embeddings_s += [norm_embeddings_s]
all_embeddings_t += [norm_embeddings_t]
elif self.connect_way == 'mean':
all_embeddings_s += norm_embeddings_s
all_embeddings_t += norm_embeddings_t
if self.connect_way == 'concat':
all_embeddings_s = tf.concat(all_embeddings_s, 1)
all_embeddings_t = tf.concat(all_embeddings_t, 1)
elif self.connect_way == 'mean':
all_embeddings_s = all_embeddings_s / (self.n_layers + 1)
all_embeddings_t = all_embeddings_t / (self.n_layers + 1)
where
norm_embeddings_s = tf.math.l2_normalize(ego_embeddings_s, axis=1)
norm_embeddings_t = tf.math.l2_normalize(ego_embeddings_t, axis=1)
if self.connect_way == 'concat':
all_embeddings_s += [norm_embeddings_s]
all_embeddings_t += [norm_embeddings_t]
elif self.connect_way == 'mean':
all_embeddings_s += norm_embeddings_s
all_embeddings_t += norm_embeddings_t
why you add norm_embedding to all_embeddings_s?
this code is not consistent with paper !!!
I re-run code as follow
CUDA_VISIBLE_DEVICES=0 python main.py --dataset=electronic_cell --n_interaction=3 --lambda_s=0.8 --lambda_t=0.8
CUDA_VISIBLE_DEVICES=1 python main.py --dataset=sport_cloth --n_interaction=3 --lambda_s=0.8 --lambda_t=0.8
CUDA_VISIBLE_DEVICES=2 python main.py --dataset=sport_cell --n_interaction=3 --lambda_s=0.8 --lambda_t=0.8
CUDA_VISIBLE_DEVICES=3 python main.py --dataset=electronic_cloth --n_interaction=3 --lambda_s=0.8 --lambda_t=0.8
and dataset generated by run filter_data.py
and split_data
but I get thus a result
did I have missed sth?
python main.py --dataset=elctronic_cell --n_interaction=3 --lambda_s=0.8 --lambda_t=0.8
--dataset=electronic_cell
like Data/cell_electronic/test_neg.txt
(106, 4600) 17037 11407 4007 10178 10584 4040 99 3451 2321 14557 16163 2996 12846 18027 3805 7551 15982 4600 3723 5667 7757 5627 14929 10718 297 17987 10634 11107 15151 10266 3594 16745 6374 12093 6135 9844 33 11378 13414 7902 17912 7149 8087 7470 9711 4958 1365 17630 2614 5350 8084 16607 10717 3411 17361 285 8716 12207 8854 6255 236 4583 4104 9766 8293 17180 2031 11024 9030 11069 6409 733 8985 12556 1087 4484 15439 8946 13347 6392 751 3492 310 11914 517 1559 10802 11511 7805 12077 9566 15255 14444 14277 14666 15099 85 13681 9042
您好!可以提供另外三组数据集吗?
I try to use filter_data.py and split_data.py to generate cell_electronic dataset by origin amazon rating file
but there are 20447 user, which is different from you git repo ./Data. How can I reproduce this dataset?
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.