xiangyue9607 / BioNEV

Graph Embedding Evaluation / Code and Datasets for "Graph Embedding on Biomedical Networks: Methods, Applications, and Evaluations" (Bioinformatics 2020)
MIT License
224 stars 77 forks source link

testing_ratio #13

Closed cgf21st closed 4 years ago

cgf21st commented 4 years ago

Hi,I tried to change the training and test sets to 9: 1, but the ratio between the training and test sets did not change. For example: when testing_ratio = 0.1 and 0.2, the ratio of links between the original network and the training network is the same. How to solve it? Thank you

Original Graph: nodes: 1133 edges: 5451 Training Graph: nodes: 1133 edges: 4395

all esting_ratio:

Searching 'testing_ratio' in E:\puo\BioNEV-master\src*.py ... E:\puo\BioNEV-master\src\evaluation.py: 81: def NodeClassification(embedding_look_up, node_list, labels, testing_ratio, seed): E:\puo\BioNEV-master\src\evaluation.py: 84: testing_ratio=testing_ratio,seed=seed) E:\puo\BioNEV-master\src\main.py: 30: parser.add_argument('--testing_ratio', default=0.1, type=float, E:\puo\BioNEV-master\src\utils.py: 52: def split_train_test_graph(input_edgelist, seed, testing_ratio=0.1, weighted=False): E:\puo\BioNEV-master\src\utils.py: 60: testing_edges_num = int(len(G.edges) * testing_ratio) E:\puo\BioNEV-master\src\utils.py: 151: def split_train_test_classify(embedding_look_up, X, Y, seed, testing_ratio=0.1): E:\puo\BioNEV-master\src\utils.py: 153: training_ratio = 1 - testing_ratio Hits found: 7