Giter Site home page Giter Site logo

ddos-deeplearning-approach's Issues

关于第二次使用load_feature加载攻击流量特征得到空list的问题

你好!我是小菜鸟,最近在学习您的项目对流量进行处理,我想通过udp.csv从不同的pcap文件里取两个攻击集,您的源码如下:
attack_label_dict = load_label("dataset/CIC_DDoS_2019/CSV/03-11/UDP.csv", CACHE_ROOT + "label_from_csv_cache")
attack_feature_list = list(load_feature(files,
pkt_in_each_flow_limit=CNN_SHAPE[0],
label_dict=attack_label_dict,
sample_limit_dict={"BENIGN": 0, "MSSQL": 0, "UDP": SAMPLE_NUMBER}))
attack_label_dict = parsing_label(attack_label_dict)
但发现第二次构成的attack_feature_list长度为0,
我修改的代码:
#训练集
attack_label_dict = load_label("./dataset/CICDDoS2019/CSV/UDP.csv", CACHE_ROOT + "label_from_csv_cache")
#attack_label_dict2 = attack_label_dict
attack_feature_list = list(load_feature(files,
pkt_in_each_flow_limit=FEATURE_SHAPE[0],
label_dict=attack_label_dict,
sample_limit_dict={"BENIGN": 0, "MSSQL": 0, "UDP": 0.8*SAMPLE_NUMBER}))
attack_label_dict = parsing_label(attack_label_dict)
#测试集
attack_label_dict2 = load_label("./dataset/CICDDoS2019/CSV/UDP.csv", CACHE_ROOT + "label_from_csv_test_cache")
attack_feature_test_list = list(load_feature(test_files, #这里选择的file和前面的不同
pkt_in_each_flow_limit=FEATURE_SHAPE[0],
label_dict=attack_label_dict2,
sample_limit_dict={"BENIGN": 0, "MSSQL": 0,
"UDP": 0.2 * SAMPLE_NUMBER}))
attack_label_dict2 = parsing_label(attack_label_dict2)

logger.debug("loaded attack_test_list_num : %s", len(attack_feature_test_list))
显示DEBUG:main:loaded attack_list_test_num : 0

不知道是我哪里做错了,是什么原因呢?向您请教,希望得到回复
(也不知道这样使用对不对)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.