Skip to content
Snippets Groups Projects
Commit f5f22683 authored by Fize Jacques's avatar Fize Jacques
Browse files

Debug

parent 5149144a
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ parser.add_argument("graph_filename")
parser.add_argument("-n","--network-embedding",action="store_true",help="If you want to use neural network embedding for link prediction")
parser.add_argument("-v","--verbose",action="store_true")
parser.add_argument("-f","--format",default="gexf",choices=["gexf","gml","txt"])
parser.add_argument("-t","--train-frac",default=0.9,type=float)
args = parser.parse_args()
......@@ -41,9 +42,9 @@ log("Building link prediction dataset...")
# Create an evaluator and generate train/test edge split
traintest_split = LPEvalSplit()
try:
traintest_split.compute_splits(G, split_alg="spanning_tree", train_frac=0.9, fe_ratio=1)
traintest_split.compute_splits(G, split_alg="spanning_tree", train_frac=args.train_frac, fe_ratio=1)
except ValueError:
traintest_split.compute_splits(G, split_alg="fast", train_frac=0.9, fe_ratio=1)
traintest_split.compute_splits(G, split_alg="fast", train_frac=args.train_frac, fe_ratio=1)
nee = LPEvaluator(traintest_split)
log("Dataset Built !")
......
......@@ -19,7 +19,7 @@ args = parser.parse_args()
GRAPH_SIZE = [80,800]
EDGE_SIZE = [2,3]
sample_per_params = 1
sample_per_params = 4
OUTPUT_DIR = args.output_dir
if not os.path.exists(OUTPUT_DIR):
......@@ -27,22 +27,22 @@ if not os.path.exists(OUTPUT_DIR):
parameters = {
"stochastic_block_model_graph": {
"nb_nodes":GRAPH_SIZE,
"nb_edges":EDGE_SIZE,
"nb_com" :[2,5,8,16],
"percentage_edge_betw":[0.1,0.01]
},
"ER_graph": {
"nb_nodes":GRAPH_SIZE,
"nb_edges":EDGE_SIZE
},
"powerlaw_graph": { # configuration_model
"nb_nodes":GRAPH_SIZE,
"nb_edges":EDGE_SIZE,
"exponent":[2,3],
"tries":[100]
},
# "stochastic_block_model_graph": {
# "nb_nodes":GRAPH_SIZE,
# "nb_edges":EDGE_SIZE,
# "nb_com" :[2,5,8,16],
# "percentage_edge_betw":[0.1,0.01]
# },
# "ER_graph": {
# "nb_nodes":GRAPH_SIZE,
# "nb_edges":EDGE_SIZE
# },
# "powerlaw_graph": { # configuration_model
# "nb_nodes":GRAPH_SIZE,
# "nb_edges":EDGE_SIZE,
# "exponent":[2,3],
# "tries":[100]
# },
"spatial_graph":{
"nb_nodes":GRAPH_SIZE,
"nb_edges":EDGE_SIZE,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment