-
Notifications
You must be signed in to change notification settings - Fork 130
Description
TypeError Traceback (most recent call last)
*******\dga_predict-master\run.py in
93
94 if name == "main":
---> 95 create_figs(nfolds=1) # Run with 1 to make it fast
*******\dga_predict-master\run.py in create_figs(isbigram, islstm, nfolds, force)
32 # Generate results if needed
33 if force or (not os.path.isfile(RESULT_FILE)):
---> 34 bigram_results, lstm_results = run_experiments(isbigram, islstm, nfolds)
35
36 results = {'bigram': bigram_results, 'lstm': lstm_results}
*******\dga_predict-master\run.py in run_experiments(isbigram, islstm, nfolds)
21
22 if isbigram:
---> 23 bigram_results = bigram.run(nfolds=nfolds)
24
25 if islstm:
*******\dga_predict-master\dga_classifier\bigram.py in run(max_epoch, nfolds, batch_size)
21 def run(max_epoch=50, nfolds=10, batch_size=128):
22 """Run train/test on logistic regression model"""
---> 23 indata = data.get_data()
24
25 # Extract data and labels
*******\dga_predict-master\dga_classifier\data.py in get_data(force)
128 def get_data(force=False):
129 """Returns data and labels"""
--> 130 gen_data(force)
131
132 return pickle.load(open(DATA_FILE))
*******\dga_predict-master\dga_classifier\data.py in gen_data(force)
118 """
119 if force or (not os.path.isfile(DATA_FILE)):
--> 120 domains, labels = gen_malicious(10000)
121
122 # Get equal number of benign/malicious
*******\dga_predict-master\dga_classifier\data.py in gen_malicious(num_per_dga)
46 segs_size = max(1, num_per_dga/len(banjori_seeds))
47 for banjori_seed in banjori_seeds:
---> 48 domains += banjori.generate_domains(segs_size, banjori_seed)
49 labels += ['banjori']*segs_size
50
*******\dga_predict-master\dga_classifier\dga_generators\banjori.py in generate_domains(nr_domains, seed)
14 ret = []
15
---> 16 for int i in range(nr_domains):
17 seed = next_domain(seed)
18
TypeError: 'float' object cannot be interpreted as an integer
i keep getting this error can anyone please help me i'm not familiar with python coding thanks in advance