PyCharm激活2023.2.4(BiNE(2023.2.3)-已初步跑通,博客已记录理论.zip)

PyCharm激活2023.2.4(BiNE(2023.2.3)-已初步跑通,博客已记录理论.zip)

# BiNE: Bipartite Network Embedding This repository contains the demo code of the paper: > BiNE: Bipartite Network Embedding. Ming Gao, Leihui Chen, Xiangnan He & Aoying Zhou which has been accepted by SIGIR2018. `Note`: Any problems, you can contact me at [leihuichen@gmail.com](mailto:leihuichen@gmail.com). Through email, you will get my rapid response. ## Environment settings – python==2.7.11 – numpy==1.13.3 – sklearn==0.17.1 – networkx==1.11 – datasketch==1.2.5 – scipy==0.17.0 – six==1.10.0 ## Basic Usage Main Parameters: “` Input graph path. Defult is ‘https://download.csdn.net/download/data/rating_train.dat’ (–train-data) Test dataset path. Default is ‘https://download.csdn.net/download/data/rating_test.dat’ (–test-data) Name of model. Default is ‘default’ (–model-name) Number of dimensions. Default is 128 (–d) Number of negative samples. Default is 4 (–ns) Size of window. Default is 5 (–ws) Trade-off parameter $alpha$. Default is 0.01 (–alpha) Trade-off parameter $beta$. Default is 0.01 (–beta) Trade-off parameter $gamma$. Default is 0.1 (–gamma) Learning rate $lambda$. Default is 0.01 (–lam) Maximal iterations. Default is 50 (–max-iters) Maximal walks per vertex. Default is 32 (–maxT) Minimal walks per vertex. Default is 1 (–minT) Walk stopping probability. Default is 0.15 (–p) Calculate the recommendation metrics. Default is 0 (–rec) Calculate the link prediction. Default is 0 (–lip) File of training data for LR. Default is ‘https://download.csdn.net/download/data/wiki/case_train.dat’ (–case-train) File of testing data for LR. Default is ‘https://download.csdn.net/download/data/wiki/case_test.dat’ (–case-test) File of embedding vectors of U. Default is ‘https://download.csdn.net/download/data/vectors_u.dat’ (–vectors-u) File of embedding vectors of V. Default is ‘https://download.csdn.net/download/data/vectors_v.dat’ (–vectors-v) For large bipartite, 1 do not generate homogeneous graph file; 2 do not generate homogeneous graph. Default is 0 (–large) Mertics of centrality. Default is ‘hits’, options: ‘hits’ and ‘degree_centrality’ (–mode) “` Usage We provide two processed dataset: – DBLP (for recommendation). It contains: – A training dataset https://download.csdn.net/download/_/data/dblp/rating_train.dat – A testing dataset https://download.csdn.net/download/_/data/dblp/rating_test.dat – Wikipedia (for link prediction). It contains: – A training dataset https://download.csdn.net/download/_/data/wiki/rating_train.dat – A testing dataset https://download.csdn.net/download/_/data/wiki/rating_test.dat – Each line is a instance: userID (begin with ‘u’) itemID (begin with ‘i’) weight For example: u0 i0 1 Please run the ‘https://download.csdn.net/download/_/model/train.py’ “` cd model python train.py –train-data https://download.csdn.net/download/data/dblp/rating_train.dat –test-data https://download.csdn.net/download/data/dblp/rating_test.dat –lam 0.025 –max-iter 100 –model-name dblp –rec 1 –large 2 –vectors-u https://download.csdn.net/download/data/dblp/vectors_u.dat –vectors-v https://download.csdn.net/download/data/dblp/vectors_v.dat “` The embedding vectors of nodes are saved in file ‘/model-name/vectors_u.dat’ and ‘/model-name/vectors_v.dat’, respectively. ## Example Recommendation Run “` cd model python train.py –train-data https://download.csdn.net/download/data/dblp/rating_train.dat –test-data https://download.csdn.net/download/data/dblp/rating_test.dat –lam 0.025 –max-iter 100 –model-name dblp –rec 1 –large 2 –vectors-u https://download.csdn.net/download/data/dblp/vectors_u.dat –vectors-v https://download.csdn.net/download/data/dblp/vectors_v.dat “` Output (training process) “` ======== experiment settings ========= alpha : 0.0100, beta : 0.0100, gamma : 0.1000, lam : 0.0250, p : 0.1500, ws : 5, ns : 4, maxT : 32, minT : 1, max_iter : 100 ========== processing data =========== constructing graph…. number of nodes: 6001 walking… walking…ok number of nodes: 1177 walking… walking…ok getting context and negative samples…. negative samples is ok….. context… context…ok context… context…ok ============== training ============== [* ]100.00% “` Output (testing process) “` ============== testing =============== recommendation metrics: F1 : 0.1132, MAP : 0.2041, MRR : 0.3331, NDCG : 0.2609 “` Link Prediction Run “` cd model python train.py –train-data https://download.csdn.net/download/data/wiki/rating_train.dat –test-data https://download.csdn.net/download/data/wiki/rating_test.dat –lam 0.01 –max-iter 100 –model-name wiki –lip 1 –large 2 –gamma 1 –vectors-u https://download.csdn.net/download/data/wiki/vectors_u.dat –vectors-v https://download.csdn.net/download/data/wiki/vectors_v.dat –case-train https://download.csdn.net/download/data/wiki/case_train.dat –case-test https://download.csdn.net/download/data/wiki/case_test.dat “` Output (training process) “` ======== experiment settings ========= alpha : 0.0100, beta : 0.0100, gamma : 1.0000, lam : 0.0100, p : 0.1500, ws : 5, ns : 4, maxT : 32, minT : 1, max_iter : 100, d : 128 ========== processing data =========== constructing graph…. number of nodes: 15000 walking… walking…ok number of nodes: 2529 walking… walking…ok getting context and negative samples…. negative samples is ok….. context… context…ok context… context…ok ============== training ============== [* ]100.00% “` Output (testing process) “` ============== testing =============== link prediction metrics:PyCharm激活2023.2.4 AUC_ROC : 0.9468, AUC_PR : 0. PyCharm激活2023.2.49614 “`

2024最新激活全家桶教程,稳定运行到2099年,请移步至置顶文章:https://sigusoft.com/99576.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。 文章由激活谷谷主-小谷整理,转载请注明出处:https://sigusoft.com/138884.html

(0)
上一篇 2024年 6月 25日 下午3:56
下一篇 2024年 6月 25日 下午4:06

相关推荐

关注微信