Commit ed5c3d9b authored by Laurens D'hooge's avatar Laurens D'hooge
Browse files

code safeguard against needless execution

parent b36edd7f
......@@ -12,6 +12,9 @@ df = None
d = "../../cic-ddos2019/clean"
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if os.path.exists(f"./HFBR-calculations/{os.path.splitext(subset)[0]}-HFBR-calculations.json"):
print(f"Already evaluated {subset}, skipping")
continue
full_path = os.path.join(d, subset)
print(f"Hierarchical Feature Block Selection calculations for {full_path}")
df = pd.read_parquet(full_path)
......@@ -141,14 +144,14 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
stack_raw = [nested_score["estimator"][i].best_estimator_.feature_importances_ for i in range(outer_cv_splits)]
stack = np.array(stack_raw)
print("stack shape", stack.shape)
print(stack)
# print("stack shape", stack.shape)
# print(stack)
stack = stack.transpose()
print("transposed stack shape", stack.shape)
print(stack)
# print("transposed stack shape", stack.shape)
# print(stack)
stack_rows = np.vsplit(stack, stack.shape[0])
print("vsplit stacks", len(stack_rows))
print(stack_rows)
# print("vsplit stacks", len(stack_rows))
# print(stack_rows)
friedman, p_friedman = friedmanchisquare(*stack_rows)
print('stat=%.3f, p=%.6f' % (friedman, p_friedman))
if p_friedman > 0.05:
......@@ -173,17 +176,17 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if len(high_index) == 1 and len(low_index) == 1:
# print("high feature under consideration:", remaining_columns[high_index[0]], "importance_avg", av[high_index[0]], "importances", stack_rows[high_index[0]])
# print("low feature under consideration:", remaining_columns[low_index[0]], "importance_avg", av[low_index[0]], "importances", stack_rows[low_index[0]])
print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
# print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
# print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
wilcox_descending_feature_pairs = np.append(wilcox_descending_feature_pairs, np.array([remaining_columns[high_index[0]], remaining_columns[low_index[0]]]))
wilcox, p_wilcox = wilcoxon(stack_rows[high_index[0]].flatten(), stack_rows[low_index[0]].flatten(), alternative='greater')
wilcox_p_array = np.append(wilcox_p_array, p_wilcox)
print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
# print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
if p_wilcox > 0.05:
print("don't reject h0")
# print("don't reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, False)
else:
print("reject h0")
# print("reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, True)
else:
......
......@@ -12,6 +12,9 @@ df = None
d = "../../cic-dos2017/clean"
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if os.path.exists(f"./HFBR-calculations/{os.path.splitext(subset)[0]}-HFBR-calculations.json"):
print(f"Already evaluated {subset}, skipping")
continue
full_path = os.path.join(d, subset)
print(f"Hierarchical Feature Block Selection calculations for {full_path}")
df = pd.read_parquet(full_path)
......@@ -141,14 +144,14 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
stack_raw = [nested_score["estimator"][i].best_estimator_.feature_importances_ for i in range(outer_cv_splits)]
stack = np.array(stack_raw)
print("stack shape", stack.shape)
print(stack)
# print("stack shape", stack.shape)
# print(stack)
stack = stack.transpose()
print("transposed stack shape", stack.shape)
print(stack)
# print("transposed stack shape", stack.shape)
# print(stack)
stack_rows = np.vsplit(stack, stack.shape[0])
print("vsplit stacks", len(stack_rows))
print(stack_rows)
# print("vsplit stacks", len(stack_rows))
# print(stack_rows)
friedman, p_friedman = friedmanchisquare(*stack_rows)
print('stat=%.3f, p=%.6f' % (friedman, p_friedman))
if p_friedman > 0.05:
......@@ -173,17 +176,17 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if len(high_index) == 1 and len(low_index) == 1:
# print("high feature under consideration:", remaining_columns[high_index[0]], "importance_avg", av[high_index[0]], "importances", stack_rows[high_index[0]])
# print("low feature under consideration:", remaining_columns[low_index[0]], "importance_avg", av[low_index[0]], "importances", stack_rows[low_index[0]])
print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
# print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
# print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
wilcox_descending_feature_pairs = np.append(wilcox_descending_feature_pairs, np.array([remaining_columns[high_index[0]], remaining_columns[low_index[0]]]))
wilcox, p_wilcox = wilcoxon(stack_rows[high_index[0]].flatten(), stack_rows[low_index[0]].flatten(), alternative='greater')
wilcox_p_array = np.append(wilcox_p_array, p_wilcox)
print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
# print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
if p_wilcox > 0.05:
print("don't reject h0")
# print("don't reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, False)
else:
print("reject h0")
# print("reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, True)
else:
......
......@@ -12,7 +12,8 @@ df = None
d = "../../cic-ids2017/clean"
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if d.startswith('cicids2017'):
if os.path.exists(f"./HFBR-calculations/{os.path.splitext(subset)[0]}-HFBR-calculations.json"):
print(f"Already evaluated {subset}, skipping")
continue
full_path = os.path.join(d, subset)
print(f"Hierarchical Feature Block Selection calculations for {full_path}")
......@@ -143,14 +144,14 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
stack_raw = [nested_score["estimator"][i].best_estimator_.feature_importances_ for i in range(outer_cv_splits)]
stack = np.array(stack_raw)
print("stack shape", stack.shape)
print(stack)
# print("stack shape", stack.shape)
# print(stack)
stack = stack.transpose()
print("transposed stack shape", stack.shape)
print(stack)
# print("transposed stack shape", stack.shape)
# print(stack)
stack_rows = np.vsplit(stack, stack.shape[0])
print("vsplit stacks", len(stack_rows))
print(stack_rows)
# print("vsplit stacks", len(stack_rows))
# print(stack_rows)
friedman, p_friedman = friedmanchisquare(*stack_rows)
print('stat=%.3f, p=%.6f' % (friedman, p_friedman))
if p_friedman > 0.05:
......@@ -175,17 +176,17 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if len(high_index) == 1 and len(low_index) == 1:
# print("high feature under consideration:", remaining_columns[high_index[0]], "importance_avg", av[high_index[0]], "importances", stack_rows[high_index[0]])
# print("low feature under consideration:", remaining_columns[low_index[0]], "importance_avg", av[low_index[0]], "importances", stack_rows[low_index[0]])
print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
# print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
# print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
wilcox_descending_feature_pairs = np.append(wilcox_descending_feature_pairs, np.array([remaining_columns[high_index[0]], remaining_columns[low_index[0]]]))
wilcox, p_wilcox = wilcoxon(stack_rows[high_index[0]].flatten(), stack_rows[low_index[0]].flatten(), alternative='greater')
wilcox_p_array = np.append(wilcox_p_array, p_wilcox)
print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
# print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
if p_wilcox > 0.05:
print("don't reject h0")
# print("don't reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, False)
else:
print("reject h0")
# print("reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, True)
else:
......
......@@ -11,7 +11,10 @@ df = None
ds = ["../../cidds-001/clean/traffic/ExternalServer", "../../cidds-001/clean/traffic/OpenStack"]
for d in ds:
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if os.path.exists(f"./HFBR-calculations/{os.path.splitext(subset)[0]}-HFBR-calculations.json"):
print(f"Already evaluated {subset}, skipping")
continue
full_path = os.path.join(d, subset)
print(f"Hierarchical Feature Block Selection calculations for {full_path}")
df = pd.read_parquet(full_path)
......@@ -158,14 +161,14 @@ for d in ds:
stack_raw = [nested_score["estimator"][i].best_estimator_.feature_importances_ for i in range(outer_cv_splits)]
stack = np.array(stack_raw)
print("stack shape", stack.shape)
print(stack)
# print("stack shape", stack.shape)
# print(stack)
stack = stack.transpose()
print("transposed stack shape", stack.shape)
print(stack)
# print("transposed stack shape", stack.shape)
# print(stack)
stack_rows = np.vsplit(stack, stack.shape[0])
print("vsplit stacks", len(stack_rows))
print(stack_rows)
# print("vsplit stacks", len(stack_rows))
# print(stack_rows)
friedman, p_friedman = friedmanchisquare(*stack_rows)
print('stat=%.3f, p=%.6f' % (friedman, p_friedman))
if p_friedman > 0.05:
......@@ -190,17 +193,17 @@ for d in ds:
if len(high_index) == 1 and len(low_index) == 1:
# print("high feature under consideration:", remaining_columns[high_index[0]], "importance_avg", av[high_index[0]], "importances", stack_rows[high_index[0]])
# print("low feature under consideration:", remaining_columns[low_index[0]], "importance_avg", av[low_index[0]], "importances", stack_rows[low_index[0]])
print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
# print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
# print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
wilcox_descending_feature_pairs = np.append(wilcox_descending_feature_pairs, np.array([remaining_columns[high_index[0]], remaining_columns[low_index[0]]]))
wilcox, p_wilcox = wilcoxon(stack_rows[high_index[0]].flatten(), stack_rows[low_index[0]].flatten(), alternative='greater')
wilcox_p_array = np.append(wilcox_p_array, p_wilcox)
print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
# print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
if p_wilcox > 0.05:
print("don't reject h0")
# print("don't reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, False)
else:
print("reject h0")
# print("reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, True)
else:
......
......@@ -10,7 +10,10 @@ from statsmodels.stats.multitest import fdrcorrection
df = None
d = "../../cidds-002/clean/traffic"
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if os.path.exists(f"./HFBR-calculations/{os.path.splitext(subset)[0]}-HFBR-calculations.json"):
print(f"Already evaluated {subset}, skipping")
continue
full_path = os.path.join(d, subset)
print(f"Hierarchical Feature Block Selection calculations for {full_path}")
df = pd.read_parquet(full_path)
......@@ -156,14 +159,14 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
stack_raw = [nested_score["estimator"][i].best_estimator_.feature_importances_ for i in range(outer_cv_splits)]
stack = np.array(stack_raw)
print("stack shape", stack.shape)
print(stack)
# print("stack shape", stack.shape)
# print(stack)
stack = stack.transpose()
print("transposed stack shape", stack.shape)
print(stack)
# print("transposed stack shape", stack.shape)
# print(stack)
stack_rows = np.vsplit(stack, stack.shape[0])
print("vsplit stacks", len(stack_rows))
print(stack_rows)
# print("vsplit stacks", len(stack_rows))
# print(stack_rows)
friedman, p_friedman = friedmanchisquare(*stack_rows)
print('stat=%.3f, p=%.6f' % (friedman, p_friedman))
if p_friedman > 0.05:
......@@ -188,17 +191,17 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if len(high_index) == 1 and len(low_index) == 1:
# print("high feature under consideration:", remaining_columns[high_index[0]], "importance_avg", av[high_index[0]], "importances", stack_rows[high_index[0]])
# print("low feature under consideration:", remaining_columns[low_index[0]], "importance_avg", av[low_index[0]], "importances", stack_rows[low_index[0]])
print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
# print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
# print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
wilcox_descending_feature_pairs = np.append(wilcox_descending_feature_pairs, np.array([remaining_columns[high_index[0]], remaining_columns[low_index[0]]]))
wilcox, p_wilcox = wilcoxon(stack_rows[high_index[0]].flatten(), stack_rows[low_index[0]].flatten(), alternative='greater')
wilcox_p_array = np.append(wilcox_p_array, p_wilcox)
print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
# print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
if p_wilcox > 0.05:
print("don't reject h0")
# print("don't reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, False)
else:
print("reject h0")
# print("reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, True)
else:
print("average feature importances at low indices", av[low_index])
......
......@@ -145,14 +145,14 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
stack_raw = [nested_score["estimator"][i].best_estimator_.feature_importances_ for i in range(outer_cv_splits)]
stack = np.array(stack_raw)
print("stack shape", stack.shape)
print(stack)
# print("stack shape", stack.shape)
# print(stack)
stack = stack.transpose()
print("transposed stack shape", stack.shape)
print(stack)
# print("transposed stack shape", stack.shape)
# print(stack)
stack_rows = np.vsplit(stack, stack.shape[0])
print("vsplit stacks", len(stack_rows))
print(stack_rows)
# print("vsplit stacks", len(stack_rows))
# print(stack_rows)
friedman, p_friedman = friedmanchisquare(*stack_rows)
print('stat=%.3f, p=%.6f' % (friedman, p_friedman))
if p_friedman > 0.05:
......@@ -177,17 +177,17 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if len(high_index) == 1 and len(low_index) == 1:
# print("high feature under consideration:", remaining_columns[high_index[0]], "importance_avg", av[high_index[0]], "importances", stack_rows[high_index[0]])
# print("low feature under consideration:", remaining_columns[low_index[0]], "importance_avg", av[low_index[0]], "importances", stack_rows[low_index[0]])
print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
# print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
# print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
wilcox_descending_feature_pairs = np.append(wilcox_descending_feature_pairs, np.array([remaining_columns[high_index[0]], remaining_columns[low_index[0]]]))
wilcox, p_wilcox = wilcoxon(stack_rows[high_index[0]].flatten(), stack_rows[low_index[0]].flatten(), alternative='greater')
wilcox_p_array = np.append(wilcox_p_array, p_wilcox)
print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
# print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
if p_wilcox > 0.05:
print("don't reject h0")
# print("don't reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, False)
else:
print("reject h0")
# print("reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, True)
else:
......
......@@ -15,6 +15,9 @@ ds.append(f"{d}/all")
for d in ds:
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if os.path.exists(f"./HFBR-calculations/{os.path.splitext(subset)[0]}-HFBR-calculations.json"):
print(f"Already evaluated {subset}, skipping")
continue
full_path = os.path.join(d, subset)
print(f"Hierarchical Feature Block Selection calculations for {full_path}")
df = pd.read_parquet(full_path)
......@@ -141,14 +144,14 @@ for d in ds:
stack_raw = [nested_score["estimator"][i].best_estimator_.feature_importances_ for i in range(outer_cv_splits)]
stack = np.array(stack_raw)
print("stack shape", stack.shape)
print(stack)
# print("stack shape", stack.shape)
# print(stack)
stack = stack.transpose()
print("transposed stack shape", stack.shape)
print(stack)
# print("transposed stack shape", stack.shape)
# print(stack)
stack_rows = np.vsplit(stack, stack.shape[0])
print("vsplit stacks", len(stack_rows))
print(stack_rows)
# print("vsplit stacks", len(stack_rows))
# print(stack_rows)
friedman, p_friedman = friedmanchisquare(*stack_rows)
print('stat=%.3f, p=%.6f' % (friedman, p_friedman))
if p_friedman > 0.05:
......@@ -173,17 +176,17 @@ for d in ds:
if len(high_index) == 1 and len(low_index) == 1:
# print("high feature under consideration:", remaining_columns[high_index[0]], "importance_avg", av[high_index[0]], "importances", stack_rows[high_index[0]])
# print("low feature under consideration:", remaining_columns[low_index[0]], "importance_avg", av[low_index[0]], "importances", stack_rows[low_index[0]])
print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
# print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
# print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
wilcox_descending_feature_pairs = np.append(wilcox_descending_feature_pairs, np.array([remaining_columns[high_index[0]], remaining_columns[low_index[0]]]))
wilcox, p_wilcox = wilcoxon(stack_rows[high_index[0]].flatten(), stack_rows[low_index[0]].flatten(), alternative='greater')
wilcox_p_array = np.append(wilcox_p_array, p_wilcox)
print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
# print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
if p_wilcox > 0.05:
print("don't reject h0")
# print("don't reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, False)
else:
print("reject h0")
# print("reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, True)
else:
......
......@@ -11,23 +11,10 @@ from statsmodels.stats.multitest import fdrcorrection
df = None
d = "../../iscx-ids2012/clean"
atk_types = {
'TestbedMonJun14Flows.parquet': [],
'TestbedThuJun17-3Flows.parquet': [],
'TestbedWedJun16-2Flows.parquet': [],
'TestbedSunJun13Flows.parquet': [],
'TestbedWedJun16-1Flows.parquet': [],
'TestbedSatJun12Flows.parquet': [],
'TestbedThuJun17-2Flows.parquet': [],
'TestbedTueJun15-3Flows.parquet': [],
'TestbedWedJun16-3Flows.parquet': [],
'TestbedTueJun15-2Flows.parquet': [],
'TestbedTueJun15-1Flows.parquet': [],
'TestbedThuJun17-1Flows.parquet': [],
'iscx-ids2012.parquet': []
}
for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if os.path.exists(f"./HFBR-calculations/{os.path.splitext(subset)[0]}-HFBR-calculations.json"):
print(f"Already evaluated {subset}, skipping")
continue
full_path = os.path.join(d, subset)
print(f"Hierarchical Feature Block Selection calculations for {full_path}")
df = pd.read_parquet(full_path)
......@@ -158,14 +145,14 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
stack_raw = [nested_score["estimator"][i].best_estimator_.feature_importances_ for i in range(outer_cv_splits)]
stack = np.array(stack_raw)
print("stack shape", stack.shape)
print(stack)
# print("stack shape", stack.shape)
# print(stack)
stack = stack.transpose()
print("transposed stack shape", stack.shape)
print(stack)
# print("transposed stack shape", stack.shape)
# print(stack)
stack_rows = np.vsplit(stack, stack.shape[0])
print("vsplit stacks", len(stack_rows))
print(stack_rows)
# print("vsplit stacks", len(stack_rows))
# print(stack_rows)
friedman, p_friedman = friedmanchisquare(*stack_rows)
print('stat=%.3f, p=%.6f' % (friedman, p_friedman))
if p_friedman > 0.05:
......@@ -190,17 +177,17 @@ for subset in [d for d in os.listdir(d) if d.endswith('.parquet')]:
if len(high_index) == 1 and len(low_index) == 1:
# print("high feature under consideration:", remaining_columns[high_index[0]], "importance_avg", av[high_index[0]], "importances", stack_rows[high_index[0]])
# print("low feature under consideration:", remaining_columns[low_index[0]], "importance_avg", av[low_index[0]], "importances", stack_rows[low_index[0]])
print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
# print("high feature avg contrib", remaining_columns[high_index[0]], ": ", av[high_index[0]])
# print("low feature avg contrib", remaining_columns[low_index[0]], ": ", av[low_index[0]])
wilcox_descending_feature_pairs = np.append(wilcox_descending_feature_pairs, np.array([remaining_columns[high_index[0]], remaining_columns[low_index[0]]]))
wilcox, p_wilcox = wilcoxon(stack_rows[high_index[0]].flatten(), stack_rows[low_index[0]].flatten(), alternative='greater')
wilcox_p_array = np.append(wilcox_p_array, p_wilcox)
print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
# print('1-SIDE wilcox stat=%.3f, p=%.6f' % (wilcox, p_wilcox))
if p_wilcox > 0.05:
print("don't reject h0")
# print("don't reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, False)
else:
print("reject h0")
# print("reject h0")
wilcox_p_reject = np.append(wilcox_p_reject, True)
else:
......
{
"dataset": "iscxids2012",
"subset": "TestbedSunJun13Flows",
"atk_types": [],
"test_sizes": [
0.95,
0.94,
0.93,
0.92,
0.91,
0.9,
0.875,
0.85
],
"remaining_features": [
"app_name_AOL-ICQ",
"app_name_Anet",
"app_name_Authentication",
"app_name_BGP",
"app_name_BitTorrent",
"app_name_Citrix",
"app_name_Common-P2P-Port",
"app_name_FTP",
"app_name_Filenet",
"app_name_Flowgen",
"app_name_Gnutella",
"app_name_Google",
"app_name_Groove",
"app_name_H.323",
"app_name_HTTPWeb",
"app_name_Hosts2-Ns",
"app_name_Hotline",
"app_name_IMAP",
"app_name_IPSec",
"app_name_IRC",
"app_name_Ingres",
"app_name_Intellex",
"app_name_LDAP",
"app_name_MDQS",
"app_name_MS-SQL",
"app_name_MSMQ",
"app_name_MSN",
"app_name_MSTerminalServices",
"app_name_ManagementServices",
"app_name_MicrosoftMediaServer",
"app_name_Misc-DB",
"app_name_Misc-Mail-Port",
"app_name_Misc-Ports",
"app_name_MiscApp",
"app_name_MiscApplication",
"app_name_NETBEUI",
"app_name_NFS",
"app_name_NNTPNews",
"app_name_NetBIOS-IP",
"app_name_Network-Config-Ports",
"app_name_NortonAntiVirus",
"app_name_OpenNap",
"app_name_Oracle",
"app_name_PCAnywhere",
"app_name_POP",
"app_name_POP-port",
"app_name_PPTP",
"app_name_PostgreSQL",
"app_name_Printer",
"app_name_RPC",
"app_name_RTSP",
"app_name_Real",
"app_name_SMS",
"app_name_SMTP",
"app_name_SNMP-Ports",
"app_name_SSL-Shell",
"app_name_SecureWeb",
"app_name_Squid",
"app_name_StreamingAudio",
"app_name_SunRPC",
"app_name_Tacacs",
"app_name_Telnet",
"app_name_Timbuktu",
"app_name_TimeServer",
"app_name_Unknown_TCP",
"app_name_Unknown_UDP",
"app_name_VNC",
"app_name_Webmin",
"app_name_WindowsFileSharing",
"app_name_XFER",
"app_name_XWindows",
"app_name_Yahoo",
"app_name_dsp3270",
"app_name_rexec",
"app_name_rlogin",
"app_name_rsh",
"total_source_bytes",
"total_destination_bytes",
"direction_L2R",
"direction_R2L",
"direction_R2R",
"source_tcp_flags_f",
"source_tcp_flags_s",
"source_tcp_flags_r",
"destination_tcp_flags_f",
"destination_tcp_flags_r",
"proto_icmp_ip"
],
"test_scores": [],
"test_score_avg": [],
"test_score_std": [],
"stack_rows": [],
"wilcox_descending_feature_pairs": [],
"wilcox_p_array": [],
"wilcox_p_reject_non_corrected": [],
"wilcox_p_array_corrected": [],
"wilcox_p_reject_corrected": [],
"zero_variance_after_balance": [