Open 1sdv opened 1 week ago
In processing Data Preprocessing for Traffic Understanding Tasks,Why does this error occur when there is a .pcap file in the path: Traceback (most recent call last): File "pre-process/input_generation_understanding.py", line 384, in main() File "pre-process/input_generation_understanding.py", line 381, in main dataset_extract(args.random_seed, args.pcap_path, samples, args.middle_save_path, args.class_num) File "pre-process/input_generation_understanding.py", line 311, in dataset_extract for train_index, test_index in split_1.split(x_payload, dataset_label): File "/home/stu003/.conda/envs/netgpt1/lib/python3.8/site-packages/sklearn/model_selection/_split.py", line 2229, in split y = check_array(y, input_name="y", ensure_2d=False, dtype=None) File "/home/stu003/.conda/envs/netgpt1/lib/python3.8/site-packages/sklearn/utils/validation.py", line 967, in check_array raise ValueError( ValueError: Found array with 0 sample(s) (shape=(0,)) while a minimum of 1 is required. Could you please give me a detailed explanation of the function of each path and why an error occurs? Thank you
python pre-process/input_generation_generation.py --pcap_path "data/pcap/" --dataset_dir "data/generation/datasets/" --class_num 17 --middle_save_path "data/generation/result/" --random_seed 01 The storage format of the pcap files should meet the following structure in order to be correctly read.The specified folder should not directly contain pcap files.
In processing Data Preprocessing for Traffic Understanding Tasks,Why does this error occur when there is a .pcap file in the path: Traceback (most recent call last): File "pre-process/input_generation_understanding.py", line 384, in main() File "pre-process/input_generation_understanding.py", line 381, in main dataset_extract(args.random_seed, args.pcap_path, samples, args.middle_save_path, args.class_num) File "pre-process/input_generation_understanding.py", line 311, in dataset_extract for train_index, test_index in split_1.split(x_payload, dataset_label): File "/home/stu003/.conda/envs/netgpt1/lib/python3.8/site-packages/sklearn/model_selection/_split.py", line 2229, in split y = check_array(y, input_name="y", ensure_2d=False, dtype=None) File "/home/stu003/.conda/envs/netgpt1/lib/python3.8/site-packages/sklearn/utils/validation.py", line 967, in check_array raise ValueError( ValueError: Found array with 0 sample(s) (shape=(0,)) while a minimum of 1 is required. Could you please give me a detailed explanation of the function of each path and why an error occurs? Thank you
python pre-process/input_generation_generation.py --pcap_path "data/pcap/" --dataset_dir "data/generation/datasets/" --class_num 17 --middle_save_path "data/generation/result/" --random_seed 01 The storage format of the pcap files should meet the following structure in order to be correctly read.The specified folder should not directly contain pcap files.
Thank you very much for your reply, all best.
In processing Data Preprocessing for Traffic Understanding Tasks,Why does this error occur when there is a .pcap file in the path: Traceback (most recent call last): File "pre-process/input_generation_understanding.py", line 384, in
main()
File "pre-process/input_generation_understanding.py", line 381, in main
dataset_extract(args.random_seed, args.pcap_path, samples, args.middle_save_path, args.class_num)
File "pre-process/input_generation_understanding.py", line 311, in dataset_extract
for train_index, test_index in split_1.split(x_payload, dataset_label):
File "/home/stu003/.conda/envs/netgpt1/lib/python3.8/site-packages/sklearn/model_selection/_split.py", line 2229, in split
y = check_array(y, input_name="y", ensure_2d=False, dtype=None)
File "/home/stu003/.conda/envs/netgpt1/lib/python3.8/site-packages/sklearn/utils/validation.py", line 967, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0,)) while a minimum of 1 is required.
Could you please give me a detailed explanation of the function of each path and why an error occurs? Thank you