modified: anchor.py
This commit is contained in:
parent
f2689d8cb0
commit
75d72a8c6c
12
anchor.py
12
anchor.py
|
|
@ -112,7 +112,7 @@ def handle_cas(args):
|
|||
cascades_total = 0
|
||||
|
||||
# t_min_cas = -1
|
||||
# t_min_all = 0
|
||||
t_min_all = args.t_min
|
||||
|
||||
with open(filename) as file:
|
||||
for line in file:
|
||||
|
|
@ -155,9 +155,9 @@ def handle_cas(args):
|
|||
if len(activation_times) < args.cas_min_length:
|
||||
print(f"Too short Cas! Cas_id:{cascade_id}")
|
||||
continue
|
||||
# if t_min > t_min_all:
|
||||
# t_min_all = t_min
|
||||
# t_min_cas = cascade_id
|
||||
if t_min > args.t_max or t_min < args.t_min:
|
||||
print(f"Cas is not in proper time! Cas_id:{cascade_id}")
|
||||
continue
|
||||
|
||||
for k,v in activation_times.items():
|
||||
event_user_dict[cascade_id].append(k)
|
||||
|
|
@ -548,8 +548,10 @@ def parse_args():
|
|||
parser.add_argument('--obs_cas_num', default=-1, type=int, help='Anchors observe cas num')
|
||||
parser.add_argument('--obs_time', default=-1, type=int, help='Anchors observe time, default seeting is -1, meaning can observe all')
|
||||
parser.add_argument('--key_node_file', default='/home/zjy/project/CasDO/dataset/nh/key_node_10', type=str, help='key_node_json save file')
|
||||
parser.add_argument('--anchor_screen', default=-0.4, type=float, help='anchor_screen')
|
||||
parser.add_argument('--anchor_screen', default=-0.8, type=float, help='anchor_screen')
|
||||
parser.add_argument('--cas_min_length', default=20, type=int, help='Cas min length')
|
||||
parser.add_argument('--t_max', default=1751299200, type=int, help='Cas min length')
|
||||
parser.add_argument('--t_min', default=1751299200, type=int, help='Cas min length')
|
||||
return parser.parse_args()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user