diff --git a/eval_mixed_model.py b/eval_mixed_model.py index 36a16b48c24da7e742263fc6105b49df34a3aa05..4df102adec9688693159603ec9349236ccab1871 100644 --- a/eval_mixed_model.py +++ b/eval_mixed_model.py @@ -39,9 +39,11 @@ parser.add_argument("alpha",type=float) parser.add_argument("nb_iterations",type=int) parser.add_argument('-f', '--features', help='Feature(s) used in the model training', type=str) parser.add_argument("-v","--verbose",action="store_true") +parser.add_argument("-t","--timeout",default=30,type=int) args= parser.parse_args() +# COMMAND LINE ARGS VALUES GRAPH_NODE_NB = args.nb_nodes GRAPH_EDGE_NB = args.nb_edges ALPHA = args.alpha @@ -49,7 +51,8 @@ NB_COM = args.nb_com NB_ITERATION = args.nb_iterations VERBOSE = args.verbose FEATURES = set(args.features.split(",")) -TIMEOUT = 60 +TIMEOUT = args.timeout + dist = lambda a,b : np.linalg.norm(a-b)**2 hash_func = lambda x:"_".join(sorted([str(x[0]),str(x[1])])) @@ -63,7 +66,7 @@ def get_aucs(G): auc_spatial = nee.evaluate_baseline(method="spatial_link_prediction",timeout=TIMEOUT).test_scores.auroc() auc_sbm = nee.evaluate_baseline(method="stochastic_block_model",timeout=TIMEOUT).test_scores.auroc() except: - print("Could not compuyte AUC ! ") + print("Could not compute AUC ! ") return auc_sbm,auc_spatial dist = lambda a,b : np.linalg.norm(a-b)